Skip to content

Commit

Permalink
Merge pull request #2481 from nokute78/fix_doc_url
Browse files Browse the repository at this point in the history
plugin_config_formatter: update new doc URL
  • Loading branch information
repeatedly authored Jul 8, 2019
2 parents 3090536 + 4d05c85 commit dcf3938
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions lib/fluent/command/plugin_config_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class FluentPluginConfigFormatter
"buffer", "parser", "formatter", "storage"
]

DOCS_BASE_URL = "https://docs.fluentd.org/v1.0/articles/quickstart"
DOCS_ARTICLE_BASE_URL = "https://docs.fluentd.org/v1.0/articles/"
DOCS_BASE_URL = "https://docs.fluentd.org/v/1.0"
DOCS_PLUGIN_HELPER_BASE_URL = "#{DOCS_BASE_URL}/plugin-helper-overview/"

def initialize(argv = ARGV)
@argv = argv
Expand Down Expand Up @@ -198,7 +198,7 @@ def dump_json(dumped_config)
end

def plugin_helper_url(plugin_helper)
"#{DOCS_ARTICLE_BASE_URL}api-plugin-helper-#{plugin_helper}"
"#{DOCS_PLUGIN_HELPER_BASE_URL}api-plugin-helper-#{plugin_helper}"
end

def plugin_helper_markdown_link(plugin_helper)
Expand All @@ -207,7 +207,7 @@ def plugin_helper_markdown_link(plugin_helper)

def plugin_overview_url(class_name)
plugin_type = class_name.slice(/::(\w+)\z/, 1).downcase
"#{DOCS_ARTICLE_BASE_URL}#{plugin_type}-plugin-overview"
"#{DOCS_BASE_URL}/#{plugin_type}#overview"
end

def plugin_overview_markdown_link(class_name)
Expand Down
12 changes: 6 additions & 6 deletions test/command/test_plugin_config_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ def process(tag, es)
expected = <<TEXT
## Plugin helpers
* [inject](https://docs.fluentd.org/v1.0/articles/api-plugin-helper-inject)
* [compat_parameters](https://docs.fluentd.org/v1.0/articles/api-plugin-helper-compat_parameters)
* [inject](https://docs.fluentd.org/v/1.0/plugin-helper-overview/api-plugin-helper-inject)
* [compat_parameters](https://docs.fluentd.org/v/1.0/plugin-helper-overview/api-plugin-helper-compat_parameters)
* See also: [Input Plugin Overview](https://docs.fluentd.org/v1.0/articles/input-plugin-overview)
* See also: [Input Plugin Overview](https://docs.fluentd.org/v/1.0/input#overview)
## TestFluentPluginConfigFormatter::SimpleInput
Expand All @@ -203,10 +203,10 @@ def process(tag, es)
expected = <<TEXT
## Plugin helpers
* [inject](https://docs.fluentd.org/v1.0/articles/api-plugin-helper-inject)
* [compat_parameters](https://docs.fluentd.org/v1.0/articles/api-plugin-helper-compat_parameters)
* [inject](https://docs.fluentd.org/v/1.0/plugin-helper-overview/api-plugin-helper-inject)
* [compat_parameters](https://docs.fluentd.org/v/1.0/plugin-helper-overview/api-plugin-helper-compat_parameters)
* See also: [Output Plugin Overview](https://docs.fluentd.org/v1.0/articles/output-plugin-overview)
* See also: [Output Plugin Overview](https://docs.fluentd.org/v/1.0/output#overview)
## TestFluentPluginConfigFormatter::ComplexOutput
Expand Down

0 comments on commit dcf3938

Please sign in to comment.