bundler 1.3.0.pre.6 → 1.3.0.pre.7
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 +8 -1
- data/lib/bundler/installer.rb +3 -3
- data/lib/bundler/version.rb +1 -1
- data/spec/other/binstubs_spec.rb +33 -0
- metadata +2 -2
data/CHANGELOG.md
CHANGED
data/lib/bundler/installer.rb
CHANGED
@@ -127,9 +127,9 @@ module Bundler
|
|
127
127
|
end
|
128
128
|
|
129
129
|
def generate_bundler_executable_stubs(spec, options = {})
|
130
|
-
if spec.executables.empty?
|
130
|
+
if options[:binstubs_cmd] && spec.executables.empty?
|
131
131
|
options = {}
|
132
|
-
spec.
|
132
|
+
spec.runtime_dependencies.each do |dep|
|
133
133
|
bins = Bundler.definition.specs[dep].first.executables
|
134
134
|
options[dep.name] = bins unless bins.empty?
|
135
135
|
end
|
@@ -164,7 +164,7 @@ module Bundler
|
|
164
164
|
end
|
165
165
|
end
|
166
166
|
|
167
|
-
if options[:binstubs_cmd] &&
|
167
|
+
if options[:binstubs_cmd] && exists.any?
|
168
168
|
case exists.size
|
169
169
|
when 1
|
170
170
|
Bundler.ui.warn "Skipped #{exists[0]} since it already exists."
|
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.3.0.pre.
|
5
|
+
VERSION = "1.3.0.pre.7" unless defined?(::Bundler::VERSION)
|
6
6
|
end
|
data/spec/other/binstubs_spec.rb
CHANGED
@@ -133,4 +133,37 @@ describe "bundle binstubs <gem>" do
|
|
133
133
|
end
|
134
134
|
end
|
135
135
|
end
|
136
|
+
|
137
|
+
context "when the gem has no bins" do
|
138
|
+
it "suggests child gems if they have bins" do
|
139
|
+
install_gemfile <<-G
|
140
|
+
source "file://#{gem_repo1}"
|
141
|
+
gem "rack-obama"
|
142
|
+
G
|
143
|
+
|
144
|
+
bundle "binstubs rack-obama"
|
145
|
+
expect(out).to include('rack-obama has no executables')
|
146
|
+
expect(out).to include('rack has: rackup')
|
147
|
+
end
|
148
|
+
|
149
|
+
it "works if child gems don't have bins" do
|
150
|
+
install_gemfile <<-G
|
151
|
+
source "file://#{gem_repo1}"
|
152
|
+
gem "actionpack"
|
153
|
+
G
|
154
|
+
|
155
|
+
bundle "binstubs actionpack"
|
156
|
+
expect(out).to include('no executables for the gem actionpack')
|
157
|
+
end
|
158
|
+
|
159
|
+
it "works if the gem has development dependencies" do
|
160
|
+
install_gemfile <<-G
|
161
|
+
source "file://#{gem_repo1}"
|
162
|
+
gem "with_development_dependency"
|
163
|
+
G
|
164
|
+
|
165
|
+
bundle "binstubs with_development_dependency"
|
166
|
+
expect(out).to include('no executables for the gem with_development_dependency')
|
167
|
+
end
|
168
|
+
end
|
136
169
|
end
|