bundler 1.2.1 → 1.2.2

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.

@@ -2,6 +2,8 @@ before_script:
2
2
  - sudo apt-get install groff -y
3
3
  - rake spec:deps
4
4
 
5
+ # Rubygems versions MUST be available as rake tasks
6
+ # see Rakefile:66 for the list of possible RGV values
5
7
  env:
6
8
  - RGV=v1.3.6
7
9
  - RGV=v1.3.7
@@ -9,24 +11,41 @@ env:
9
11
  - RGV=v1.5.3
10
12
  - RGV=v1.6.2
11
13
  - RGV=v1.7.2
12
- - RGV=v1.8.10
14
+ - RGV=v1.8.24
13
15
 
14
16
  language: ruby
15
17
 
16
18
  matrix:
17
19
  exclude:
18
- - rvm: 1.9.2
20
+ # 2.0.0-preview1 shipped with Rubygems 1.8.24, so start there.
21
+ - rvm: 2.0.0-preview1
22
+ env: RGV=v1.4.2
23
+ - rvm: 2.0.0-preview1
19
24
  env: RGV=v1.3.6
20
- - rvm: 1.9.2
25
+ - rvm: 2.0.0-preview1
21
26
  env: RGV=v1.3.7
22
- - rvm: 1.9.2
27
+ - rvm: 2.0.0-preview1
23
28
  env: RGV=v1.4.2
29
+ - rvm: 2.0.0-preview1
30
+ env: RGV=v1.5.3
31
+ - rvm: 2.0.0-preview1
32
+ env: RGV=v1.6.2
33
+ - rvm: 2.0.0-preview1
34
+ env: RGV=v1.7.2
35
+ # 1.9.2 and 1.9.3 both shipped with Rubygems 1.3.7
36
+ # Unfortunately, Rubygems 1.4 wasn't compatible.
24
37
  - rvm: 1.9.3
25
38
  env: RGV=v1.3.6
26
39
  - rvm: 1.9.3
27
40
  env: RGV=v1.3.7
28
41
  - rvm: 1.9.3
29
42
  env: RGV=v1.4.2
43
+ - rvm: 1.9.2
44
+ env: RGV=v1.3.6
45
+ - rvm: 1.9.2
46
+ env: RGV=v1.3.7
47
+ - rvm: 1.9.2
48
+ env: RGV=v1.4.2
30
49
 
31
50
  notifications:
32
51
  email:
@@ -35,8 +54,8 @@ notifications:
35
54
  - sferik@gmail.com
36
55
 
37
56
  rvm:
38
- - 1.8.7
39
- - 1.9.2
40
57
  - 1.9.3
58
+ - 1.9.2
59
+ - 1.8.7
41
60
 
42
61
  script: rake spec:travis
@@ -1,4 +1,12 @@
1
- ## 1.2.1
1
+ ## 1.2.2 (Nov 14, 2012)
2
+
3
+ Bugfixes:
4
+
5
+ - support new Psych::SyntaxError for Ruby 2.0.0 (@tenderlove, @sol)
6
+ - `bundle viz` works with git gems again (@hirochachacha)
7
+ - recognize more cases when OpenSSL is not present
8
+
9
+ ## 1.2.1 (Sep 19, 2012)
2
10
 
3
11
  Bugfixes:
4
12
 
data/Rakefile CHANGED
@@ -63,7 +63,7 @@ begin
63
63
  namespace :rubygems do
64
64
  # Rubygems specs by version
65
65
  rubyopt = ENV["RUBYOPT"]
66
- %w(master v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.10).each do |rg|
66
+ %w(master v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.24).each do |rg|
67
67
  desc "Run specs with Rubygems #{rg}"
68
68
  RSpec::Core::RakeTask.new(rg) do |t|
69
69
  t.rspec_opts = %w(-fs --color)
@@ -292,8 +292,7 @@ module Bundler
292
292
  contents = File.read(path.basename.to_s)
293
293
  begin
294
294
  Gem::Specification.from_yaml(contents)
295
- # Raises ArgumentError if the file is not valid YAML
296
- rescue ArgumentError, SyntaxError, Gem::EndOfYAMLException, Gem::Exception
295
+ rescue YamlSyntaxError, Gem::EndOfYAMLException, Gem::Exception
297
296
  begin
298
297
  eval(contents, TOPLEVEL_BINDING, path.expand_path.to_s)
299
298
  rescue LoadError, SyntaxError => e
@@ -107,16 +107,6 @@ module Bundler
107
107
  end
108
108
 
109
109
  index
110
- rescue LoadError => e
111
- if e.message.include?("cannot load such file -- openssl")
112
- raise InstallError,
113
- "\nCould not load OpenSSL." \
114
- "\nYou must recompile Ruby with OpenSSL support or change the sources in your" \
115
- "\nGemfile from 'https' to 'http'. Instructions for compiling with OpenSSL" \
116
- "\nusing RVM are available at rvm.io/packages/openssl."
117
- else
118
- raise e
119
- end
120
110
  end
121
111
 
122
112
  # fetch index
@@ -12,6 +12,19 @@ module Bundler
12
12
  exit 1
13
13
  rescue SystemExit => e
14
14
  exit e.status
15
+ rescue LoadError => e
16
+ case e.message
17
+ when /cannot load such file -- openssl/, /openssl.so/, /libcrypto.so/
18
+ Bundler.ui.error "\nCould not load OpenSSL."
19
+ Bundler.ui.warn "You must recompile Ruby with OpenSSL support or change the sources in your" \
20
+ "\nGemfile from 'https' to 'http'. Instructions for compiling with OpenSSL" \
21
+ "\nusing RVM are available at rvm.io/packages/openssl."
22
+ Bundler.ui.debug "#{e.class}: #{e.message}"
23
+ Bundler.ui.debug e.backtrace.join("\n")
24
+ exit 1
25
+ else
26
+ raise e
27
+ end
15
28
  rescue Exception => e
16
29
  Bundler.ui.error(
17
30
  "Unfortunately, a fatal error has occurred. Please see the Bundler \n" \
@@ -15,6 +15,7 @@ module Bundler
15
15
  @node_options = {}
16
16
  @edge_options = {}
17
17
 
18
+ _patching_gem_dependency_class
18
19
  _populate_relations
19
20
  end
20
21
 
@@ -27,7 +28,6 @@ module Bundler
27
28
  private
28
29
 
29
30
  def _populate_relations
30
- relations = Hash.new {|h, k| h[k] = Set.new}
31
31
  parent_dependencies = _groups.values.to_set.flatten
32
32
  while true
33
33
  if parent_dependencies.empty?
@@ -36,7 +36,6 @@ module Bundler
36
36
  tmp = Set.new
37
37
  parent_dependencies.each do |dependency|
38
38
  child_dependencies = dependency.to_spec.runtime_dependencies.to_set
39
- relations[dependency.name] += child_dependencies.to_set
40
39
  @relations[dependency.name] += child_dependencies.map(&:name).to_set
41
40
  tmp += child_dependencies
42
41
 
@@ -48,7 +47,6 @@ module Bundler
48
47
  parent_dependencies = tmp
49
48
  end
50
49
  end
51
- @relations
52
50
  end
53
51
 
54
52
  def _groups
@@ -87,6 +85,27 @@ module Bundler
87
85
  label.nil? ? {} : { :label => label }
88
86
  end
89
87
 
88
+ def _patching_gem_dependency_class
89
+ # method borrow from rubygems/dependency.rb
90
+ # redefinition of matching_specs will also redefine to_spec and to_specs
91
+ Gem::Dependency.class_eval do
92
+ def matching_specs platform_only = false
93
+ matches = Bundler.load.specs.select { |spec|
94
+ self.name === spec.name and # TODO: == instead of ===
95
+ requirement.satisfied_by? spec.version
96
+ }
97
+
98
+ if platform_only
99
+ matches.reject! { |spec|
100
+ not Gem::Platform.match spec.platform
101
+ }
102
+ end
103
+
104
+ matches = matches.sort_by { |s| s.sort_obj } # HACK: shouldn't be needed
105
+ end
106
+ end
107
+ end
108
+
90
109
  class GraphVizClient
91
110
  def initialize(graph_instance)
92
111
  @graph_name = graph_instance.class::GRAPH_NAME
@@ -1,15 +1,27 @@
1
- # Psych could be a gem
1
+ # Psych could be a gem, so try to ask for it
2
2
  begin
3
3
  gem 'psych'
4
- rescue Gem::LoadError
5
- end if defined?(Gem)
4
+ rescue LoadError
5
+ end if defined?(gem)
6
6
 
7
- # Psych could be a stdlib
7
+ # Psych could just be in the stdlib
8
+ # but it's too late if Syck is already loaded
8
9
  begin
9
- # it's too late if Syck is already loaded
10
10
  require 'psych' unless defined?(Syck)
11
11
  rescue LoadError
12
+ # Apparently Psych wasn't available. Oh well.
12
13
  end
13
14
 
14
- # Psych might NOT EXIST AT ALL
15
+ # At least load the YAML stdlib, whatever that may be
15
16
  require 'yaml'
17
+
18
+ module Bundler
19
+ # On encountering invalid YAML,
20
+ # Psych raises Psych::SyntaxError
21
+ # Syck raises ArgumentError
22
+ if defined?(::Psych::SyntaxError)
23
+ YamlSyntaxError = ::Psych::SyntaxError
24
+ else
25
+ YamlSyntaxError = ::ArgumentError
26
+ end
27
+ end
@@ -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.2.1" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.2.2" unless defined?(::Bundler::VERSION)
6
6
  end
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+ require 'bundler'
3
+
4
+ describe Bundler do
5
+ describe "#load_gemspec_uncached" do
6
+ it "should catch Psych syntax errors" do
7
+ gemspec = <<-GEMSPEC
8
+ {:!00 ao=gu\g1= 7~f
9
+ GEMSPEC
10
+ File.open(tmp("test.gemspec"), 'wb') do |file|
11
+ file.puts gemspec
12
+ end
13
+
14
+ proc {
15
+ Bundler.load_gemspec_uncached(tmp("test.gemspec"))
16
+ }.should raise_error(Bundler::GemspecError)
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ describe Bundler::YamlSyntaxError do
4
+ it "is raised on YAML parse errors" do
5
+ expect{ YAML.parse "{foo" }.to raise_error(Bundler::YamlSyntaxError)
6
+ end
7
+ end
@@ -41,7 +41,7 @@ describe "real world edgecases", :realworld => true do
41
41
  gemfile <<-G
42
42
  source :rubygems
43
43
 
44
- gem 'rack', '1.0.0'
44
+ gem 'rack', '1.0.1'
45
45
  G
46
46
 
47
47
  bundle "install --path vendor/bundle", :expect_err => true
metadata CHANGED
@@ -1,64 +1,60 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: bundler
3
- version: !ruby/object:Gem::Version
4
- hash: 29
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.2
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 2
9
- - 1
10
- version: 1.2.1
11
6
  platform: ruby
12
- authors:
13
- - "Andr\xC3\xA9 Arko"
7
+ authors:
8
+ - André Arko
14
9
  - Terence Lee
15
10
  - Carl Lerche
16
11
  - Yehuda Katz
17
12
  autorequire:
18
13
  bindir: bin
19
14
  cert_chain: []
20
-
21
- date: 2012-09-19 00:00:00 Z
22
- dependencies:
23
- - !ruby/object:Gem::Dependency
15
+ date: 2012-11-15 00:00:00.000000000 Z
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
24
18
  name: ronn
25
- prerelease: false
26
- requirement: &id001 !ruby/object:Gem::Requirement
19
+ requirement: !ruby/object:Gem::Requirement
27
20
  none: false
28
- requirements:
29
- - - ">="
30
- - !ruby/object:Gem::Version
31
- hash: 3
32
- segments:
33
- - 0
34
- version: "0"
21
+ requirements:
22
+ - - ! '>='
23
+ - !ruby/object:Gem::Version
24
+ version: '0'
35
25
  type: :development
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: rspec
39
26
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ - !ruby/object:Gem::Dependency
34
+ name: rspec
35
+ requirement: !ruby/object:Gem::Requirement
41
36
  none: false
42
- requirements:
37
+ requirements:
43
38
  - - ~>
44
- - !ruby/object:Gem::Version
45
- hash: 3
46
- segments:
47
- - 2
48
- - 0
49
- version: "2.0"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.0'
50
41
  type: :development
51
- version_requirements: *id002
52
- description: Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably
53
- email:
42
+ prerelease: false
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ~>
47
+ - !ruby/object:Gem::Version
48
+ version: '2.0'
49
+ description: Bundler manages an application's dependencies through its entire life,
50
+ across many machines, systematically and repeatably
51
+ email:
54
52
  - andre@arko.net
55
- executables:
53
+ executables:
56
54
  - bundle
57
55
  extensions: []
58
-
59
56
  extra_rdoc_files: []
60
-
61
- files:
57
+ files:
62
58
  - .gitignore
63
59
  - .travis.yml
64
60
  - CHANGELOG.md
@@ -162,9 +158,11 @@ files:
162
158
  - man/bundle.ronn
163
159
  - man/gemfile.5.ronn
164
160
  - man/index.txt
161
+ - spec/bundler/bundler_spec.rb
165
162
  - spec/bundler/definition_spec.rb
166
163
  - spec/bundler/dsl_spec.rb
167
164
  - spec/bundler/gem_helper_spec.rb
165
+ - spec/bundler/psyched_yaml_spec.rb
168
166
  - spec/bundler/source_spec.rb
169
167
  - spec/cache/gems_spec.rb
170
168
  - spec/cache/git_spec.rb
@@ -241,58 +239,125 @@ files:
241
239
  - spec/update/gems_spec.rb
242
240
  - spec/update/git_spec.rb
243
241
  - spec/update/source_spec.rb
244
- - lib/bundler/man/bundle-exec
245
242
  - lib/bundler/man/bundle
243
+ - lib/bundler/man/bundle-config
244
+ - lib/bundler/man/bundle-config.txt
245
+ - lib/bundler/man/bundle-exec
246
+ - lib/bundler/man/bundle-exec.txt
246
247
  - lib/bundler/man/bundle-install
247
- - lib/bundler/man/gemfile.5
248
- - lib/bundler/man/bundle-platform
248
+ - lib/bundler/man/bundle-install.txt
249
249
  - lib/bundler/man/bundle-package
250
+ - lib/bundler/man/bundle-package.txt
251
+ - lib/bundler/man/bundle-platform
252
+ - lib/bundler/man/bundle-platform.txt
250
253
  - lib/bundler/man/bundle-update
251
- - lib/bundler/man/bundle-exec.txt
252
- - lib/bundler/man/gemfile.5.txt
253
254
  - lib/bundler/man/bundle-update.txt
254
- - lib/bundler/man/bundle-config
255
- - lib/bundler/man/bundle-platform.txt
256
- - lib/bundler/man/bundle-config.txt
257
255
  - lib/bundler/man/bundle.txt
258
- - lib/bundler/man/bundle-package.txt
259
- - lib/bundler/man/bundle-install.txt
256
+ - lib/bundler/man/gemfile.5
257
+ - lib/bundler/man/gemfile.5.txt
260
258
  homepage: http://gembundler.com
261
259
  licenses: []
262
-
263
260
  post_install_message:
264
261
  rdoc_options: []
265
-
266
- require_paths:
262
+ require_paths:
267
263
  - lib
268
- required_ruby_version: !ruby/object:Gem::Requirement
264
+ required_ruby_version: !ruby/object:Gem::Requirement
269
265
  none: false
270
- requirements:
271
- - - ">="
272
- - !ruby/object:Gem::Version
273
- hash: 57
274
- segments:
275
- - 1
276
- - 8
277
- - 7
266
+ requirements:
267
+ - - ! '>='
268
+ - !ruby/object:Gem::Version
278
269
  version: 1.8.7
279
- required_rubygems_version: !ruby/object:Gem::Requirement
270
+ required_rubygems_version: !ruby/object:Gem::Requirement
280
271
  none: false
281
- requirements:
282
- - - ">="
283
- - !ruby/object:Gem::Version
284
- hash: 23
285
- segments:
286
- - 1
287
- - 3
288
- - 6
272
+ requirements:
273
+ - - ! '>='
274
+ - !ruby/object:Gem::Version
289
275
  version: 1.3.6
290
276
  requirements: []
291
-
292
277
  rubyforge_project: bundler
293
278
  rubygems_version: 1.8.24
294
279
  signing_key:
295
280
  specification_version: 3
296
281
  summary: The best way to manage your application's dependencies
297
- test_files: []
298
-
282
+ test_files:
283
+ - spec/bundler/bundler_spec.rb
284
+ - spec/bundler/definition_spec.rb
285
+ - spec/bundler/dsl_spec.rb
286
+ - spec/bundler/gem_helper_spec.rb
287
+ - spec/bundler/psyched_yaml_spec.rb
288
+ - spec/bundler/source_spec.rb
289
+ - spec/cache/gems_spec.rb
290
+ - spec/cache/git_spec.rb
291
+ - spec/cache/path_spec.rb
292
+ - spec/cache/platform_spec.rb
293
+ - spec/install/deploy_spec.rb
294
+ - spec/install/gems/c_ext_spec.rb
295
+ - spec/install/gems/dependency_api_spec.rb
296
+ - spec/install/gems/env_spec.rb
297
+ - spec/install/gems/flex_spec.rb
298
+ - spec/install/gems/groups_spec.rb
299
+ - spec/install/gems/packed_spec.rb
300
+ - spec/install/gems/platform_spec.rb
301
+ - spec/install/gems/post_install_spec.rb
302
+ - spec/install/gems/resolving_spec.rb
303
+ - spec/install/gems/simple_case_spec.rb
304
+ - spec/install/gems/standalone_spec.rb
305
+ - spec/install/gems/sudo_spec.rb
306
+ - spec/install/gems/win32_spec.rb
307
+ - spec/install/gemspec_spec.rb
308
+ - spec/install/git_spec.rb
309
+ - spec/install/invalid_spec.rb
310
+ - spec/install/path_spec.rb
311
+ - spec/install/upgrade_spec.rb
312
+ - spec/lock/git_spec.rb
313
+ - spec/lock/lockfile_spec.rb
314
+ - spec/other/check_spec.rb
315
+ - spec/other/clean_spec.rb
316
+ - spec/other/config_spec.rb
317
+ - spec/other/console_spec.rb
318
+ - spec/other/exec_spec.rb
319
+ - spec/other/ext_spec.rb
320
+ - spec/other/help_spec.rb
321
+ - spec/other/init_spec.rb
322
+ - spec/other/newgem_spec.rb
323
+ - spec/other/open_spec.rb
324
+ - spec/other/outdated_spec.rb
325
+ - spec/other/platform_spec.rb
326
+ - spec/other/show_spec.rb
327
+ - spec/quality_spec.rb
328
+ - spec/realworld/edgecases_spec.rb
329
+ - spec/resolver/basic_spec.rb
330
+ - spec/resolver/platform_spec.rb
331
+ - spec/runtime/executable_spec.rb
332
+ - spec/runtime/load_spec.rb
333
+ - spec/runtime/platform_spec.rb
334
+ - spec/runtime/require_spec.rb
335
+ - spec/runtime/setup_spec.rb
336
+ - spec/runtime/with_clean_env_spec.rb
337
+ - spec/spec_helper.rb
338
+ - spec/support/artifice/endopint_marshal_fail_basic_authentication.rb
339
+ - spec/support/artifice/endpoint.rb
340
+ - spec/support/artifice/endpoint_500.rb
341
+ - spec/support/artifice/endpoint_api_missing.rb
342
+ - spec/support/artifice/endpoint_basic_authentication.rb
343
+ - spec/support/artifice/endpoint_extra.rb
344
+ - spec/support/artifice/endpoint_extra_missing.rb
345
+ - spec/support/artifice/endpoint_fallback.rb
346
+ - spec/support/artifice/endpoint_marshal_fail.rb
347
+ - spec/support/artifice/endpoint_redirect.rb
348
+ - spec/support/artifice/endpoint_timeout.rb
349
+ - spec/support/builders.rb
350
+ - spec/support/fakeweb/rack-1.0.0.marshal
351
+ - spec/support/fakeweb/windows.rb
352
+ - spec/support/helpers.rb
353
+ - spec/support/indexes.rb
354
+ - spec/support/matchers.rb
355
+ - spec/support/path.rb
356
+ - spec/support/platforms.rb
357
+ - spec/support/ruby_ext.rb
358
+ - spec/support/rubygems_ext.rb
359
+ - spec/support/rubygems_hax/platform.rb
360
+ - spec/support/sudo.rb
361
+ - spec/update/gems_spec.rb
362
+ - spec/update/git_spec.rb
363
+ - spec/update/source_spec.rb