Skip to content
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
4 changes: 2 additions & 2 deletions lib/logstash-docket/artifact_plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -94,7 +94,7 @@ def changelog_url
##
# @see Plugin#tag
def tag
version ? "v#{version}" : "master"
version ? "v#{version}" : "main"
end

##
Expand Down
4 changes: 2 additions & 2 deletions lib/logstash-docket/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -174,4 +174,4 @@ def rubygem_info
@rubygem_info.value
end
end
end
end
4 changes: 2 additions & 2 deletions lib/logstash-docket/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ def release_tags
private

def ref(version)
version ? "v#{version}" : 'master'
version ? "v#{version}" : 'main'
end
end
end
end
end
6 changes: 3 additions & 3 deletions plugindocs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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) }

Expand All @@ -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)
Expand Down Expand Up @@ -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

Expand Down