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

Eliminate ruby 2.7 keyword arg warnings in cli #292

Merged
merged 1 commit into from
Jul 6, 2020
Merged
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
13 changes: 5 additions & 8 deletions lib/licensed/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CLI < Thor
desc: "Individual source(s) to evaluate. Must also be enabled via configuration."
def cache
run Licensed::Commands::Cache.new(config: config),
{ force: options[:force], sources: options[:sources] }
force: options[:force], sources: options[:sources]
end

desc "status", "Check status of dependencies' cached licenses"
Expand All @@ -23,8 +23,7 @@ def cache
method_option :sources, aliases: "-s", type: :array,
desc: "Individual source(s) to evaluate. Must also be enabled via configuration."
def status
run Licensed::Commands::Status.new(config: config),
{ sources: options[:sources] }
run Licensed::Commands::Status.new(config: config), sources: options[:sources]
end

desc "list", "List dependencies"
Expand All @@ -33,8 +32,7 @@ def status
method_option :sources, aliases: "-s", type: :array,
desc: "Individual source(s) to evaluate. Must also be enabled via configuration."
def list
run Licensed::Commands::List.new(config: config),
{ sources: options[:sources] }
run Licensed::Commands::List.new(config: config), sources: options[:sources]
end

desc "notices", "Generate a NOTICE file from cached records"
Expand All @@ -43,8 +41,7 @@ def list
method_option :sources, aliases: "-s", type: :array,
desc: "Individual source(s) to evaluate. Must also be enabled via configuration."
def notices
run Licensed::Commands::Notices.new(config: config),
{ sources: options[:sources] }
run Licensed::Commands::Notices.new(config: config), sources: options[:sources]
end

map "-v" => :version
Expand Down Expand Up @@ -99,7 +96,7 @@ def config_path
end

def run(command, **args)
exit command.run(args)
exit command.run(**args)
end
end
end