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.

@@ -1,4 +1,11 @@
1
- ## 1.3.0.pre.6 (January 22, 2013)
1
+ ## 1.3.0.pre.7 (22 January 2013)
2
+
3
+ Bugfixes:
4
+
5
+ - stubs for gems with dev deps no longer cause exceptions (#2272)
6
+ - don't suggest binstubs to --binstubs users
7
+
8
+ ## 1.3.0.pre.6 (22 January 2013)
2
9
 
3
10
  Features:
4
11
 
@@ -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.dependencies.each do |dep|
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] && !exists.empty?
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."
@@ -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.6" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.3.0.pre.7" unless defined?(::Bundler::VERSION)
6
6
  end
@@ -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
metadata CHANGED
@@ -7,8 +7,8 @@ version: !ruby/object:Gem::Version
7
7
  - 3
8
8
  - 0
9
9
  - pre
10
- - 6
11
- version: 1.3.0.pre.6
10
+ - 7
11
+ version: 1.3.0.pre.7
12
12
  platform: ruby
13
13
  authors:
14
14
  - "Andr\xC3\xA9 Arko"