Skip to content

Commit

Permalink
[ISSUE-60] Eliminates deprecation warnings during spec runs with 2.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bougyman committed Dec 26, 2019
1 parent 2641b78 commit e42d6fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/tty/cmd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def execute(*)
# @api public
def command(**options)
require 'tty-command'
TTY::Command.new(options)
TTY::Command.new(**options)
end

# The cursor movement
Expand Down
4 changes: 2 additions & 2 deletions lib/tty/commands/new.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def add_license_to_readme(license)
"Copyright (c) #{Time.now.year} #{author}. "\
"See [#{desc}](LICENSE.txt) for further details."
within_root_path do
generator.append_to_file(readme_path, content, file_options)
generator.append_to_file(readme_path, content, **file_options)
end
end

Expand All @@ -246,7 +246,7 @@ def add_required_libs_to_gemspec
within_root_path do
path = app_path.join(gemspec_name)
generator.inject_into_file(path, content,
{ before: /^\s*spec\.add_development_dependency\s*"bundler.*$/ }
**{ before: /^\s*spec\.add_development_dependency\s*"bundler.*$/ }
.merge(file_options))
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/tty/templater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def generate(template_options, color_option)
next unless ::File.exist?(source)
within_root_path do
TTY::File.copy_file(source, destination,
{ context: template_options }.merge(color_option))
**{ context: template_options }.merge(color_option))
end
end
end
Expand Down

0 comments on commit e42d6fe

Please sign in to comment.