bundler 1.3.0.pre.2 → 1.3.0.pre.3

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/.travis.yml CHANGED
@@ -35,7 +35,7 @@ matrix:
35
35
  env: RGV=master
36
36
  # 2.0 release track
37
37
  - rvm: 2.0.0-preview2
38
- env: RGV=v2.0.0.preview2
38
+ env: RGV=v2.0.0.preview2.2
39
39
  # Bundler 1.x supports Rubygems down to 1.5.3 on Ruby 1.9.3
40
40
  - rvm: 1.9.3
41
41
  env: RGV=v1.7.2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## 1.3.0.pre.3
2
+
3
+ Features:
4
+
5
+ - pushing gems during `rake release` can be disabled (@trans)
6
+ - installing gems with `rake install` is much faster (@utkarshkukreti)
7
+
8
+ Bugfixes:
9
+
10
+ - :git gems with extensions now work with Rubygems >= 2.0 (@jeremy)
11
+ - `outdated` exits non-zero if outdated gems found (@rohit, #2021)
12
+ - https Gist URLs for compatibility with Gist 2.0 (@NARKOZ)
13
+ - namespaced gems no longer generate a superfluous directory (@banyan)
14
+
1
15
  ## 1.3.0.pre.2 (Dec 9, 2012)
2
16
 
3
17
  Features:
data/CONTRIBUTE.md CHANGED
@@ -1,9 +1,9 @@
1
1
 
2
- Great to have you here! Here are a few ways you can help out with [Bundler](http://github.com/carlhuda/bundler)!
2
+ Great to have you here! Here are a few ways you can help out with [Bundler](http://github.com/carlhuda/bundler).
3
3
 
4
4
  # Learn & listen
5
5
 
6
- You can start learning about Bundler by reading [the documentation](http://gembundler.com). The best place to start learning about why Bundler exists and what it does is the [Understanding Bundler](http://gembundler.com/v1.2/rationale.html) page. Once you've read that, you can check out discussions about Bundler on the [Bundler mailing list](https://groups.google.com/forum/ruby-bundler) and in the [Bundler IRC channel](irc://irc.freenode.net/#bundler), which is #bundler on Freenode.
6
+ You can start learning about Bundler by reading [the documentation](http://gembundler.com). If you want, you can also read a (lengthy) explanation of [why Bundler exists and what it does](http://gembundler.com/v1.2/rationale.html). You can also check out discussions about Bundler on the [Bundler mailing list](https://groups.google.com/forum/ruby-bundler) and in the [Bundler IRC channel](irc://irc.freenode.net/#bundler), which is #bundler on Freenode.
7
7
 
8
8
  ## Core Team
9
9
 
data/CONTRIBUTING.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # Creating Issues
2
2
 
3
- If you're having a problem, please see [ISSUES](../ISSUES.md) for troubleshooting steps and a guide for how to submit a ticket that will help us solve the problem you are having as quickly as possible.
3
+ If you're having a problem, please see [ISSUES](https://github.com/carlhuda/bundler/blob/master/ISSUES.md) for troubleshooting steps and a guide for how to submit a ticket that will help us solve the problem you are having as quickly as possible.
4
4
 
5
5
  # Discussing Bundler
6
6
 
7
- If you'd like to discuss features, ask questions, or just engage in general Bundler-focused discussion, please see the [#bundler](irc://irc.freenode.net/#bundler) IRC channel on Freenode, and the [Bundler mailing list](http://groups.google.com/ruby-bundler) on Google Groups.
7
+ If you'd like to discuss features, ask questions, or just engage in general Bundler-focused discussion, please see the [#bundler](irc://irc.freenode.net/#bundler) IRC channel on Freenode, and the [Bundler mailing list](http://groups.google.com/group/ruby-bundler) on Google Groups.
8
8
 
9
9
  # Helping Out
10
10
 
11
- If you'd like to help make Bundler better, you totally rock! Please check out the [CONTRIBUTE](../CONTRIBUTE.md) file for an introduction to the project, guidelines for contributing, and suggestions for things anyone can do that would be helpful.
11
+ If you'd like to help make Bundler better, you totally rock! Please check out the [CONTRIBUTE](https://github.com/carlhuda/bundler/blob/master/CONTRIBUTE.md) file for an introduction to the project, guidelines for contributing, and suggestions for things anyone can do that would be helpful.
12
12
 
13
13
  Thanks for helping us make Bundler better.
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Bundler: a gem to bundle gems [![Build Status](https://secure.travis-ci.org/carlhuda/bundler.png?branch=master)](http://travis-ci.org/carlhuda/bundler)
2
2
 
3
- Bundler manages the gems that a ruby application depends on. Given a list of gems, it can automatically download and install those gems, as well as any other gems needed by the gems that are listed. Before installing gems, it checks the versions of every gem to make sure that they are compatible, and can all be loaded at the same time. After the gems have been installed, Bundler can help you update some or all of them when new versions become available. Finally, it records the exact versions that have been installed, so that others can install the exact same gems.
3
+ Bundler keeps ruby applications running the same code on every machine.
4
4
 
5
- ### Installation and usage
5
+ It does this by managing the gems that the application depends on. Given a list of gems, it can automatically download and install those gems, as well as any other gems needed by the gems that are listed. Before installing gems, it checks the versions of every gem to make sure that they are compatible, and can all be loaded at the same time. After the gems have been installed, Bundler can help you update some or all of them when new versions become available. Finally, it records the exact versions that have been installed, so that others can install the exact same gems.
6
6
 
7
- See [gembundler.com](http://gembundler.com) for installation and usage instructions. tl;dr:
7
+ ### Installation and usage
8
8
 
9
9
  ```
10
10
  gem install bundler
@@ -14,10 +14,16 @@ bundle install
14
14
  bundle exec rails new myapp
15
15
  ```
16
16
 
17
+ See [gembundler.com](http://gembundler.com) for the full documentation.
18
+
17
19
  ### Troubleshooting
18
20
 
19
21
  For help with common problems, see [ISSUES](https://github.com/carlhuda/bundler/blob/master/ISSUES.md).
20
22
 
23
+ ### Contributing
24
+
25
+ If you'd like to contribute to Bundler, that's awesome, and we <3 you. There's a guide to contributing to Bundler (both code and general help) over in [CONTRIBUTE](https://github.com/carlhuda/bundler/blob/master/CONTRIBUTE.md)
26
+
21
27
  ### Development
22
28
 
23
29
  To see what has changed in recent versions of Bundler, see the [CHANGELOG](https://github.com/carlhuda/bundler/blob/master/CHANGELOG.md).
data/Rakefile CHANGED
@@ -93,7 +93,7 @@ begin
93
93
  namespace :rubygems do
94
94
  # Rubygems specs by version
95
95
  rubyopt = ENV["RUBYOPT"]
96
- %w(master v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.24 v2.0.0.preview2).each do |rg|
96
+ %w(master v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.24 v2.0.0.preview2.2).each do |rg|
97
97
  desc "Run specs with Rubygems #{rg}"
98
98
  RSpec::Core::RakeTask.new(rg) do |t|
99
99
  t.rspec_opts = %w(-fs --color)
data/lib/bundler.rb CHANGED
@@ -55,13 +55,11 @@ module Bundler
55
55
  class GitError < BundlerError; status_code(11) ; end
56
56
  class DeprecatedError < BundlerError; status_code(12) ; end
57
57
  class GemspecError < BundlerError; status_code(14) ; end
58
- class DslError < BundlerError; status_code(15) ; end
58
+ class InvalidOption < BundlerError; status_code(15) ; end
59
59
  class ProductionError < BundlerError; status_code(16) ; end
60
- class InvalidOption < DslError ; end
61
60
  class HTTPError < BundlerError; status_code(17) ; end
62
61
  class RubyVersionMismatch < BundlerError; status_code(18) ; end
63
62
 
64
-
65
63
  WINDOWS = RbConfig::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw)!
66
64
  FREEBSD = RbConfig::CONFIG["host_os"] =~ /bsd/
67
65
  NULL = WINDOWS ? "NUL" : "/dev/null"
data/lib/bundler/cli.rb CHANGED
@@ -334,7 +334,8 @@ module Bundler
334
334
  long_desc <<-D
335
335
  Outdated lists the names and versions of gems that have a newer version available
336
336
  in the given source. Calling outdated with [GEM [GEM]] will only check for newer
337
- versions of the given gems. By default, available prerelease gems will be ignored.
337
+ versions of the given gems. Prerelease gems are ignored by default. If your gems
338
+ are up to date, Bundler will exit with a status of 0. Otherwise, it will exit 1.
338
339
  D
339
340
  method_option "pre", :type => :boolean, :banner => "Check for newer pre-release gems"
340
341
  method_option "source", :type => :array, :banner => "Check against a specific source"
@@ -388,8 +389,11 @@ module Bundler
388
389
  Bundler.ui.debug "from #{active_spec.loaded_from}"
389
390
  end
390
391
 
391
- Bundler.ui.info "Your bundle is up to date!" if out_count < 1
392
- Bundler.ui.info ""
392
+ if out_count.zero?
393
+ Bundler.ui.info "Your bundle is up to date!\n"
394
+ else
395
+ exit 1
396
+ end
393
397
  end
394
398
 
395
399
  desc "cache", "Cache all the gems to vendor/cache", :hide => true
@@ -405,7 +409,7 @@ module Bundler
405
409
  rescue GemNotFound => e
406
410
  Bundler.ui.error(e.message)
407
411
  Bundler.ui.warn "Run `bundle install` to install missing gems."
408
- exit 128
412
+ exit 1
409
413
  end
410
414
 
411
415
  desc "package", "Locks and then caches all of the gems into vendor/cache"
@@ -576,7 +580,6 @@ module Bundler
576
580
  method_option :format, :type => :string, :default => "png", :aliases => '-F', :banner => "This is output format option. Supported format is png, jpg, svg, dot ..."
577
581
  def viz
578
582
  output_file = File.expand_path(options[:file])
579
- output_format = options[:format]
580
583
  graph = Graph.new(Bundler.load, output_file, options[:version], options[:requirements], options[:format])
581
584
 
582
585
  begin
@@ -605,7 +608,6 @@ module Bundler
605
608
  constant_name = name.split('_').map{|p| p[0..0].upcase + p[1..-1] }.join
606
609
  constant_name = constant_name.split('-').map{|q| q[0..0].upcase + q[1..-1] }.join('::') if constant_name =~ /-/
607
610
  constant_array = constant_name.split('::')
608
- FileUtils.mkdir_p(File.join(target, 'lib', name))
609
611
  git_user_name = `git config user.name`.chomp
610
612
  git_user_email = `git config user.email`.chomp
611
613
  opts = {
@@ -699,8 +701,8 @@ module Bundler
699
701
 
700
702
  # Build an array of Dependency objects out of the arguments
701
703
  deps = []
702
- gems.each_slice(2) do |name, version|
703
- deps << Bundler::Dependency.new(name, version)
704
+ gems.each_slice(2) do |gem_name, gem_version|
705
+ deps << Bundler::Dependency.new(gem_name, gem_version)
704
706
  end
705
707
 
706
708
  added = Injector.inject(deps)
@@ -12,15 +12,18 @@ module Bundler
12
12
  :ruby => Gem::Platform::RUBY,
13
13
  :ruby_18 => Gem::Platform::RUBY,
14
14
  :ruby_19 => Gem::Platform::RUBY,
15
+ :ruby_20 => Gem::Platform::RUBY,
15
16
  :mri => Gem::Platform::RUBY,
16
17
  :mri_18 => Gem::Platform::RUBY,
17
18
  :mri_19 => Gem::Platform::RUBY,
19
+ :mri_20 => Gem::Platform::RUBY,
18
20
  :rbx => Gem::Platform::RUBY,
19
21
  :jruby => Gem::Platform::JAVA,
20
22
  :mswin => Gem::Platform::MSWIN,
21
23
  :mingw => Gem::Platform::MINGW,
22
24
  :mingw_18 => Gem::Platform::MINGW,
23
- :mingw_19 => Gem::Platform::MINGW
25
+ :mingw_19 => Gem::Platform::MINGW,
26
+ :mingw_20 => Gem::Platform::MINGW
24
27
  }.freeze
25
28
 
26
29
  def initialize(name, version, options = {}, &blk)
@@ -90,6 +93,10 @@ module Bundler
90
93
  ruby? && RUBY_VERSION >= "1.9"
91
94
  end
92
95
 
96
+ def ruby_20?
97
+ ruby? && RUBY_VERSION >= "2.0"
98
+ end
99
+
93
100
  def mri?
94
101
  !mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby")
95
102
  end
@@ -102,6 +109,11 @@ module Bundler
102
109
  mri? && RUBY_VERSION >= "1.9"
103
110
  end
104
111
 
112
+
113
+ def mri_20?
114
+ mri? && RUBY_VERSION >= "2.0"
115
+ end
116
+
105
117
  def rbx?
106
118
  ruby? && defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
107
119
  end
@@ -130,5 +142,9 @@ module Bundler
130
142
  mingw? && RUBY_VERSION >= "1.9"
131
143
  end
132
144
 
145
+ def mingw_20?
146
+ mingw? && RUBY_VERSION >= "2.0"
147
+ end
148
+
133
149
  end
134
150
  end
data/lib/bundler/dsl.rb CHANGED
@@ -80,7 +80,7 @@ module Bundler
80
80
  elsif dep.type == :development
81
81
  return
82
82
  else
83
- raise DslError, "You cannot specify the same gem twice with different version requirements. \n" \
83
+ raise GemfileError, "You cannot specify the same gem twice with different version requirements. \n" \
84
84
  "You specified: #{current.name} (#{current.requirement}) and " \
85
85
  "#{dep.name} (#{dep.requirement})\n"
86
86
  end
@@ -92,7 +92,7 @@ module Bundler
92
92
  elsif dep.type == :development
93
93
  return
94
94
  else
95
- raise DslError, "You cannot specify the same gem twice coming from different sources.\n" \
95
+ raise GemfileError, "You cannot specify the same gem twice coming from different sources.\n" \
96
96
  "You specified that #{dep.name} (#{dep.requirement}) should come from " \
97
97
  "#{current.source || 'an unspecified source'} and #{dep.source}\n"
98
98
  end
@@ -227,16 +227,16 @@ module Bundler
227
227
  platforms.map! { |p| p.to_sym }
228
228
  platforms.each do |p|
229
229
  next if VALID_PLATFORMS.include?(p)
230
- raise DslError, "`#{p}` is not a valid platform. The available options are: #{VALID_PLATFORMS.inspect}"
230
+ raise GemfileError, "`#{p}` is not a valid platform. The available options are: #{VALID_PLATFORMS.inspect}"
231
231
  end
232
232
 
233
233
  if github = opts.delete("github")
234
- github = "#{github}/#{name}" unless github.include?("/")
234
+ github = "#{github}/#{github}" unless github.include?("/")
235
235
  opts["git"] = "git://github.com/#{github}.git"
236
236
  end
237
237
 
238
238
  if gist = opts.delete("gist")
239
- opts["git"] = "git://gist.github.com/#{gist}.git"
239
+ opts["git"] = "https://gist.github.com/#{gist}.git"
240
240
  end
241
241
 
242
242
  ["git", "path"].each do |type|
@@ -141,7 +141,7 @@ module Bundler
141
141
  response = @@connection.request(uri)
142
142
  rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, Errno::ETIMEDOUT,
143
143
  EOFError, SocketError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError,
144
- Errno::EAGAIN, Net::HTTP::Persistent::Error, Net::ProtocolError => e
144
+ Errno::EAGAIN, Net::HTTP::Persistent::Error, Net::ProtocolError
145
145
  raise HTTPError, "Network error while fetching #{uri}"
146
146
  end
147
147
 
@@ -64,7 +64,7 @@ module Bundler
64
64
 
65
65
  def install_gem
66
66
  built_gem_path = build_gem
67
- out, _ = sh_with_code("gem install '#{built_gem_path}'")
67
+ out, _ = sh_with_code("gem install '#{built_gem_path}' --local")
68
68
  raise "Couldn't install gem, run `gem install #{built_gem_path}' for more detailed output" unless out[/Successfully installed/]
69
69
  Bundler.ui.confirm "#{name} (#{version}) installed."
70
70
  end
@@ -73,7 +73,7 @@ module Bundler
73
73
  guard_clean
74
74
  built_gem_path = build_gem
75
75
  tag_version { git_push } unless already_tagged?
76
- rubygem_push(built_gem_path)
76
+ rubygem_push(built_gem_path) if gem_push?
77
77
  end
78
78
 
79
79
  protected
@@ -156,5 +156,9 @@ module Bundler
156
156
  }
157
157
  [outbuf, $?]
158
158
  end
159
+
160
+ def gem_push?
161
+ ! %w{n no nil false off 0}.include?(ENV['gem_push'].to_s.downcase)
162
+ end
159
163
  end
160
164
  end
@@ -17,10 +17,10 @@ module Bundler
17
17
 
18
18
  # Runs the install procedures for a specific Gemfile.
19
19
  #
20
- # Firstly, this method will check to see if Bundler.bundle_path exists
20
+ # Firstly, this method will check to see if Bundler.bundle_path exists
21
21
  # and if not then will create it. This is usually the location of gems
22
22
  # on the system, be it RVM or at a system path.
23
- #
23
+ #
24
24
  # Secondly, it checks if Bundler has been configured to be "frozen"
25
25
  # Frozen ensures that the Gemfile and the Gemfile.lock file are matching.
26
26
  # This stops a situation where a developer may update the Gemfile but may not run
@@ -28,7 +28,7 @@ module Bundler
28
28
  # If this file is not correctly updated then any other developer running
29
29
  # `bundle install` will potentially not install the correct gems.
30
30
  #
31
- # Thirdly, Bundler checks if there are any dependencies specified in the Gemfile using
31
+ # Thirdly, Bundler checks if there are any dependencies specified in the Gemfile using
32
32
  # Bundler::Environment#dependencies. If there are no dependencies specified then
33
33
  # Bundler returns a warning message stating so and this method returns.
34
34
  #
@@ -40,11 +40,11 @@ module Bundler
40
40
  # Fifthly, Bundler resolves the dependencies either through a cache of gems or by remote.
41
41
  # This then leads into the gems being installed, along with stubs for their executables,
42
42
  # but only if the --binstubs option has been passed or Bundler.options[:bin] has been set
43
- # earlier.
44
- #
43
+ # earlier.
44
+ #
45
45
  # Sixthly, a new Gemfile.lock is created from the installed gems to ensure that the next time
46
46
  # that a user runs `bundle install` they will receive any updates from this process.
47
- #
47
+ #
48
48
  # Finally: TODO add documentation for how the standalone process works.
49
49
  def run(options)
50
50
  # Create the BUNDLE_PATH directory
@@ -129,10 +129,11 @@ module Bundler
129
129
  end
130
130
 
131
131
  def generate_bundler_executable_stubs(spec)
132
- bin_path = Bundler.bin_path
133
- template = File.read(File.expand_path('../templates/Executable', __FILE__))
134
- relative_gemfile_path = Bundler.default_gemfile.relative_path_from(bin_path)
135
- ruby_command = Thor::Util.ruby_command
132
+ # double-assignment to avoid warnings about variables that will be used by ERB
133
+ bin_path = bin_path = Bundler.bin_path
134
+ template = template = File.read(File.expand_path('../templates/Executable', __FILE__))
135
+ relative_gemfile_path = relative_gemfile_path = Bundler.default_gemfile.relative_path_from(bin_path)
136
+ ruby_command = ruby_command = Thor::Util.ruby_command
136
137
 
137
138
  spec.executables.each do |executable|
138
139
  next if executable == "bundle"
@@ -143,14 +144,15 @@ module Bundler
143
144
  end
144
145
 
145
146
  def generate_standalone_bundler_executable_stubs(spec)
147
+ # double-assignment to avoid warnings about variables that will be used by ERB
146
148
  bin_path = Bundler.bin_path
147
149
  template = File.read(File.expand_path('../templates/Executable.standalone', __FILE__))
148
- ruby_command = Thor::Util.ruby_command
150
+ ruby_command = ruby_command = Thor::Util.ruby_command
149
151
 
150
152
  spec.executables.each do |executable|
151
153
  next if executable == "bundle"
152
- standalone_path = Pathname(Bundler.settings[:path]).expand_path.relative_path_from(bin_path)
153
- executable_path = Pathname(spec.full_gem_path).join(spec.bindir, executable).relative_path_from(bin_path)
154
+ standalone_path = standalone_path = Pathname(Bundler.settings[:path]).expand_path.relative_path_from(bin_path)
155
+ executable_path = executable_path = Pathname(spec.full_gem_path).join(spec.bindir, executable).relative_path_from(bin_path)
154
156
  File.open "#{bin_path}/#{executable}", 'w', 0755 do |f|
155
157
  f.puts ERB.new(template, nil, '-').result(binding)
156
158
  end
@@ -2,6 +2,15 @@ require 'rubygems'
2
2
 
3
3
  module Bundler
4
4
  class RubygemsIntegration
5
+
6
+ def build_args
7
+ Gem::Command.build_args
8
+ end
9
+
10
+ def build_args=(args)
11
+ Gem::Command.build_args = args
12
+ end
13
+
5
14
  def loaded_specs(name)
6
15
  Gem.loaded_specs[name]
7
16
  end
@@ -100,7 +109,7 @@ module Bundler
100
109
  # Then fetch the prerelease specs
101
110
  begin
102
111
  Gem::SpecFetcher.new.list(false, true).each {|k, v| spec_list[k] += v }
103
- rescue Gem::RemoteFetcher::FetchError => e
112
+ rescue Gem::RemoteFetcher::FetchError
104
113
  # ignore if we can't fetch the prerelease specs
105
114
  end
106
115
  end
@@ -109,12 +118,12 @@ module Bundler
109
118
  end
110
119
 
111
120
  def with_build_args(args)
112
- old_args = Gem::Command.build_args
121
+ old_args = self.build_args
113
122
  begin
114
- Gem::Command.build_args = args
123
+ self.build_args = args
115
124
  yield
116
125
  ensure
117
- Gem::Command.build_args = old_args
126
+ self.build_args = old_args
118
127
  end
119
128
  end
120
129
 
@@ -415,16 +424,16 @@ module Bundler
415
424
  end
416
425
 
417
426
  def fetch_all_remote_specs
418
- tuples, errors = Gem::SpecFetcher.new.available_specs(:complete)
427
+ fetched, errors = Gem::SpecFetcher.new.available_specs(:complete)
419
428
  # only raise if we don't get any specs back.
420
429
  # this means we still work if prerelease_specs.4.8.gz
421
430
  # don't exist but specs.4.8.gz do
422
- if tuples.empty? && error = errors.detect {|e| e.is_a?(Gem::SourceFetchProblem) }
431
+ if fetched.empty? && error = errors.detect {|e| e.is_a?(Gem::SourceFetchProblem) }
423
432
  raise Gem::RemoteFetcher::FetchError.new(error.error, error.source)
424
433
  end
425
434
 
426
435
  hash = {}
427
- tuples.each do |source,tuples|
436
+ fetched.each do |source, tuples|
428
437
  hash[source.uri] = tuples.map { |tuple| tuple.to_a }
429
438
  end
430
439
 
@@ -10,6 +10,7 @@ module Bundler
10
10
  @wrappers = options[:wrappers] || true
11
11
  @env_shebang = options[:env_shebang] || true
12
12
  @format_executable = options[:format_executable] || false
13
+ @build_args = options[:build_args] || Bundler.rubygems.build_args
13
14
  end
14
15
 
15
16
  def generate_bin
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
14
14
  gem.license = "MIT"
15
15
 
16
16
  gem.files = `git ls-files`.split($/)
17
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
19
  gem.require_paths = ["lib"]
20
20
 
@@ -358,6 +358,8 @@ class Thor
358
358
  end
359
359
 
360
360
  def create_task(meth) #:nodoc:
361
+ @long_desc ||= nil
362
+ @usage ||= nil
361
363
  if @usage && @desc
362
364
  base_class = @hide ? Thor::HiddenTask : Thor::Task
363
365
  tasks[meth] = base_class.new(meth, @desc, @long_desc, @usage, method_options)
@@ -293,8 +293,8 @@ class Thor
293
293
  end
294
294
  alias :remove_dir :remove_file
295
295
 
296
- private
297
296
  attr_accessor :output_buffer
297
+ private
298
298
  def concat(string)
299
299
  @output_buffer.concat(string)
300
300
  end
@@ -589,7 +589,7 @@ class Thor
589
589
  return unless public_instance_methods.include?(meth) ||
590
590
  public_instance_methods.include?(meth.to_sym)
591
591
 
592
- return if @no_tasks || !create_task(meth)
592
+ return if (defined?(@no_tasks) && @no_tasks) || !create_task(meth)
593
593
 
594
594
  is_thor_reserved_word?(meth, :task)
595
595
  Thor::Base.register_klass_file(self)
@@ -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.2" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.3.0.pre.3" unless defined?(::Bundler::VERSION)
6
6
  end
data/man/bundle.ronn CHANGED
@@ -79,6 +79,9 @@ We divide `bundle` subcommands into primary commands and utilities.
79
79
  * [bundle platform(1)][bundle-platform]:
80
80
  Displays platform compatibility information
81
81
 
82
+ * `bundle clean(1)`:
83
+ Cleans up unused gems in your bundler directory
84
+
82
85
  ## OBSOLETE
83
86
 
84
87
  These commands are obsolete and should no longer be used
data/man/gemfile.5.ronn CHANGED
@@ -143,12 +143,16 @@ There are a number of `Gemfile` platforms:
143
143
  _ruby_ `AND` version 1.8
144
144
  * `ruby_19`:
145
145
  _ruby_ `AND` version 1.9
146
+ * `ruby_20`:
147
+ _ruby_ `AND` version 2.0
146
148
  * `mri`:
147
149
  Same as _ruby_, but not Rubinius
148
150
  * `mri_18`:
149
151
  _mri_ `AND` version 1.8
150
152
  * `mri_19`:
151
153
  _mri_ `AND` version 1.9
154
+ * `mri_20`:
155
+ _mri_ `AND` version 2.0
152
156
  * `rbx`:
153
157
  Same as _ruby_, but only Rubinius (not MRI)
154
158
  * `jruby`:
@@ -161,6 +165,8 @@ There are a number of `Gemfile` platforms:
161
165
  _mingw_ `AND` version 1.8
162
166
  * `mingw_19`:
163
167
  _mingw_ `AND` version 1.9
168
+ * `mingw_20`:
169
+ _mingw_ `AND` version 2.0
164
170
 
165
171
  As with groups, you can specify one or more platforms:
166
172
 
@@ -15,13 +15,13 @@ describe Bundler::Dsl do
15
15
 
16
16
  it "converts numeric :gist to :git" do
17
17
  subject.gem("not-really-a-gem", :gist => 2859988)
18
- github_uri = "git://gist.github.com/2859988.git"
18
+ github_uri = "https://gist.github.com/2859988.git"
19
19
  expect(subject.dependencies.first.source.uri).to eq(github_uri)
20
20
  end
21
21
 
22
22
  it "converts :gist to :git" do
23
23
  subject.gem("not-really-a-gem", :gist => "2859988")
24
- github_uri = "git://gist.github.com/2859988.git"
24
+ github_uri = "https://gist.github.com/2859988.git"
25
25
  expect(subject.dependencies.first.source.uri).to eq(github_uri)
26
26
  end
27
27
 
@@ -30,13 +30,6 @@ describe Bundler::Dsl do
30
30
  github_uri = "git://github.com/rails/rails.git"
31
31
  expect(subject.dependencies.first.source.uri).to eq(github_uri)
32
32
  end
33
-
34
- it "interprets slashless 'github:' value as account name" do
35
- subject.gem("bundler", :github => "carlhuda")
36
- github_uri = "git://github.com/carlhuda/bundler.git"
37
- expect(subject.dependencies.first.source.uri).to eq(github_uri)
38
- end
39
-
40
33
  end
41
34
 
42
35
  describe '#method_missing' do
@@ -5,7 +5,7 @@ describe "bundle cache with multiple platforms" do
5
5
  gemfile <<-G
6
6
  source "file://#{gem_repo1}"
7
7
 
8
- platforms :ruby, :ruby_18, :ruby_19 do
8
+ platforms :ruby, :ruby_18, :ruby_19, :ruby_20 do
9
9
  gem "rack", "1.0.0"
10
10
  end
11
11
 
@@ -13,7 +13,7 @@ describe "bundle cache with multiple platforms" do
13
13
  gem "activesupport", "2.3.5"
14
14
  end
15
15
 
16
- platforms :mri, :mri_18, :mri_19 do
16
+ platforms :mri, :mri_18, :mri_19, :mri_20 do
17
17
  gem "activerecord", "2.3.2"
18
18
  end
19
19
  G
@@ -51,7 +51,7 @@ describe "bundle install with git sources" do
51
51
  end
52
52
  end
53
53
 
54
- it "setups executables" do
54
+ it "sets up git gem executables on the path" do
55
55
  pending_jruby_shebang_fix
56
56
  bundle "exec foobar"
57
57
  expect(out).to eq("1.0")
@@ -808,4 +808,34 @@ describe "bundle install with git sources" do
808
808
  expect(out).to include("failed for foo-1.0")
809
809
  end
810
810
  end
811
+
812
+ context "with an extension" do
813
+ it "installs the extension" do
814
+ build_git "foo" do |s|
815
+ s.add_dependency "rake"
816
+ s.extensions << "Rakefile"
817
+ s.write "Rakefile", <<-RUBY
818
+ task :default do
819
+ path = File.expand_path("../lib", __FILE__)
820
+ FileUtils.mkdir_p(path)
821
+ File.open("\#{path}/foo.rb", "w") do |f|
822
+ f.puts "FOO = 'YES'"
823
+ end
824
+ end
825
+ RUBY
826
+ end
827
+
828
+ install_gemfile <<-G
829
+ source "file://#{gem_repo1}"
830
+ gem "foo", :git => "#{lib_path('foo-1.0')}"
831
+ G
832
+
833
+ run <<-R
834
+ require 'foo'
835
+ puts FOO
836
+ R
837
+ expect(out).to eq("YES")
838
+ end
839
+ end
840
+
811
841
  end
@@ -25,6 +25,23 @@ describe "bundle outdated" do
25
25
  expect(out).to include("activesupport (3.0 > 2.3.5)")
26
26
  expect(out).to include("foo (1.0")
27
27
  end
28
+
29
+ it "returns non zero exit status if outdated gems present" do
30
+ update_repo2 do
31
+ build_gem "activesupport", "3.0"
32
+ update_git "foo", :path => lib_path("foo")
33
+ end
34
+
35
+ bundle "outdated", :exitstatus => true
36
+
37
+ expect(exitstatus).to_not be_zero
38
+ end
39
+
40
+ it "returns success exit status if no outdated gems present" do
41
+ bundle "outdated", :exitstatus => true
42
+
43
+ expect(exitstatus).to be_zero
44
+ end
28
45
  end
29
46
 
30
47
  describe "with --local option" do
metadata CHANGED
@@ -1,66 +1,60 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: bundler
3
- version: !ruby/object:Gem::Version
4
- hash: -3497787290
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.3.0.pre.3
5
5
  prerelease: 6
6
- segments:
7
- - 1
8
- - 3
9
- - 0
10
- - pre
11
- - 2
12
- version: 1.3.0.pre.2
13
6
  platform: ruby
14
- authors:
15
- - "Andr\xC3\xA9 Arko"
7
+ authors:
8
+ - André Arko
16
9
  - Terence Lee
17
10
  - Carl Lerche
18
11
  - Yehuda Katz
19
12
  autorequire:
20
13
  bindir: bin
21
14
  cert_chain: []
22
-
23
- date: 2012-12-10 00:00:00 Z
24
- dependencies:
25
- - !ruby/object:Gem::Dependency
15
+ date: 2012-12-21 00:00:00.000000000 Z
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
26
18
  name: ronn
27
- prerelease: false
28
- requirement: &id001 !ruby/object:Gem::Requirement
19
+ requirement: !ruby/object:Gem::Requirement
29
20
  none: false
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- hash: 3
34
- segments:
35
- - 0
36
- version: "0"
21
+ requirements:
22
+ - - ! '>='
23
+ - !ruby/object:Gem::Version
24
+ version: '0'
37
25
  type: :development
38
- version_requirements: *id001
39
- - !ruby/object:Gem::Dependency
40
- name: rspec
41
26
  prerelease: false
42
- 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
43
36
  none: false
44
- requirements:
37
+ requirements:
45
38
  - - ~>
46
- - !ruby/object:Gem::Version
47
- hash: 21
48
- segments:
49
- - 2
50
- - 11
51
- version: "2.11"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.11'
52
41
  type: :development
53
- version_requirements: *id002
54
- description: Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably
55
- 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.11'
49
+ description: Bundler manages an application's dependencies through its entire life,
50
+ across many machines, systematically and repeatably
51
+ email:
56
52
  - andre@arko.net
57
- executables:
53
+ executables:
58
54
  - bundle
59
55
  extensions: []
60
-
61
56
  extra_rdoc_files: []
62
-
63
- files:
57
+ files:
64
58
  - .gitignore
65
59
  - .rspec
66
60
  - .travis.yml
@@ -265,58 +259,130 @@ files:
265
259
  - spec/update/gems_spec.rb
266
260
  - spec/update/git_spec.rb
267
261
  - spec/update/source_spec.rb
268
- - lib/bundler/man/bundle-exec
269
262
  - lib/bundler/man/bundle
263
+ - lib/bundler/man/bundle-config
264
+ - lib/bundler/man/bundle-config.txt
265
+ - lib/bundler/man/bundle-exec
266
+ - lib/bundler/man/bundle-exec.txt
270
267
  - lib/bundler/man/bundle-install
271
- - lib/bundler/man/gemfile.5
272
- - lib/bundler/man/bundle-platform
268
+ - lib/bundler/man/bundle-install.txt
273
269
  - lib/bundler/man/bundle-package
270
+ - lib/bundler/man/bundle-package.txt
271
+ - lib/bundler/man/bundle-platform
272
+ - lib/bundler/man/bundle-platform.txt
274
273
  - lib/bundler/man/bundle-update
275
- - lib/bundler/man/bundle-exec.txt
276
- - lib/bundler/man/gemfile.5.txt
277
274
  - lib/bundler/man/bundle-update.txt
278
- - lib/bundler/man/bundle-config
279
- - lib/bundler/man/bundle-platform.txt
280
- - lib/bundler/man/bundle-config.txt
281
275
  - lib/bundler/man/bundle.txt
282
- - lib/bundler/man/bundle-package.txt
283
- - lib/bundler/man/bundle-install.txt
276
+ - lib/bundler/man/gemfile.5
277
+ - lib/bundler/man/gemfile.5.txt
284
278
  homepage: http://gembundler.com
285
- licenses:
279
+ licenses:
286
280
  - MIT
287
281
  post_install_message:
288
282
  rdoc_options: []
289
-
290
- require_paths:
283
+ require_paths:
291
284
  - lib
292
- required_ruby_version: !ruby/object:Gem::Requirement
285
+ required_ruby_version: !ruby/object:Gem::Requirement
293
286
  none: false
294
- requirements:
295
- - - ">="
296
- - !ruby/object:Gem::Version
297
- hash: 57
298
- segments:
299
- - 1
300
- - 8
301
- - 7
287
+ requirements:
288
+ - - ! '>='
289
+ - !ruby/object:Gem::Version
302
290
  version: 1.8.7
303
- required_rubygems_version: !ruby/object:Gem::Requirement
291
+ required_rubygems_version: !ruby/object:Gem::Requirement
304
292
  none: false
305
- requirements:
306
- - - ">="
307
- - !ruby/object:Gem::Version
308
- hash: 23
309
- segments:
310
- - 1
311
- - 3
312
- - 6
293
+ requirements:
294
+ - - ! '>='
295
+ - !ruby/object:Gem::Version
313
296
  version: 1.3.6
314
297
  requirements: []
315
-
316
298
  rubyforge_project: bundler
317
299
  rubygems_version: 1.8.24
318
300
  signing_key:
319
301
  specification_version: 3
320
302
  summary: The best way to manage your application's dependencies
321
- test_files: []
322
-
303
+ test_files:
304
+ - spec/bundler/bundler_spec.rb
305
+ - spec/bundler/cli_rspec.rb
306
+ - spec/bundler/definition_spec.rb
307
+ - spec/bundler/dsl_spec.rb
308
+ - spec/bundler/gem_helper_spec.rb
309
+ - spec/bundler/psyched_yaml_spec.rb
310
+ - spec/bundler/source_spec.rb
311
+ - spec/cache/gems_spec.rb
312
+ - spec/cache/git_spec.rb
313
+ - spec/cache/path_spec.rb
314
+ - spec/cache/platform_spec.rb
315
+ - spec/install/deploy_spec.rb
316
+ - spec/install/gems/c_ext_spec.rb
317
+ - spec/install/gems/dependency_api_spec.rb
318
+ - spec/install/gems/env_spec.rb
319
+ - spec/install/gems/flex_spec.rb
320
+ - spec/install/gems/groups_spec.rb
321
+ - spec/install/gems/packed_spec.rb
322
+ - spec/install/gems/platform_spec.rb
323
+ - spec/install/gems/post_install_spec.rb
324
+ - spec/install/gems/resolving_spec.rb
325
+ - spec/install/gems/simple_case_spec.rb
326
+ - spec/install/gems/standalone_spec.rb
327
+ - spec/install/gems/sudo_spec.rb
328
+ - spec/install/gems/win32_spec.rb
329
+ - spec/install/gemspec_spec.rb
330
+ - spec/install/git_spec.rb
331
+ - spec/install/invalid_spec.rb
332
+ - spec/install/path_spec.rb
333
+ - spec/install/upgrade_spec.rb
334
+ - spec/integration/inject.rb
335
+ - spec/lock/git_spec.rb
336
+ - spec/lock/lockfile_spec.rb
337
+ - spec/other/check_spec.rb
338
+ - spec/other/clean_spec.rb
339
+ - spec/other/config_spec.rb
340
+ - spec/other/console_spec.rb
341
+ - spec/other/exec_spec.rb
342
+ - spec/other/ext_spec.rb
343
+ - spec/other/help_spec.rb
344
+ - spec/other/init_spec.rb
345
+ - spec/other/newgem_spec.rb
346
+ - spec/other/open_spec.rb
347
+ - spec/other/outdated_spec.rb
348
+ - spec/other/platform_spec.rb
349
+ - spec/other/show_spec.rb
350
+ - spec/quality_spec.rb
351
+ - spec/realworld/dependency_api_spec.rb
352
+ - spec/realworld/edgecases_spec.rb
353
+ - spec/resolver/basic_spec.rb
354
+ - spec/resolver/platform_spec.rb
355
+ - spec/runtime/executable_spec.rb
356
+ - spec/runtime/load_spec.rb
357
+ - spec/runtime/platform_spec.rb
358
+ - spec/runtime/require_spec.rb
359
+ - spec/runtime/setup_spec.rb
360
+ - spec/runtime/with_clean_env_spec.rb
361
+ - spec/spec_helper.rb
362
+ - spec/support/artifice/endopint_marshal_fail_basic_authentication.rb
363
+ - spec/support/artifice/endpoint.rb
364
+ - spec/support/artifice/endpoint_500.rb
365
+ - spec/support/artifice/endpoint_api_missing.rb
366
+ - spec/support/artifice/endpoint_basic_authentication.rb
367
+ - spec/support/artifice/endpoint_extra.rb
368
+ - spec/support/artifice/endpoint_extra_missing.rb
369
+ - spec/support/artifice/endpoint_fallback.rb
370
+ - spec/support/artifice/endpoint_marshal_fail.rb
371
+ - spec/support/artifice/endpoint_redirect.rb
372
+ - spec/support/artifice/endpoint_timeout.rb
373
+ - spec/support/builders.rb
374
+ - spec/support/fakeweb/rack-1.0.0.marshal
375
+ - spec/support/fakeweb/windows.rb
376
+ - spec/support/helpers.rb
377
+ - spec/support/indexes.rb
378
+ - spec/support/matchers.rb
379
+ - spec/support/path.rb
380
+ - spec/support/platforms.rb
381
+ - spec/support/ruby_ext.rb
382
+ - spec/support/rubygems_ext.rb
383
+ - spec/support/rubygems_hax/platform.rb
384
+ - spec/support/sudo.rb
385
+ - spec/update/gems_spec.rb
386
+ - spec/update/git_spec.rb
387
+ - spec/update/source_spec.rb
388
+ has_rdoc: