зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] `bundle add --glob` continued- quote glob value invocation in specs, add banner text for CLI recommending single quotes
https://github.com/rubygems/rubygems/commit/6d2cf955f9
This commit is contained in:
Родитель
c4b5f3f142
Коммит
a64a42ae38
|
@ -347,7 +347,7 @@ module Bundler
|
||||||
method_option "github", type: :string
|
method_option "github", type: :string
|
||||||
method_option "branch", type: :string
|
method_option "branch", type: :string
|
||||||
method_option "ref", type: :string
|
method_option "ref", type: :string
|
||||||
method_option "glob", type: :string
|
method_option "glob", type: :string, banner: "The location of a dependency's .gemspec, expanded within Ruby (single quotes recommended)"
|
||||||
method_option "skip-install", type: :boolean, banner: "Adds gem to the Gemfile but does not install it"
|
method_option "skip-install", type: :boolean, banner: "Adds gem to the Gemfile but does not install it"
|
||||||
method_option "optimistic", type: :boolean, banner: "Adds optimistic declaration of version to gem"
|
method_option "optimistic", type: :boolean, banner: "Adds optimistic declaration of version to gem"
|
||||||
method_option "strict", type: :boolean, banner: "Adds strict declaration of version to gem"
|
method_option "strict", type: :boolean, banner: "Adds strict declaration of version to gem"
|
||||||
|
|
|
@ -177,7 +177,7 @@ RSpec.describe "bundle add" do
|
||||||
|
|
||||||
describe "with --git and --glob" do
|
describe "with --git and --glob" do
|
||||||
it "adds dependency with specified git source" do
|
it "adds dependency with specified git source" do
|
||||||
bundle "add foo --git=#{lib_path("foo-2.0")} --glob=./*.gemspec"
|
bundle "add foo --git=#{lib_path("foo-2.0")} --glob='./*.gemspec'"
|
||||||
|
|
||||||
expect(bundled_app_gemfile.read).to match(%r{gem "foo", "~> 2.0", :git => "#{lib_path("foo-2.0")}", :glob => "\./\*\.gemspec"})
|
expect(bundled_app_gemfile.read).to match(%r{gem "foo", "~> 2.0", :git => "#{lib_path("foo-2.0")}", :glob => "\./\*\.gemspec"})
|
||||||
expect(the_bundle).to include_gems "foo 2.0"
|
expect(the_bundle).to include_gems "foo 2.0"
|
||||||
|
@ -190,7 +190,7 @@ RSpec.describe "bundle add" do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "adds dependency with specified git source and branch" do
|
it "adds dependency with specified git source and branch" do
|
||||||
bundle "add foo --git=#{lib_path("foo-2.0")} --branch=test --glob=./*.gemspec"
|
bundle "add foo --git=#{lib_path("foo-2.0")} --branch=test --glob='./*.gemspec'"
|
||||||
|
|
||||||
expect(bundled_app_gemfile.read).to match(%r{gem "foo", "~> 2.0", :git => "#{lib_path("foo-2.0")}", :branch => "test", :glob => "\./\*\.gemspec"})
|
expect(bundled_app_gemfile.read).to match(%r{gem "foo", "~> 2.0", :git => "#{lib_path("foo-2.0")}", :branch => "test", :glob => "\./\*\.gemspec"})
|
||||||
expect(the_bundle).to include_gems "foo 2.0"
|
expect(the_bundle).to include_gems "foo 2.0"
|
||||||
|
@ -199,7 +199,7 @@ RSpec.describe "bundle add" do
|
||||||
|
|
||||||
describe "with --git and --ref and --glob" do
|
describe "with --git and --ref and --glob" do
|
||||||
it "adds dependency with specified git source and branch" do
|
it "adds dependency with specified git source and branch" do
|
||||||
bundle "add foo --git=#{lib_path("foo-2.0")} --ref=#{revision_for(lib_path("foo-2.0"))} --glob=./*.gemspec"
|
bundle "add foo --git=#{lib_path("foo-2.0")} --ref=#{revision_for(lib_path("foo-2.0"))} --glob='./*.gemspec'"
|
||||||
|
|
||||||
expect(bundled_app_gemfile.read).to match(%r{gem "foo", "~> 2\.0", :git => "#{lib_path("foo-2.0")}", :ref => "#{revision_for(lib_path("foo-2.0"))}", :glob => "\./\*\.gemspec"})
|
expect(bundled_app_gemfile.read).to match(%r{gem "foo", "~> 2\.0", :git => "#{lib_path("foo-2.0")}", :ref => "#{revision_for(lib_path("foo-2.0"))}", :glob => "\./\*\.gemspec"})
|
||||||
expect(the_bundle).to include_gems "foo 2.0"
|
expect(the_bundle).to include_gems "foo 2.0"
|
||||||
|
@ -208,7 +208,7 @@ RSpec.describe "bundle add" do
|
||||||
|
|
||||||
describe "with --github and --glob" do
|
describe "with --github and --glob" do
|
||||||
it "adds dependency with specified github source", :realworld do
|
it "adds dependency with specified github source", :realworld do
|
||||||
bundle "add rake --github=ruby/rake --glob=./*.gemspec"
|
bundle "add rake --github=ruby/rake --glob='./*.gemspec'"
|
||||||
|
|
||||||
expect(bundled_app_gemfile.read).to match(%r{gem "rake", "~> 13\.\d+", :github => "ruby\/rake", :glob => "\.\/\*\.gemspec"})
|
expect(bundled_app_gemfile.read).to match(%r{gem "rake", "~> 13\.\d+", :github => "ruby\/rake", :glob => "\.\/\*\.gemspec"})
|
||||||
end
|
end
|
||||||
|
@ -216,7 +216,7 @@ RSpec.describe "bundle add" do
|
||||||
|
|
||||||
describe "with --github and --branch --and glob" do
|
describe "with --github and --branch --and glob" do
|
||||||
it "adds dependency with specified github source and branch", :realworld do
|
it "adds dependency with specified github source and branch", :realworld do
|
||||||
bundle "add rake --github=ruby/rake --branch=master --glob=./*.gemspec"
|
bundle "add rake --github=ruby/rake --branch=master --glob='./*.gemspec'"
|
||||||
|
|
||||||
expect(bundled_app_gemfile.read).to match(%r{gem "rake", "~> 13\.\d+", :github => "ruby\/rake", :branch => "master", :glob => "\.\/\*\.gemspec"})
|
expect(bundled_app_gemfile.read).to match(%r{gem "rake", "~> 13\.\d+", :github => "ruby\/rake", :branch => "master", :glob => "\.\/\*\.gemspec"})
|
||||||
end
|
end
|
||||||
|
@ -224,7 +224,7 @@ RSpec.describe "bundle add" do
|
||||||
|
|
||||||
describe "with --github and --ref and --glob" do
|
describe "with --github and --ref and --glob" do
|
||||||
it "adds dependency with specified github source and ref", :realworld do
|
it "adds dependency with specified github source and ref", :realworld do
|
||||||
bundle "add rake --github=ruby/rake --ref=5c60da8 --glob=./*.gemspec"
|
bundle "add rake --github=ruby/rake --ref=5c60da8 --glob='./*.gemspec'"
|
||||||
|
|
||||||
expect(bundled_app_gemfile.read).to match(%r{gem "rake", "~> 13\.\d+", :github => "ruby\/rake", :ref => "5c60da8", :glob => "\.\/\*\.gemspec"})
|
expect(bundled_app_gemfile.read).to match(%r{gem "rake", "~> 13\.\d+", :github => "ruby\/rake", :ref => "5c60da8", :glob => "\.\/\*\.gemspec"})
|
||||||
end
|
end
|
||||||
|
|
Загрузка…
Ссылка в новой задаче