Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin_config_formatter: update new doc URL #2481

Merged
merged 1 commit into from
Jul 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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