Permalink
Browse files

Don't add env sources to Gemfile.lock

  • Loading branch information...
1 parent d4670b0 commit 06031816363fd36cef86b0ecbc756ef87ffd066f @brettporter committed Nov 7, 2012
Showing with 20 additions and 1 deletion.
  1. +1 −1 lib/bundler/source.rb
  2. +19 −0 spec/lock/lockfile_spec.rb
View
@@ -229,7 +229,7 @@ def remote_specs
old = Bundler.rubygems.sources
sources = {}
- all_remotes = remotes
+ all_remotes = remotes.dup
if Bundler.settings[:env_sources]
Bundler.settings[:env_sources].split(',').each { |uri|
all_remotes << normalize_uri(uri)
View
@@ -24,6 +24,25 @@
G
end
+ it "does not add env sources to the lockfile" do
+ ENV['BUNDLE_ENV_SOURCES'] = "file://#{gem_repo1}"
+ install_gemfile <<-G
+ gem "rack"
+ G
+
+ lockfile_should_be <<-G
+ GEM
+ specs:
+ rack (1.0.0)
+
+ PLATFORMS
+ #{generic(Gem::Platform.local)}
+
+ DEPENDENCIES
+ rack
+ G
+ end
+
it "generates a simple lockfile for a single source, gem with dependencies" do
install_gemfile <<-G
source "file://#{gem_repo1}"

0 comments on commit 0603181

Please sign in to comment.