summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/bundler/cli/inject.rb4
-rw-r--r--spec/bundler/commands/inject_spec.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/bundler/cli/inject.rb b/lib/bundler/cli/inject.rb
index 4838aba671..a09d5c6bda 100644
--- a/lib/bundler/cli/inject.rb
+++ b/lib/bundler/cli/inject.rb
@@ -35,8 +35,8 @@ module Bundler
Bundler.ui.confirm(added.map do |d|
name = "'#{d.name}'"
requirement = ", '#{d.requirement}'"
- group = ", :group => #{d.groups.inspect}" if d.groups != Array(:default)
- source = ", :source => '#{d.source}'" unless d.source.nil?
+ group = ", group: #{d.groups.inspect}" if d.groups != Array(:default)
+ source = ", source: '#{d.source}'" unless d.source.nil?
%(gem #{name}#{requirement}#{group}#{source})
end.join("\n"))
else
diff --git a/spec/bundler/commands/inject_spec.rb b/spec/bundler/commands/inject_spec.rb
index 193806a02a..4998b6e89d 100644
--- a/spec/bundler/commands/inject_spec.rb
+++ b/spec/bundler/commands/inject_spec.rb
@@ -55,7 +55,7 @@ Usage: "bundle inject GEM VERSION"
it "add gem with source option in gemfile" do
bundle "inject 'foo' '>0' --source https://gem.repo1"
gemfile = bundled_app_gemfile.read
- str = "gem \"foo\", \"> 0\", :source => \"https://gem.repo1\""
+ str = "gem \"foo\", \"> 0\", source: \"https://gem.repo1\""
expect(gemfile).to include str
end
end
@@ -64,14 +64,14 @@ Usage: "bundle inject GEM VERSION"
it "add gem with group option in gemfile" do
bundle "inject 'myrack-obama' '>0' --group=development"
gemfile = bundled_app_gemfile.read
- str = "gem \"myrack-obama\", \"> 0\", :group => :development"
+ str = "gem \"myrack-obama\", \"> 0\", group: :development"
expect(gemfile).to include str
end
it "add gem with multiple groups in gemfile" do
bundle "inject 'myrack-obama' '>0' --group=development,test"
gemfile = bundled_app_gemfile.read
- str = "gem \"myrack-obama\", \"> 0\", :groups => [:development, :test]"
+ str = "gem \"myrack-obama\", \"> 0\", groups: [:development, :test]"
expect(gemfile).to include str
end
end