| @@ -2,8 +2,12 @@ module Docs · 1 unmodified line |
| 2 | class Influxdata < UrlScraper | 2 | class Influxdata < UrlScraper |
| 3 | self.name = 'InfluxData' | 3 | self.name = 'InfluxData' |
| 4 | self.type = 'influxdata' | 4 | self.type = 'influxdata' |
| 5 | self.release = '1.0' | 5 | self.release = '1.2' |
| 6 | self.base_url = 'https://docs.influxdata.com/' | 6 | self.base_url = 'https://docs.influxdata.com/' |
| | 7 | self.links = { |
| | 8 | home: 'https://www.influxdata.com/', |
| | 9 | code: 'https://github.com/influxdata/influxdb' |
| | 10 | } |
| 7 | | 11 | |
| 8 | html_filters.push 'influxdata/entries', 'influxdata/clean_html', 'title' | 12 | html_filters.push 'influxdata/entries', 'influxdata/clean_html', 'title' |
| 9 | | 13 | |
| @@ -18,9 +22,20 @@ module Docs · 8 unmodified lines |
| 18 | "influxdb/v#{release}/sample_data/data_download/", | 22 | "influxdb/v#{release}/sample_data/data_download/", |
| 19 | "influxdb/v#{release}/tools/grafana/", | 23 | "influxdb/v#{release}/tools/grafana/", |
| 20 | "influxdb/v#{release}/about/", | 24 | "influxdb/v#{release}/about/", |
| 21 | "influxdb/v#{release}/external_resources/" | 25 | "influxdb/v#{release}/external_resources/", |
| | 26 | "influxdb/v#{release}/administration/security_best_practices/" |
| 22 | ] | 27 | ] |
| 23 | | 28 | |
| | 29 | options[:replace_paths] = { |
| | 30 | "telegraf/v#{release}/introduction/getting-started-telegraf/" => "telegraf/v#{release}/introduction/getting_started/", |
| | 31 | "influxdb/v#{release}/write_protocols/line/" => "influxdb/v#{release}/write_protocols/line_protocol_tutorial/", |
| | 32 | "influxdb/v#{release}/write_protocols/graphite/" => "influxdb/v#{release}/tools/graphite/", |
| | 33 | "influxdb/v#{release}/clients/api/" => "influxdb/v#{release}/tools/api_client_libraries/", |
| | 34 | "influxdb/v#{release}/concepts/010_vs_011/" => "influxdb/v#{release}/administration/differences/", |
| | 35 | "influxdb/v#{release}/write_protocols/write_syntax/" => "influxdb/v#{release}/write_protocols/line_protocol_reference/", |
| | 36 | "influxdb/v#{release}/write_protocols/udp/" => "influxdb/v#{release}/tools/udp/" |
| | 37 | } |
| | 38 | |
| 24 | options[:fix_urls] = ->(url) do | 39 | options[:fix_urls] = ->(url) do |
| 25 | url.sub! %r{/influxdb/v([\d\.]+)/.+/influxdb/v[\d\.]+/}, '/influxdb/v\1/' | 40 | url.sub! %r{/influxdb/v([\d\.]+)/.+/influxdb/v[\d\.]+/}, '/influxdb/v\1/' |
| 26 | url | 41 | url |