From 14a5c4f3a3b900abed147bccdb8f319ac6ae4ee8 Mon Sep 17 00:00:00 2001 From: Joao Duarte Date: Mon, 11 Oct 2021 10:34:58 +0100 Subject: [PATCH 1/2] change master branch references to main --- lib/logstash-docket/artifact_plugin.rb | 4 ++-- lib/logstash-docket/repository.rb | 4 ++-- lib/logstash-docket/source.rb | 4 ++-- plugindocs.rb | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/logstash-docket/artifact_plugin.rb b/lib/logstash-docket/artifact_plugin.rb index 92b3b5e..f6c9dca 100644 --- a/lib/logstash-docket/artifact_plugin.rb +++ b/lib/logstash-docket/artifact_plugin.rb @@ -30,7 +30,7 @@ class ArtifactPlugin # the optionally-provided version as a hint. # # @param gem_name [String] - # @param version [String, nil]: (optional: when omitted, source's master will + # @param version [String, nil]: (optional: when omitted, source's main will # be used with the latest-available published gem metadata) # # @yieldparam [Hash{String=>Object}]: gem metadata @@ -94,7 +94,7 @@ def changelog_url ## # @see Plugin#tag def tag - version ? "v#{version}" : "master" + version ? "v#{version}" : "main" end ## diff --git a/lib/logstash-docket/repository.rb b/lib/logstash-docket/repository.rb index e41de7e..7ba4458 100644 --- a/lib/logstash-docket/repository.rb +++ b/lib/logstash-docket/repository.rb @@ -116,7 +116,7 @@ def released_plugins(include_prerelease=false) # # @param version [String]: the version to fetch from rubygems (optional: when # omitted or provided explicitly as `nil`, the resulting {@link Plugin} will - # be an approximation of the repository's `master` using the latest release's\ + # be an approximation of the repository's `main` using the latest release's\ # metadata). def released_plugin(version) @plugin_versions.fetch(version) @@ -174,4 +174,4 @@ def rubygem_info @rubygem_info.value end end -end \ No newline at end of file +end diff --git a/lib/logstash-docket/source.rb b/lib/logstash-docket/source.rb index 47fdb2a..e6b275c 100644 --- a/lib/logstash-docket/source.rb +++ b/lib/logstash-docket/source.rb @@ -90,8 +90,8 @@ def release_tags private def ref(version) - version ? "v#{version}" : 'master' + version ? "v#{version}" : 'main' end end end -end \ No newline at end of file +end diff --git a/plugindocs.rb b/plugindocs.rb index 7074fb7..eefeb70 100644 --- a/plugindocs.rb +++ b/plugindocs.rb @@ -11,7 +11,7 @@ class PluginDocs < Clamp::Command option "--output-path", "OUTPUT", "Path to the top-level of the logstash-docs path to write the output.", required: true - option "--master", :flag, "Fetch the plugin's docs from master instead of the version found in PLUGINS_JSON", :default => false + option "--main", :flag, "Fetch the plugin's docs from main instead of the version found in PLUGINS_JSON", :default => false option "--settings", "SETTINGS_YAML", "Path to the settings file.", :default => File.join(File.dirname(__FILE__), "settings.yml"), :attribute_name => :settings_path option("--parallelism", "NUMBER", "for performance", default: 4) { |v| Integer(v) } From a56a2af673ca6ad018edf0d20668b85c5e70fb85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Duarte?= Date: Fri, 5 Nov 2021 22:15:49 +0000 Subject: [PATCH 2/2] Update plugindocs.rb --- plugindocs.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugindocs.rb b/plugindocs.rb index eefeb70..6f50016 100644 --- a/plugindocs.rb +++ b/plugindocs.rb @@ -32,7 +32,7 @@ def execute end is_default_plugin = details["from"] == "default" - version = master? ? nil : details['version'] + version = main? ? nil : details['version'] released_plugin = ArtifactPlugin.from_rubygems(repository_name, version) do |gem_data| github_source_from_gem_data(repository_name, gem_data) @@ -117,7 +117,7 @@ def github_source_from_gem_data(gem_name, gem_data) end def tag(version) - version ? "v#{version}" : "master" + version ? "v#{version}" : "main" end end