diff options
| author | Sean Collins <sean@cllns.com> | 2025-03-03 15:12:53 -0700 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-03-10 12:43:36 +0900 |
| commit | 8acf0d7bcc2a55299bed00caee9679446f04e0d0 (patch) | |
| tree | 257d0abf815f8b357b58578d34d1572f92a9b187 /lib | |
| parent | afbc6649cd98226a1f221d87fc289dad2458a490 (diff) | |
[rubygems/rubygems] Use shorthand hash syntax for bundle add
https://github.com/rubygems/rubygems/commit/9691097036
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12890
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/bundler/injector.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/bundler/injector.rb b/lib/bundler/injector.rb index c0941e9909..21ff90ad13 100644 --- a/lib/bundler/injector.rb +++ b/lib/bundler/injector.rb @@ -108,17 +108,17 @@ module Bundler end if d.groups != Array(:default) - group = d.groups.size == 1 ? ", :group => #{d.groups.first.inspect}" : ", :groups => #{d.groups.inspect}" + group = d.groups.size == 1 ? ", group: #{d.groups.first.inspect}" : ", groups: #{d.groups.inspect}" end - source = ", :source => \"#{d.source}\"" unless d.source.nil? - path = ", :path => \"#{d.path}\"" unless d.path.nil? - git = ", :git => \"#{d.git}\"" unless d.git.nil? - github = ", :github => \"#{d.github}\"" unless d.github.nil? - branch = ", :branch => \"#{d.branch}\"" unless d.branch.nil? - ref = ", :ref => \"#{d.ref}\"" unless d.ref.nil? - glob = ", :glob => \"#{d.glob}\"" unless d.glob.nil? - require_path = ", :require => #{convert_autorequire(d.autorequire)}" unless d.autorequire.nil? + source = ", source: \"#{d.source}\"" unless d.source.nil? + path = ", path: \"#{d.path}\"" unless d.path.nil? + git = ", git: \"#{d.git}\"" unless d.git.nil? + github = ", github: \"#{d.github}\"" unless d.github.nil? + branch = ", branch: \"#{d.branch}\"" unless d.branch.nil? + ref = ", ref: \"#{d.ref}\"" unless d.ref.nil? + glob = ", glob: \"#{d.glob}\"" unless d.glob.nil? + require_path = ", require: #{convert_autorequire(d.autorequire)}" unless d.autorequire.nil? %(gem #{name}#{requirement}#{group}#{source}#{path}#{git}#{github}#{branch}#{ref}#{glob}#{require_path}) end.join("\n") |
