-
-
Notifications
You must be signed in to change notification settings - Fork 2k
bundle inject
with source and group options
#5456
Changes from 6 commits
069cce3
67ee37f
b78a3f0
9f64468
d73d78c
cfe4ecc
1f466c0
1754e50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,31 @@ | |
end | ||
end | ||
|
||
context "with source option" do | ||
it "add gem with source option in gemfile" do | ||
bundle "inject 'foo' '>0' --source file://#{gem_repo1}" | ||
gemfile = bundled_app("Gemfile").read | ||
str = "gem 'foo', '> 0', :source => 'file://#{gem_repo1}'" | ||
expect(gemfile).to include str | ||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer to use
Same with the other expectations below as well. |
||
end | ||
|
||
context "with group option" do | ||
it "add gem with group option in gemfile" do | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please also add a test for including multiple groups There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for review I have added the testcase for multiple groups in this commit |
||
bundle "inject 'rack-obama' '>0' --group=development" | ||
gemfile = bundled_app("Gemfile").read | ||
str = "gem 'rack-obama', '> 0', :group => [:development]" | ||
expect(gemfile).to include str | ||
end | ||
|
||
it "add gem with multiple group in gemfile" do | ||
bundle "inject 'rack-obama' '>0' --group=development,test" | ||
gemfile = bundled_app("Gemfile").read | ||
str = "gem 'rack-obama', '> 0', :group => [:development, :test]" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't this be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @segiddins for review. I have edited the line in this commit 1f466c0 Sorry for the silly mistake. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I edited this line : "add gem with multiple group in gemfile" to "add gem with multiple groups in gemfile" and I think this line : There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this still reads There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @segiddins , I saw example here : http://bundler.io/v1.3/groups.html . In gemfile it must be To install all dependencies, except those in specified groups
will it work when we write There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it can be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @segiddins , I have changed it in this commit 1754e50 |
||
expect(gemfile).to include str | ||
end | ||
end | ||
|
||
context "when frozen" do | ||
before do | ||
bundle "install" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe
"install gem from the given source"
and"Install gem into a bundler group"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for review @colby-swandale . I have edited the PR according to to your comments.