bundler 1.2.0.rc.2 → 1.2.0

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.

@@ -1,3 +1,13 @@
1
+ ## 1.2.0 (Aug 30, 2012)
2
+
3
+ Bugfixes:
4
+
5
+ - raise original error message from LoadError's
6
+
7
+ Documentation:
8
+
9
+ - `platform` man pages
10
+
1
11
  ## 1.2.0.rc.2 (Aug 8, 2012)
2
12
 
3
13
  Bugfixes:
@@ -34,6 +34,7 @@ module Bundler
34
34
  bundle-install
35
35
  bundle-package
36
36
  bundle-update
37
+ bundle-platform
37
38
  gemfile.5)
38
39
 
39
40
  if manpages.include?(command)
@@ -87,7 +87,7 @@ module Bundler
87
87
  end
88
88
 
89
89
  def ruby_19?
90
- ruby? && RUBY_VERSION >= "1.9" && RUBY_VERSION < "2.0"
90
+ ruby? && RUBY_VERSION >= "1.9"
91
91
  end
92
92
 
93
93
  def mri?
@@ -99,7 +99,7 @@ module Bundler
99
99
  end
100
100
 
101
101
  def mri_19?
102
- mri? && RUBY_VERSION >= "1.9" && RUBY_VERSION < "2.0"
102
+ mri? && RUBY_VERSION >= "1.9"
103
103
  end
104
104
 
105
105
  def rbx?
@@ -74,7 +74,9 @@ module Bundler
74
74
  Kernel.require namespaced_file
75
75
  rescue LoadError
76
76
  REGEXPS.find { |r| r =~ e.message }
77
- raise if dep.autorequire || $1.gsub('-', '/') != namespaced_file
77
+ regex_name = $1
78
+ raise if dep.autorequire || (regex_name && regex_name.gsub('-', '/') != namespaced_file)
79
+ raise e if regex_name.nil?
78
80
  end
79
81
  else
80
82
  REGEXPS.find { |r| r =~ e.message }
@@ -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.0.rc.2" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.2.0" unless defined?(::Bundler::VERSION)
6
6
  end
@@ -0,0 +1,42 @@
1
+ bundle-platform(1) -- Displays platform compatibility information
2
+ =================================================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ `bundle platform` [--ruby]
7
+
8
+ ## DESCRIPTION
9
+
10
+ `platform` will display information from your Gemfile, Gemfile.lock, and Ruby
11
+ VM about your platform.
12
+
13
+ For instance, using this Gemfile(5):
14
+
15
+ source "http://rubygems.org"
16
+
17
+ ruby "1.9.3"
18
+
19
+ gem "rack"
20
+
21
+ If you run `bundle platform` on Ruby 1.9.3, it will display the following output:
22
+
23
+ Your platform is: x86_64-linux
24
+
25
+ Your app has gems that work on these platforms:
26
+ * ruby
27
+
28
+ Your Gemfile specifies a Ruby version requirement:
29
+ * ruby 1.9.3
30
+
31
+ Your current platform satisfies the Ruby version requirement.
32
+
33
+ `platform` will list all the platforms in your `Gemfile.lock` as well as the
34
+ `ruby` directive if applicable from your Gemfile(5). It will also let you know
35
+ if the `ruby` directive requirement has been met. If `ruby` directive doesn't
36
+ match the running Ruby VM, it will tell you what part does not.
37
+
38
+ ## OPTIONS
39
+
40
+ * `--ruby`:
41
+ It will just display the ruby directive information, so you don't have to
42
+ parse it from the Gemfile(5).
@@ -73,6 +73,9 @@ We divide `bundle` subcommands into primary commands and utilities.
73
73
  * `bundle gem(1)`:
74
74
  Create a simple gem, suitable for development with bundler
75
75
 
76
+ * `bundle platform(1)`:
77
+ Displays platform compatibility information
78
+
76
79
  ## OBSOLETE
77
80
 
78
81
  These commands are obsolete and should no longer be used
@@ -4,3 +4,4 @@ bundle-update bundle-update.1
4
4
  bundle-package bundle-package.1
5
5
  bundle-exec bundle-exec.1
6
6
  bundle-config bundle-config.1
7
+ bundle-platform bundle-platform.1
@@ -107,6 +107,24 @@ describe "Bundler.require" do
107
107
  out.should eq("jquery/rails")
108
108
  end
109
109
 
110
+ it "silently passes if the require fails" do
111
+ build_lib "bcrypt-ruby", "1.0.0", :no_default => true do |s|
112
+ s.write "lib/brcrypt.rb", "BCrypt = '1.0.0'"
113
+ end
114
+ gemfile <<-G
115
+ path "#{lib_path}"
116
+ gem "bcrypt-ruby"
117
+ G
118
+
119
+ cmd = <<-RUBY
120
+ require 'bundler'
121
+ Bundler.require
122
+ RUBY
123
+ ruby(cmd, :expect_err => true)
124
+
125
+ err.should be_empty
126
+ end
127
+
110
128
  it "does not mangle explictly given requires" do
111
129
  gemfile <<-G
112
130
  path "#{lib_path}"
@@ -118,6 +136,28 @@ describe "Bundler.require" do
118
136
  R
119
137
  err.should == "ZOMG LOAD ERROR"
120
138
  end
139
+
140
+ it "handles the case where regex fails" do
141
+ build_lib "load-fuuu", "1.0.0" do |s|
142
+ s.write "lib/load-fuuu.rb", "raise LoadError.new(\"Could not open library 'libfuuu-1.0': libfuuu-1.0: cannot open shared object file: No such file or directory.\")"
143
+ end
144
+
145
+ gemfile <<-G
146
+ path "#{lib_path}"
147
+ gem "load-fuuu"
148
+ G
149
+
150
+ cmd = <<-RUBY
151
+ begin
152
+ Bundler.require
153
+ rescue LoadError => e
154
+ $stderr.puts "ZOMG LOAD ERROR" if e.message.include?("Could not open library 'libfuuu-1.0'")
155
+ end
156
+ RUBY
157
+ run(cmd, :expect_err => true)
158
+
159
+ err.should == "ZOMG LOAD ERROR"
160
+ end
121
161
  end
122
162
 
123
163
  describe "using bundle exec" do
metadata CHANGED
@@ -1,15 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler
3
3
  version: !ruby/object:Gem::Version
4
- hash: -430324494
5
- prerelease: 6
4
+ hash: 31
5
+ prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
9
  - 0
10
- - rc
11
- - 2
12
- version: 1.2.0.rc.2
10
+ version: 1.2.0
13
11
  platform: ruby
14
12
  authors:
15
13
  - "Andr\xC3\xA9 Arko"
@@ -20,7 +18,7 @@ autorequire:
20
18
  bindir: bin
21
19
  cert_chain: []
22
20
 
23
- date: 2012-08-09 00:00:00 Z
21
+ date: 2012-08-30 00:00:00 Z
24
22
  dependencies:
25
23
  - !ruby/object:Gem::Dependency
26
24
  name: ronn
@@ -159,6 +157,7 @@ files:
159
157
  - man/bundle-exec.ronn
160
158
  - man/bundle-install.ronn
161
159
  - man/bundle-package.ronn
160
+ - man/bundle-platform.ronn
162
161
  - man/bundle-update.ronn
163
162
  - man/bundle.ronn
164
163
  - man/gemfile.5.ronn
@@ -245,12 +244,14 @@ files:
245
244
  - lib/bundler/man/bundle
246
245
  - lib/bundler/man/bundle-install
247
246
  - lib/bundler/man/gemfile.5
247
+ - lib/bundler/man/bundle-platform
248
248
  - lib/bundler/man/bundle-package
249
249
  - lib/bundler/man/bundle-update
250
250
  - lib/bundler/man/bundle-exec.txt
251
251
  - lib/bundler/man/gemfile.5.txt
252
252
  - lib/bundler/man/bundle-update.txt
253
253
  - lib/bundler/man/bundle-config
254
+ - lib/bundler/man/bundle-platform.txt
254
255
  - lib/bundler/man/bundle-config.txt
255
256
  - lib/bundler/man/bundle.txt
256
257
  - lib/bundler/man/bundle-package.txt