Skip to content

Commit

Permalink
Use keyword argument for options
Browse files Browse the repository at this point in the history
> Keyword arguments are separated from other arguments.

From: https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/
  • Loading branch information
tricknotes authored and seanpdoyle committed Dec 20, 2021
1 parent f749d85 commit 812bc90
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/ember_cli/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Configuration
attr_accessor :watcher

def app(name, **options)
app = App.new(name, options)
app = App.new(name, **options)
apps.store(name, app)
end

Expand Down
4 changes: 2 additions & 2 deletions spec/generators/ember/heroku/heroku_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def package_json_contents
end
end

def configure_application(options = {})
EmberCli.configure { |c| c.app("my-app", options) }
def configure_application(**options)
EmberCli.configure { |c| c.app("my-app", **options) }
end

def setup_destination
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/ember_cli/command_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,6 @@ def build_paths(**options)
end

def build_command(**options)
EmberCli::Command.new(options)
EmberCli::Command.new(**options)
end
end
2 changes: 1 addition & 1 deletion spec/lib/ember_cli/path_set_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def stub_which(program_to_path)

def build_path_set(**options)
EmberCli::PathSet.new(
options.reverse_merge(
**options.reverse_merge(
app: build_app,
rails_root: rails_root,
ember_cli_root: ember_cli_root,
Expand Down

0 comments on commit 812bc90

Please sign in to comment.