bundler 1.0.0.beta.8 → 1.0.0.beta.9

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bundler might be problematic. Click here for more details.

data/CHANGELOG.md CHANGED
@@ -1,4 +1,44 @@
1
- ## 0.10.0
1
+ ## 1.0.0.beta.9 (July 21, 2010)
2
+
3
+ - Fix install failure when switching from a path to git source
4
+ - Fix `bundle exec bundle *` in a bundle with --disable-shared-gems
5
+ - Fix `bundle *` from inside a bundle with --disable-shared-gem
6
+ - Shim Gem.refresh. This is used by Unicorn
7
+ - Fix install failure when a path's dependencies changed
8
+
9
+ ## 1.0.0.beta.8 (July 20, 2010)
10
+
11
+ - Fix a Beta 7 bug involving Ruby 1.9
12
+
13
+ ## 1.0.0.beta.7 (July 20, 2010, yanked)
14
+
15
+ - Running `bundle install` twice in a row with a git source always crashed
16
+
17
+ ## 1.0.0.beta.6 (July 20, 2010, yanked)
18
+
19
+ - Create executables with bundle install --binstubs
20
+ - You can customize the location (default is app/bin) with --binstubs other/location
21
+ - Fix a bug where the Gemfile.lock would be deleted even if the update was exited
22
+ - Fix a bug where cached gems for other platforms were sometimes deleted
23
+ - Clean up output when nothing was deleted from cache (it previously said
24
+ "Removing outdated gems ...")
25
+ - Improve performance of bundle install if the git gem was already checked out,
26
+ and the revision being used already exists locally
27
+ - Fix bundle show bundler in some cases
28
+ - Fix bugs with bundle update
29
+ - Don't ever run git commands at runtime (fixes a number of common passenger issues)
30
+ - Fixes an obscure bug where switching the source of a gem could fail to correctly
31
+ change the source of its dependencies
32
+ - Support multiple version dependencies in the Gemfile
33
+ (gem "rails", ">= 3.0.0.beta1", "<= 3.0.0")
34
+ - Raise an exception for ambiguous uses of multiple declarations of the same gem
35
+ (for instance, with different versions or sources).
36
+ - Fix cases where the same dependency appeared several times in the Gemfile.lock
37
+ - Fix a bug where require errors were being swallowed during Bundler.require
38
+
39
+ ## BACKFILL COMING
40
+
41
+ ## 1.0.0.beta.1
2
42
 
3
43
  - No `bundle lock` command. Locking happens automatically on install or update
4
44
  - No .bundle/environment.rb. Require 'bundler/setup' instead.
data/lib/bundler/cli.rb CHANGED
@@ -212,21 +212,7 @@ module Bundler
212
212
  def exec(*)
213
213
  ARGV.delete("exec")
214
214
 
215
- # Set PATH
216
- paths = (ENV["PATH"] || "").split(File::PATH_SEPARATOR)
217
- paths.unshift "#{Bundler.bundle_path}/bin"
218
- ENV["PATH"] = paths.uniq.join(File::PATH_SEPARATOR)
219
-
220
- # Set BUNDLE_GEMFILE
221
- ENV["BUNDLE_GEMFILE"] = Bundler::SharedHelpers.default_gemfile.to_s
222
-
223
- # Set RUBYOPT
224
- rubyopt = [ENV["RUBYOPT"]].compact
225
- if rubyopt.empty? || rubyopt.first !~ /-rbundler\/setup/
226
- rubyopt.unshift "-rbundler/setup"
227
- rubyopt.unshift "-I#{File.expand_path('../..', __FILE__)}"
228
- ENV["RUBYOPT"] = rubyopt.join(' ')
229
- end
215
+ Bundler.setup
230
216
 
231
217
  begin
232
218
  # Run
@@ -204,9 +204,16 @@ module Bundler
204
204
  end
205
205
  end
206
206
 
207
+ # Remove elements from the locked specs that are expired. This will most
208
+ # commonly happen if the Gemfile has changed since the lockfile was last
209
+ # generated
207
210
  def converge_locked_specs
208
211
  deps = []
209
212
 
213
+ # Build a list of dependencies that are the same in the Gemfile
214
+ # and Gemfile.lock. If the Gemfile modified a dependency, but
215
+ # the gem in the Gemfile.lock still satisfies it, this is fine
216
+ # too.
210
217
  @dependencies.each do |dep|
211
218
  if in_locked_deps?(dep) || satisfies_locked_spec?(dep)
212
219
  deps << dep
@@ -217,10 +224,22 @@ module Bundler
217
224
  @last_resolve.each do |s|
218
225
  s.source = @sources.find { |src| s.source == src }
219
226
 
227
+ # Don't add a spec to the list if its source is expired. For example,
228
+ # if you change a Git gem to Rubygems.
220
229
  next if s.source.nil? || @unlock[:sources].include?(s.name)
221
230
  # If the spec is from a path source and it doesn't exist anymore
222
231
  # then we just unlock it.
223
- next if s.source.instance_of?(Source::Path) && s.source.specs[s].empty?
232
+
233
+ # Path sources have special logic
234
+ if s.source.instance_of?(Source::Path)
235
+ other = s.source.specs[s].first
236
+
237
+ # If the spec is no longer in the path source, unlock it. This
238
+ # commonly happens if the version changed in the gemspec
239
+ next unless other
240
+ # If the dependencies of the path source have changed, unlock it
241
+ next unless s.dependencies.sort == other.dependencies.sort
242
+ end
224
243
 
225
244
  converged << s
226
245
  end
@@ -10,6 +10,7 @@ module Bundler
10
10
 
11
11
  specs = groups.any? ? @definition.specs_for(groups) : requested_specs
12
12
 
13
+ setup_environment
13
14
  cripple_rubygems(specs)
14
15
 
15
16
  # Activate the specs
@@ -120,5 +121,28 @@ module Bundler
120
121
  root.join("vendor/cache")
121
122
  end
122
123
 
124
+ def setup_environment
125
+ begin
126
+ ENV["BUNDLE_BIN_PATH"] = Gem.bin_path("bundler", "bundle", VERSION)
127
+ rescue Gem::GemNotFoundException
128
+ ENV["BUNDLE_BIN_PATH"] = File.expand_path("../../../bin/bundle", __FILE__)
129
+ end
130
+
131
+ # Set PATH
132
+ paths = (ENV["PATH"] || "").split(File::PATH_SEPARATOR)
133
+ paths.unshift "#{Bundler.bundle_path}/bin"
134
+ ENV["PATH"] = paths.uniq.join(File::PATH_SEPARATOR)
135
+
136
+ # Set BUNDLE_GEMFILE
137
+ ENV["BUNDLE_GEMFILE"] = default_gemfile.to_s
138
+
139
+ # Set RUBYOPT
140
+ rubyopt = [ENV["RUBYOPT"]].compact
141
+ if rubyopt.empty? || rubyopt.first !~ /-rbundler\/setup/
142
+ rubyopt.unshift "-rbundler/setup"
143
+ rubyopt.unshift "-I#{File.expand_path('../..', __FILE__)}"
144
+ ENV["RUBYOPT"] = rubyopt.join(' ')
145
+ end
146
+ end
123
147
  end
124
148
  end
data/lib/bundler/setup.rb CHANGED
@@ -12,4 +12,4 @@ if Bundler::SharedHelpers.in_bundle?
12
12
  # Add bundler to the load path after disabling system gems
13
13
  bundler_lib = File.expand_path("../..", __FILE__)
14
14
  $LOAD_PATH.unshift(bundler_lib) unless $LOAD_PATH.include?(bundler_lib)
15
- end
15
+ end
@@ -118,9 +118,14 @@ module Bundler
118
118
 
119
119
  # OMG more hacks
120
120
  gem_class = (class << Gem ; self ; end)
121
+ gem_class.send(:define_method, :refresh) { }
121
122
  gem_class.send(:define_method, :bin_path) do |name, *args|
122
123
  exec_name, *reqs = args
123
124
 
125
+ if exec_name == 'bundle'
126
+ return ENV['BUNDLE_BIN_PATH']
127
+ end
128
+
124
129
  spec = nil
125
130
 
126
131
  if exec_name
@@ -141,4 +146,4 @@ module Bundler
141
146
 
142
147
  extend self
143
148
  end
144
- end
149
+ end
@@ -305,7 +305,7 @@ module Bundler
305
305
  end
306
306
 
307
307
  def eql?(o)
308
- Path === o &&
308
+ o.instance_of?(Path) &&
309
309
  path == o.path &&
310
310
  name == o.name &&
311
311
  version == o.version
@@ -2,5 +2,5 @@ module Bundler
2
2
  # We're doing this because we might write tests that deal
3
3
  # with other versions of bundler and we are unsure how to
4
4
  # handle this better.
5
- VERSION = "1.0.0.beta.8" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.0.0.beta.9" unless defined?(::Bundler::VERSION)
6
6
  end
metadata CHANGED
@@ -7,8 +7,8 @@ version: !ruby/object:Gem::Version
7
7
  - 0
8
8
  - 0
9
9
  - beta
10
- - 8
11
- version: 1.0.0.beta.8
10
+ - 9
11
+ version: 1.0.0.beta.9
12
12
  platform: ruby
13
13
  authors:
14
14
  - Carl Lerche
@@ -18,14 +18,13 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2010-07-20 00:00:00 -07:00
21
+ date: 2010-07-21 00:00:00 -07:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
25
25
  name: rspec
26
26
  prerelease: false
27
27
  requirement: &id001 !ruby/object:Gem::Requirement
28
- none: false
29
28
  requirements:
30
29
  - - ">="
31
30
  - !ruby/object:Gem::Version
@@ -103,7 +102,6 @@ rdoc_options: []
103
102
  require_paths:
104
103
  - lib
105
104
  required_ruby_version: !ruby/object:Gem::Requirement
106
- none: false
107
105
  requirements:
108
106
  - - ">="
109
107
  - !ruby/object:Gem::Version
@@ -111,7 +109,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
111
109
  - 0
112
110
  version: "0"
113
111
  required_rubygems_version: !ruby/object:Gem::Requirement
114
- none: false
115
112
  requirements:
116
113
  - - ">="
117
114
  - !ruby/object:Gem::Version
@@ -123,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
120
  requirements: []
124
121
 
125
122
  rubyforge_project: bundler
126
- rubygems_version: 1.3.7
123
+ rubygems_version: 1.3.6
127
124
  signing_key:
128
125
  specification_version: 3
129
126
  summary: The best way to manage your application's dependencies