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.
- data/CHANGELOG.md +10 -0
- data/lib/bundler/cli.rb +1 -0
- data/lib/bundler/dependency.rb +2 -2
- data/lib/bundler/runtime.rb +3 -1
- data/lib/bundler/version.rb +1 -1
- data/man/bundle-platform.ronn +42 -0
- data/man/bundle.ronn +3 -0
- data/man/index.txt +1 -0
- data/spec/runtime/require_spec.rb +40 -0
- metadata +7 -6
data/CHANGELOG.md
CHANGED
data/lib/bundler/cli.rb
CHANGED
data/lib/bundler/dependency.rb
CHANGED
@@ -87,7 +87,7 @@ module Bundler
|
|
87
87
|
end
|
88
88
|
|
89
89
|
def ruby_19?
|
90
|
-
ruby? && RUBY_VERSION >= "1.9"
|
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"
|
102
|
+
mri? && RUBY_VERSION >= "1.9"
|
103
103
|
end
|
104
104
|
|
105
105
|
def rbx?
|
data/lib/bundler/runtime.rb
CHANGED
@@ -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
|
-
|
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 }
|
data/lib/bundler/version.rb
CHANGED
@@ -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
|
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).
|
data/man/bundle.ronn
CHANGED
@@ -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
|
data/man/index.txt
CHANGED
@@ -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:
|
5
|
-
prerelease:
|
4
|
+
hash: 31
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
9
|
- 0
|
10
|
-
|
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-
|
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
|