bundler 1.3.0.pre.5 → 1.3.0.pre.6

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
@@ -32,7 +32,7 @@ matrix:
32
32
  # we want to know how we're doing with head, but not fail the build
33
33
  - rvm: ruby-head
34
34
  # until the 2.0 rc, it's okay for failures to crop up
35
- - rvm: 2.0.0-preview2
35
+ - rvm: 2.0.0
36
36
  # 1.9.2 is simply too slow. it sometimes exceeds the 25m hard limit.
37
37
  - rvm: 1.9.2
38
38
  include:
@@ -40,8 +40,8 @@ matrix:
40
40
  - rvm: ruby-head
41
41
  env: RGV=master
42
42
  # 2.0 release track
43
- - rvm: 2.0.0-preview2
44
- env: RGV=v2.0.0.preview2.2
43
+ - rvm: 2.0.0
44
+ env: RGV=v2.0.0.rc.1
45
45
  # Bundler 1.x supports Rubygems down to 1.5.3 on Ruby 1.9.3
46
46
  - rvm: 1.9.3
47
47
  env: RGV=v1.7.2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## 1.3.0.pre.6 (January 22, 2013)
2
+
3
+ Features:
4
+
5
+ - `binstubs` lists child gem bins if a gem has no binstubs
6
+ - `bundle gem --edit` will open the new gemspec (@ndbroadbent)
7
+ - `bundle gem --test rspec` now makes working tests (@tricknotes)
8
+ - add `BUNDLE_IGNORE_CONFIG` environment variable support (@richo)
9
+
10
+ Bugfixes:
11
+
12
+ - don't overwrite custom binstubs during `install --binstubs`
13
+ - don't throw an exception if `binstubs` gem doesn't exist
14
+ - `bundle config` now works in directories without a Gemfile
15
+
1
16
  ## 1.3.0.pre.5 (Jan 9, 2013)
2
17
 
3
18
  Features:
@@ -30,6 +45,7 @@ Features:
30
45
  - pushing gems during `rake release` can be disabled (@trans)
31
46
  - installing gems with `rake install` is much faster (@utkarshkukreti)
32
47
  - added platforms :ruby_20 and :mri_20, since the ABI has changed
48
+ - added '--edit' option to open generated gemspec in editor
33
49
 
34
50
  Bugfixes:
35
51
 
data/CONTRIBUTE.md CHANGED
@@ -3,7 +3,7 @@ Great to have you here! Here are a few ways you can help out with [Bundler](http
3
3
 
4
4
  # Learn & listen
5
5
 
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.
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/group/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/ISSUES.md CHANGED
@@ -16,7 +16,9 @@ Please open a ticket with Heroku if you're having trouble deploying. They have a
16
16
 
17
17
  ### Something else
18
18
 
19
- After reading the documentation, try these troubleshooting steps:
19
+ First, figure out exactly what it is that you're trying to do. Then, go to the [Bundler documentation website](http://gembundler.com) and see if we have instructions on how to do that.
20
+
21
+ If the instructions don't work, or you can't find any instructions, you can try these troubleshooting steps:
20
22
 
21
23
  # remove user-specific gems and git repos
22
24
  rm -rf ~/.bundle/ ~/.gem/bundler/ ~/.gems/cache/bundler/
@@ -24,10 +26,10 @@ After reading the documentation, try these troubleshooting steps:
24
26
  # remove system-wide git repos and git checkouts
25
27
  rm -rf $GEM_HOME/bundler/ $GEM_HOME/cache/bundler/
26
28
 
27
- # remove project-specific settings and git repos
29
+ # remove project-specific settings
28
30
  rm -rf .bundle/
29
31
 
30
- # remove project-specific cached .gem files
32
+ # remove project-specific cached gems and repos
31
33
  rm -rf vendor/cache/
32
34
 
33
35
  # remove the saved resolve of the Gemfile
@@ -42,10 +44,17 @@ After reading the documentation, try these troubleshooting steps:
42
44
 
43
45
  ## Reporting unresolved problems
44
46
 
45
- The Bundler team needs to know some things in order to diagnose and hopefully fix the bug you've found. When you report a bug, please include the following information:
47
+ Hopefully the troubleshooting steps above resolved your problem. If things still aren't working the way you expect them to, please let us know so that we can diagnose and hopefully fix the problem you're having. When you report a problem, please include the following information:
46
48
 
49
+ - What you're trying to accomplish
47
50
  - The command you ran
48
- - Exception backtrace(s), if any
51
+ - What you expected to happen
52
+ - What actually happened
53
+ - The exception backtrace(s), if any
54
+ - Everything output by running `bundle env`
55
+
56
+ If your version of Bundler does not have the `bundle env` command, then please include:
57
+
49
58
  - Your Gemfile
50
59
  - Your Gemfile.lock
51
60
  - Your Bundler configuration settings (run `bundle config`)
@@ -56,14 +65,15 @@ The Bundler team needs to know some things in order to diagnose and hopefully fi
56
65
  - Whether you have the `rubygems-bundler` gem, which can break gem executables (run `gem list rubygems-bundler`)
57
66
  - Whether you have the `open_gem` gem, which can cause rake activation conflicts (run `gem list open_gem`)
58
67
 
59
- If you have either `rubygems-bundler` or `open_gem` installed, please try removing them and then following the troublshooting steps above before opening a new ticket.
60
-
61
68
  If you are using Rails 2.3, please also include:
62
69
 
63
70
  - Your boot.rb file
64
71
  - Your preinitializer.rb file
65
72
  - Your environment.rb file
66
73
 
74
+
75
+ If you have either `rubygems-bundler` or `open_gem` installed, please try removing them and then following the troublshooting steps above before opening a new ticket.
76
+
67
77
  [Create a gist](https://gist.github.com) containing all of that information, then visit the [Bundler issue tracker](https://github.com/carlhuda/bundler/issues) and [create a ticket](https://github.com/carlhuda/bundler/issues/new) describing your problem and linking to your gist.
68
78
 
69
- Thanks for reporting issues and making Bundler better!
79
+ Thanks for reporting issues and helping make Bundler better!
data/Rakefile CHANGED
@@ -43,11 +43,6 @@ namespace :spec do
43
43
  system("sudo sed -i '/secure_path/d' /etc/sudoers")
44
44
  # Install groff for the ronn gem
45
45
  system("sudo apt-get install groff -y")
46
- # Recompile ruby-head, because the VM version is quite old
47
- if ENV['RUBY_VERSION'] == 'ruby-head'
48
- system("rvm reinstall ruby-head")
49
- system("ruby --version")
50
- end
51
46
  # Install the other gem deps, etc.
52
47
  Rake::Task["spec:deps"].invoke
53
48
  end
data/bin/bundle CHANGED
@@ -8,8 +8,9 @@ require 'bundler'
8
8
  # Check if an older version of bundler is installed
9
9
  $:.each do |path|
10
10
  if path =~ %r'/bundler-0.(\d+)' && $1.to_i < 9
11
- err = "Please remove Bundler 0.8 versions."
12
- err << "This can be done by running `gem cleanup bundler`."
11
+ err = "Looks like you have a version of bundler that's older than 0.9.\n"
12
+ err << "Please remove your old versions.\n"
13
+ err << "An easy way to do this is by running `gem cleanup bundler`."
13
14
  abort(err)
14
15
  end
15
16
  end
data/lib/bundler.rb CHANGED
@@ -17,6 +17,7 @@ module Bundler
17
17
  autoload :Dsl, 'bundler/dsl'
18
18
  autoload :EndpointSpecification, 'bundler/endpoint_specification'
19
19
  autoload :Environment, 'bundler/environment'
20
+ autoload :Env, 'bundler/env'
20
21
  autoload :Fetcher, 'bundler/fetcher'
21
22
  autoload :GemHelper, 'bundler/gem_helper'
22
23
  autoload :GemHelpers, 'bundler/gem_helpers'
@@ -188,7 +189,11 @@ module Bundler
188
189
  end
189
190
 
190
191
  def settings
191
- @settings ||= Settings.new(app_config_path)
192
+ @settings ||= begin
193
+ Settings.new(app_config_path)
194
+ rescue GemfileNotFound
195
+ Settings.new
196
+ end
192
197
  end
193
198
 
194
199
  def with_original_env
data/lib/bundler/cli.rb CHANGED
@@ -111,8 +111,8 @@ module Bundler
111
111
  definition.validate_ruby!
112
112
  not_installed = definition.missing_specs
113
113
  rescue GemNotFound, VersionConflict
114
- Bundler.ui.error "Your Gemfile's dependencies could not be satisfied"
115
- Bundler.ui.warn "Install missing gems with `bundle install`"
114
+ Bundler.ui.error "Bundler can't satisfy your Gemfile's dependencies."
115
+ Bundler.ui.warn "Install missing gems with `bundle install`."
116
116
  exit 1
117
117
  end
118
118
 
@@ -333,23 +333,23 @@ module Bundler
333
333
 
334
334
  desc "binstubs [GEM]", "install the binstubs of the listed gem"
335
335
  long_desc <<-D
336
- This command will install bundler generated binstubs of the [GEM] specified in
337
- the bin directory specified by --binstubs or the default location.
336
+ Generate binstubs for executables in [GEM]. Binstubs are put into bin,
337
+ or the --binstubs directory if one has been set.
338
338
  D
339
339
  method_option "path", :type => :string, :lazy_default => "bin", :banner =>
340
- "the directory to put the binstubs, defaults to ./bin"
340
+ "binstub destination directory (default bin)"
341
341
  method_option "force", :type => :boolean, :default => false, :banner =>
342
- "forces the writing of a binstub, even if it already exists"
342
+ "overwrite existing binstubs if they exist"
343
343
  def binstubs(gem_name)
344
344
  Bundler.definition.validate_ruby!
345
345
  Bundler.settings[:bin] = options["path"] if options["path"]
346
346
  Bundler.settings[:bin] = nil if options["path"] && options["path"].empty?
347
347
  installer = Installer.new(Bundler.root, Bundler.definition)
348
348
  spec = installer.specs.find{|s| s.name == gem_name }
349
- raise GemNotFound, not_found_message(name, Bundler.load.specs) unless spec
349
+ raise GemNotFound, not_found_message(gem_name, Bundler.load.specs) unless spec
350
350
 
351
351
  if spec.name == "bundler"
352
- Bundler.ui.warn "Skipping bundler since can't bundle bundler."
352
+ Bundler.ui.warn "Sorry, Bundler can only be run via Rubygems."
353
353
  else
354
354
  installer.generate_bundler_executable_stubs(spec, :force => options[:force], :binstubs_cmd => true)
355
355
  end
@@ -626,6 +626,11 @@ module Bundler
626
626
  desc "gem GEM", "Creates a skeleton for creating a rubygem"
627
627
  method_option :bin, :type => :boolean, :default => false, :aliases => '-b', :banner => "Generate a binary for your library."
628
628
  method_option :test, :type => :string, :default => 'rspec', :aliases => '-t', :banner => "Generate a test directory for your library: 'rspec' is the default, but 'minitest' is also supported."
629
+ method_option :edit, :type => :string, :aliases => "-e",
630
+ :lazy_default => [ENV['BUNDLER_EDITOR'], ENV['VISUAL'], ENV['EDITOR']].find{|e| !e.nil? && !e.empty? },
631
+ :required => false, :banner => "/path/to/your/editor",
632
+ :desc => "Open generated gemspec in the specified editor (defaults to $EDITOR or $BUNDLER_EDITOR)"
633
+
629
634
  def gem(name)
630
635
  name = name.chomp("/") # remove trailing slash if present
631
636
  namespaced_path = name.tr('-', '/')
@@ -641,14 +646,16 @@ module Bundler
641
646
  :constant_name => constant_name,
642
647
  :constant_array => constant_array,
643
648
  :author => git_user_name.empty? ? "TODO: Write your name" : git_user_name,
644
- :email => git_user_email.empty? ? "TODO: Write your email address" : git_user_email
649
+ :email => git_user_email.empty? ? "TODO: Write your email address" : git_user_email,
650
+ :test => options[:test]
645
651
  }
652
+ gemspec_dest = File.join(target, "#{name}.gemspec")
646
653
  template(File.join("newgem/Gemfile.tt"), File.join(target, "Gemfile"), opts)
647
654
  template(File.join("newgem/Rakefile.tt"), File.join(target, "Rakefile"), opts)
648
655
  template(File.join("newgem/LICENSE.txt.tt"), File.join(target, "LICENSE.txt"), opts)
649
656
  template(File.join("newgem/README.md.tt"), File.join(target, "README.md"), opts)
650
657
  template(File.join("newgem/gitignore.tt"), File.join(target, ".gitignore"), opts)
651
- template(File.join("newgem/newgem.gemspec.tt"), File.join(target, "#{name}.gemspec"), opts)
658
+ template(File.join("newgem/newgem.gemspec.tt"), gemspec_dest, opts)
652
659
  template(File.join("newgem/lib/newgem.rb.tt"), File.join(target, "lib/#{namespaced_path}.rb"), opts)
653
660
  template(File.join("newgem/lib/newgem/version.rb.tt"), File.join(target, "lib/#{namespaced_path}/version.rb"), opts)
654
661
  if options[:bin]
@@ -665,6 +672,10 @@ module Bundler
665
672
  end
666
673
  Bundler.ui.info "Initializating git repo in #{target}"
667
674
  Dir.chdir(target) { `git init`; `git add .` }
675
+
676
+ if options[:edit]
677
+ run("#{options["edit"]} \"#{gemspec_dest}\"") # Open gemspec in editor
678
+ end
668
679
  end
669
680
 
670
681
  def self.source_root
@@ -721,7 +732,7 @@ module Bundler
721
732
  Bundler.ui.info output.join("\n\n")
722
733
  end
723
734
 
724
- desc "add GEM VERSION ...", "Add the named gem(s), with version requirements, to the resolved Gemfile"
735
+ desc "inject GEM VERSION ...", "Add the named gem(s), with version requirements, to the resolved Gemfile"
725
736
  def inject(name, version, *gems)
726
737
  # The required arguments allow Thor to give useful feedback when the arguments
727
738
  # are incorrect. This adds those first two arguments onto the list as a whole.
@@ -743,6 +754,11 @@ module Bundler
743
754
  end
744
755
  end
745
756
 
757
+ desc "env", "Print information about the environment Bundler is running under"
758
+ def env
759
+ Env.new.write($stdout)
760
+ end
761
+
746
762
  private
747
763
 
748
764
  def setup_cache_all
@@ -0,0 +1,56 @@
1
+ module Bundler
2
+ class Env
3
+
4
+ def write(io)
5
+ io.write(report)
6
+ end
7
+
8
+ def report
9
+ out = "Bundler #{Bundler::VERSION}\n"
10
+
11
+ out << "Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}"
12
+ out << " patchlevel #{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL
13
+ out << ") [#{RUBY_PLATFORM}]\n"
14
+
15
+ out << "Rubygems #{Gem::VERSION}\n"
16
+
17
+ out << "rvm #{ENV['rvm_version']}\n" if ENV['rvm_version']
18
+
19
+ out << "GEM_HOME #{ENV['GEM_HOME']}\n"
20
+
21
+ out << "GEM_PATH #{ENV['GEM_PATH']}\n" unless ENV['GEM_PATH'] == ENV['GEM_HOME']
22
+
23
+ %w(rubygems-bundler open_gem).each do |name|
24
+ specs = Gem::Specification.find_all{|s| s.name == name }
25
+ out << "#{name} (#{specs.map(&:version).join(',')})\n" unless specs.empty?
26
+ end
27
+
28
+ out << "\nBundler settings\n" unless Bundler.settings.all.empty?
29
+ Bundler.settings.all.each do |setting|
30
+ out << " #{setting}\n"
31
+ Bundler.settings.pretty_values_for(setting).each do |line|
32
+ out << " " << line << "\n"
33
+ end
34
+ end
35
+
36
+ out << "\n\n" << "Gemfile\n"
37
+ out << read_file("Gemfile") << "\n"
38
+
39
+ out << "\n\n" << "Gemfile.lock\n"
40
+ out << read_file("Gemfile.lock") << "\n"
41
+
42
+ out
43
+ end
44
+
45
+ private
46
+
47
+ def read_file(filename)
48
+ File.read(filename).strip
49
+ rescue Errno::ENOENT
50
+ "<No #{filename} found>"
51
+ rescue => e
52
+ "#{e.class}: #{e.message}"
53
+ end
54
+
55
+ end
56
+ end
@@ -127,28 +127,55 @@ module Bundler
127
127
  end
128
128
 
129
129
  def generate_bundler_executable_stubs(spec, options = {})
130
+ if spec.executables.empty?
131
+ options = {}
132
+ spec.dependencies.each do |dep|
133
+ bins = Bundler.definition.specs[dep].first.executables
134
+ options[dep.name] = bins unless bins.empty?
135
+ end
136
+ if options.any?
137
+ Bundler.ui.warn "#{spec.name} has no executables, but you may want " +
138
+ "one from a gem it depends on."
139
+ options.each{|name,bins| Bundler.ui.warn " #{name} has: #{bins.join(', ')}" }
140
+ else
141
+ Bundler.ui.warn "There are no executables for the gem #{spec.name}."
142
+ end
143
+ return
144
+ end
145
+
130
146
  # double-assignment to avoid warnings about variables that will be used by ERB
131
147
  bin_path = bin_path = Bundler.bin_path
132
148
  template = template = File.read(File.expand_path('../templates/Executable', __FILE__))
133
149
  relative_gemfile_path = relative_gemfile_path = Bundler.default_gemfile.relative_path_from(bin_path)
134
150
  ruby_command = ruby_command = Thor::Util.ruby_command
135
151
 
152
+ exists = []
136
153
  spec.executables.each do |executable|
137
- write = true
138
- binstub_path = "#{bin_path}/#{executable}"
139
154
  next if executable == "bundle"
140
- if File.exists?(binstub_path) && !options[:force] && options[:binstubs_cmd]
141
- write = false
142
- Bundler.ui.warn <<-MSG
143
- Skipping #{executable} since it already exists. Pass --force to overwrite.
144
- MSG
155
+
156
+ binstub_path = "#{bin_path}/#{executable}"
157
+ if File.exists?(binstub_path) && !options[:force]
158
+ exists << executable
159
+ next
160
+ end
161
+
162
+ File.open(binstub_path, 'w', 0755) do |f|
163
+ f.puts ERB.new(template, nil, '-').result(binding)
145
164
  end
165
+ end
146
166
 
147
- if write
148
- File.open binstub_path, 'w', 0755 do |f|
149
- f.puts ERB.new(template, nil, '-').result(binding)
150
- end
167
+ if options[:binstubs_cmd] && !exists.empty?
168
+ case exists.size
169
+ when 1
170
+ Bundler.ui.warn "Skipped #{exists[0]} since it already exists."
171
+ when 2
172
+ Bundler.ui.warn "Skipped #{exists.join(' and ')} since they already exist."
173
+ else
174
+ items = exists[0...-1].empty? ? nil : exists[0...-1].join(', ')
175
+ skipped = [items, exists[-1]].compact.join(' and ')
176
+ Bundler.ui.warn "Skipped #{skipped} since they already exist."
151
177
  end
178
+ Bundler.ui.warn "If you want to overwrite skipped stubs, use --force."
152
179
  end
153
180
  end
154
181
 
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  module Bundler
2
2
  class Settings
3
- def initialize(root)
3
+ def initialize(root = nil)
4
4
  @root = root
5
5
  @local_config = load_config(local_config_file)
6
6
  @global_config = load_config(global_config_file)
@@ -12,6 +12,7 @@ module Bundler
12
12
  end
13
13
 
14
14
  def []=(key, value)
15
+ local_config_file || raise(GemfileNotFound)
15
16
  set_key(key, value, @local_config, local_config_file)
16
17
  end
17
18
 
@@ -98,6 +99,10 @@ module Bundler
98
99
  !@local_config.key?(key_for(:path))
99
100
  end
100
101
 
102
+ def ignore_config?
103
+ ENV['BUNDLE_IGNORE_CONFIG']
104
+ end
105
+
101
106
  private
102
107
  def key_for(key)
103
108
  key = key.to_s.sub(".", "__").upcase
@@ -123,11 +128,12 @@ module Bundler
123
128
  end
124
129
 
125
130
  def local_config_file
126
- Pathname.new("#{@root}/config")
131
+ Pathname.new(@root).join("config") if @root
127
132
  end
128
133
 
129
134
  def load_config(config_file)
130
- if config_file.exist? && !config_file.size.zero?
135
+ valid_file = config_file && config_file.exist? && !config_file.size.zero?
136
+ if !ignore_config? && valid_file
131
137
  Hash[config_file.read.scan(/^(BUNDLE_.+): ['"]?(.+?)['"]?$/)]
132
138
  else
133
139
  {}
@@ -19,4 +19,7 @@ Gem::Specification.new do |gem|
19
19
  gem.require_paths = ["lib"]
20
20
 
21
21
  gem.add_development_dependency "rake"
22
+ <% if config[:test] -%>
23
+ gem.add_development_dependency "<%=config[:test]%>"
24
+ <% end -%>
22
25
  end
@@ -1,2 +1,2 @@
1
- --format specdoc
1
+ --format documentation
2
2
  --color
@@ -1,3 +1,5 @@
1
+ require 'spec_helper'
2
+
1
3
  describe <%= config[:constant_name] %> do
2
4
  it 'should have a version number' do
3
5
  <%= config[:constant_name] %>::VERSION.should_not be_nil
@@ -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" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.3.0.pre.6" unless defined?(::Bundler::VERSION)
6
6
  end
@@ -31,6 +31,9 @@ the local application. The configuration will be stored in `app/.bundle/config`.
31
31
  Executing `bundle config --delete <name>` will delete the configuration in both
32
32
  local and global sources.
33
33
 
34
+ Executing bundle with the `BUNDLE_IGNORE_CONFIG` environment variable set will
35
+ cause it to ignore all configuration.
36
+
34
37
  ## BUILD OPTIONS
35
38
 
36
39
  You can use `bundle config` to give bundler the flags to pass to the gem
@@ -127,4 +130,4 @@ accidental locking to a different branch.
127
130
 
128
131
  Finally, Bundler also ensures that the current revision in the
129
132
  `Gemfile.lock` exists in the local git repository. By doing this, Bundler
130
- forces you to fetch the latest changes in the remotes.
133
+ forces you to fetch the latest changes in the remotes.
data/man/gemfile.5.ronn CHANGED
@@ -23,7 +23,8 @@ might contain the gems listed in the `Gemfile`.
23
23
  source "http://rubygems.org"
24
24
  source "http://gems.github.com"
25
25
 
26
- Each of these _source_s `MUST` be a valid Rubygems repository.
26
+ Each of these _source_s `MUST` be a valid Rubygems repository. Sources are
27
+ checked for gems following the heuristics described in [SOURCE PRIORITY][].
27
28
 
28
29
  ## RUBY (#ruby)
29
30
 
@@ -34,7 +34,7 @@ describe "bundle binstubs <gem>" do
34
34
  bundle "binstubs bundler"
35
35
 
36
36
  expect(bundled_app("bin/bundle")).not_to exist
37
- expect(out).to eq("Skipping bundler since can't bundle bundler.")
37
+ expect(out).to eq("Sorry, Bundler can only be run via Rubygems.")
38
38
  end
39
39
 
40
40
  it "install binstubs from git gems" do
@@ -110,7 +110,8 @@ describe "bundle binstubs <gem>" do
110
110
 
111
111
  expect(bundled_app("bin/rackup")).to exist
112
112
  expect(File.read(bundled_app("bin/rackup"))).to eq("OMG")
113
- expect(out).to eq("Skipping rackup since it already exists. Pass --force to overwrite.")
113
+ expect(out).to include("Skipped rackup")
114
+ expect(out).to include("overwrite skipped stubs, use --force")
114
115
  end
115
116
 
116
117
  context "when using --force" do
@@ -58,7 +58,7 @@ describe "bundle check" do
58
58
  G
59
59
 
60
60
  bundle :check
61
- expect(out).to include("Your Gemfile's dependencies could not be satisfied")
61
+ expect(out).to include("Bundler can't satisfy your Gemfile's dependencies.")
62
62
  end
63
63
 
64
64
  it "prints a generic error if a Gemfile.lock does not exist and a toplevel dependency does not exist" do
@@ -69,7 +69,7 @@ describe "bundle check" do
69
69
 
70
70
  bundle :check, :exitstatus => true
71
71
  expect(@exitstatus).to be > 0
72
- expect(out).to include("could not be satisfied")
72
+ expect(out).to include("Bundler can't satisfy your Gemfile's dependencies.")
73
73
  end
74
74
 
75
75
  it "prints a generic message if you changed your lockfile" do
@@ -89,7 +89,7 @@ describe "bundle check" do
89
89
  G
90
90
 
91
91
  bundle :check
92
- expect(out).to include("Your Gemfile's dependencies could not be satisfied")
92
+ expect(out).to include("Bundler can't satisfy your Gemfile's dependencies.")
93
93
  end
94
94
 
95
95
  it "remembers --without option from install" do
@@ -7,8 +7,8 @@ describe "bundle help" do
7
7
  system_gems "bundler-0.8.1"
8
8
 
9
9
  bundle "help", :expect_err => true
10
- expect(err).to include("Please remove Bundler 0.8 versions.")
11
- expect(err).to include("This can be done by running `gem cleanup bundler`.")
10
+ expect(err).to include("older than 0.9")
11
+ expect(err).to include("running `gem cleanup bundler`.")
12
12
  end
13
13
 
14
14
  it "uses groff when available" do
@@ -179,6 +179,16 @@ RAKEFILE
179
179
  expect(bundled_app("test_gem/test/minitest_helper.rb")).to_not exist
180
180
  end
181
181
  end
182
+
183
+ context "--edit option" do
184
+ it "opens the generated gemspec in the user's text editor" do
185
+ reset!
186
+ in_app_root
187
+ output = bundle "gem #{gem_name} --edit=echo"
188
+ gemspec_path = File.join(Dir.pwd, gem_name, "#{gem_name}.gemspec")
189
+ expect(output).to include("echo \"#{gemspec_path}\"")
190
+ end
191
+ end
182
192
  end
183
193
 
184
194
  context "gem naming with dashed" do
@@ -130,7 +130,7 @@ describe "Running bin/* commands" do
130
130
  expect(bundled_app("bin/rackup")).to exist
131
131
  end
132
132
 
133
- it "always reinstalls the binstub" do
133
+ it "doesn't overwrite on --binstub" do
134
134
  gemfile <<-G
135
135
  source "file://#{gem_repo1}"
136
136
  gem "rack"
@@ -144,6 +144,6 @@ describe "Running bin/* commands" do
144
144
 
145
145
  bundle "install"
146
146
 
147
- expect(File.read(bundled_app("bin/rackup"))).not_to eq("OMG")
147
+ expect(bundled_app("bin/rackup").read).to eq("OMG")
148
148
  end
149
149
  end
@@ -514,11 +514,8 @@ module Spec
514
514
  end
515
515
 
516
516
  class GitUpdater < LibBuilder
517
- WINDOWS = RbConfig::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw)!
518
- NULL = WINDOWS ? "NUL" : "/dev/null"
519
-
520
517
  def silently(str)
521
- `#{str} 2>#{NULL}`
518
+ `#{str} 2>#{Bundler::NULL}`
522
519
  end
523
520
 
524
521
  def _build(options)
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler
3
3
  version: !ruby/object:Gem::Version
4
- hash: -3803691018
5
- prerelease: 6
4
+ prerelease: true
6
5
  segments:
7
6
  - 1
8
7
  - 3
9
8
  - 0
10
9
  - pre
11
- - 5
12
- version: 1.3.0.pre.5
10
+ - 6
11
+ version: 1.3.0.pre.6
13
12
  platform: ruby
14
13
  authors:
15
14
  - "Andr\xC3\xA9 Arko"
@@ -20,17 +19,16 @@ autorequire:
20
19
  bindir: bin
21
20
  cert_chain: []
22
21
 
23
- date: 2013-01-10 00:00:00 Z
22
+ date: 2013-01-22 00:00:00 -08:00
23
+ default_executable:
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: ronn
27
27
  prerelease: false
28
28
  requirement: &id001 !ruby/object:Gem::Requirement
29
- none: false
30
29
  requirements:
31
30
  - - ">="
32
31
  - !ruby/object:Gem::Version
33
- hash: 3
34
32
  segments:
35
33
  - 0
36
34
  version: "0"
@@ -40,11 +38,9 @@ dependencies:
40
38
  name: rspec
41
39
  prerelease: false
42
40
  requirement: &id002 !ruby/object:Gem::Requirement
43
- none: false
44
41
  requirements:
45
42
  - - ~>
46
43
  - !ruby/object:Gem::Version
47
- hash: 21
48
44
  segments:
49
45
  - 2
50
46
  - 11
@@ -85,6 +81,7 @@ files:
85
81
  - lib/bundler/deprecate.rb
86
82
  - lib/bundler/dsl.rb
87
83
  - lib/bundler/endpoint_specification.rb
84
+ - lib/bundler/env.rb
88
85
  - lib/bundler/environment.rb
89
86
  - lib/bundler/fetcher.rb
90
87
  - lib/bundler/friendly_errors.rb
@@ -269,22 +266,23 @@ files:
269
266
  - spec/update/gems_spec.rb
270
267
  - spec/update/git_spec.rb
271
268
  - spec/update/source_spec.rb
272
- - lib/bundler/man/bundle-exec
273
269
  - lib/bundler/man/bundle
270
+ - lib/bundler/man/bundle-config
271
+ - lib/bundler/man/bundle-config.txt
272
+ - lib/bundler/man/bundle-exec
273
+ - lib/bundler/man/bundle-exec.txt
274
274
  - lib/bundler/man/bundle-install
275
- - lib/bundler/man/gemfile.5
276
- - lib/bundler/man/bundle-platform
275
+ - lib/bundler/man/bundle-install.txt
277
276
  - lib/bundler/man/bundle-package
277
+ - lib/bundler/man/bundle-package.txt
278
+ - lib/bundler/man/bundle-platform
279
+ - lib/bundler/man/bundle-platform.txt
278
280
  - lib/bundler/man/bundle-update
279
- - lib/bundler/man/bundle-exec.txt
280
- - lib/bundler/man/gemfile.5.txt
281
281
  - lib/bundler/man/bundle-update.txt
282
- - lib/bundler/man/bundle-config
283
- - lib/bundler/man/bundle-platform.txt
284
- - lib/bundler/man/bundle-config.txt
285
282
  - lib/bundler/man/bundle.txt
286
- - lib/bundler/man/bundle-package.txt
287
- - lib/bundler/man/bundle-install.txt
283
+ - lib/bundler/man/gemfile.5
284
+ - lib/bundler/man/gemfile.5.txt
285
+ has_rdoc: true
288
286
  homepage: http://gembundler.com
289
287
  licenses:
290
288
  - MIT
@@ -294,22 +292,18 @@ rdoc_options: []
294
292
  require_paths:
295
293
  - lib
296
294
  required_ruby_version: !ruby/object:Gem::Requirement
297
- none: false
298
295
  requirements:
299
296
  - - ">="
300
297
  - !ruby/object:Gem::Version
301
- hash: 57
302
298
  segments:
303
299
  - 1
304
300
  - 8
305
301
  - 7
306
302
  version: 1.8.7
307
303
  required_rubygems_version: !ruby/object:Gem::Requirement
308
- none: false
309
304
  requirements:
310
305
  - - ">="
311
306
  - !ruby/object:Gem::Version
312
- hash: 23
313
307
  segments:
314
308
  - 1
315
309
  - 3
@@ -318,9 +312,94 @@ required_rubygems_version: !ruby/object:Gem::Requirement
318
312
  requirements: []
319
313
 
320
314
  rubyforge_project: bundler
321
- rubygems_version: 1.8.24
315
+ rubygems_version: 1.3.6
322
316
  signing_key:
323
317
  specification_version: 3
324
318
  summary: The best way to manage your application's dependencies
325
- test_files: []
326
-
319
+ test_files:
320
+ - spec/bundler/bundler_spec.rb
321
+ - spec/bundler/cli_rspec.rb
322
+ - spec/bundler/definition_spec.rb
323
+ - spec/bundler/dsl_spec.rb
324
+ - spec/bundler/gem_helper_spec.rb
325
+ - spec/bundler/psyched_yaml_spec.rb
326
+ - spec/bundler/source_spec.rb
327
+ - spec/cache/gems_spec.rb
328
+ - spec/cache/git_spec.rb
329
+ - spec/cache/path_spec.rb
330
+ - spec/cache/platform_spec.rb
331
+ - spec/install/deploy_spec.rb
332
+ - spec/install/gems/c_ext_spec.rb
333
+ - spec/install/gems/dependency_api_spec.rb
334
+ - spec/install/gems/env_spec.rb
335
+ - spec/install/gems/flex_spec.rb
336
+ - spec/install/gems/groups_spec.rb
337
+ - spec/install/gems/packed_spec.rb
338
+ - spec/install/gems/platform_spec.rb
339
+ - spec/install/gems/post_install_spec.rb
340
+ - spec/install/gems/resolving_spec.rb
341
+ - spec/install/gems/simple_case_spec.rb
342
+ - spec/install/gems/standalone_spec.rb
343
+ - spec/install/gems/sudo_spec.rb
344
+ - spec/install/gems/win32_spec.rb
345
+ - spec/install/gemspec_spec.rb
346
+ - spec/install/git_spec.rb
347
+ - spec/install/invalid_spec.rb
348
+ - spec/install/path_spec.rb
349
+ - spec/install/upgrade_spec.rb
350
+ - spec/integration/inject.rb
351
+ - spec/lock/git_spec.rb
352
+ - spec/lock/lockfile_spec.rb
353
+ - spec/other/binstubs_spec.rb
354
+ - spec/other/bundle_ruby_spec.rb
355
+ - spec/other/check_spec.rb
356
+ - spec/other/clean_spec.rb
357
+ - spec/other/config_spec.rb
358
+ - spec/other/console_spec.rb
359
+ - spec/other/exec_spec.rb
360
+ - spec/other/ext_spec.rb
361
+ - spec/other/help_spec.rb
362
+ - spec/other/init_spec.rb
363
+ - spec/other/newgem_spec.rb
364
+ - spec/other/open_spec.rb
365
+ - spec/other/outdated_spec.rb
366
+ - spec/other/platform_spec.rb
367
+ - spec/other/show_spec.rb
368
+ - spec/quality_spec.rb
369
+ - spec/realworld/dependency_api_spec.rb
370
+ - spec/realworld/edgecases_spec.rb
371
+ - spec/resolver/basic_spec.rb
372
+ - spec/resolver/platform_spec.rb
373
+ - spec/runtime/executable_spec.rb
374
+ - spec/runtime/load_spec.rb
375
+ - spec/runtime/platform_spec.rb
376
+ - spec/runtime/require_spec.rb
377
+ - spec/runtime/setup_spec.rb
378
+ - spec/runtime/with_clean_env_spec.rb
379
+ - spec/spec_helper.rb
380
+ - spec/support/artifice/endopint_marshal_fail_basic_authentication.rb
381
+ - spec/support/artifice/endpoint.rb
382
+ - spec/support/artifice/endpoint_500.rb
383
+ - spec/support/artifice/endpoint_api_missing.rb
384
+ - spec/support/artifice/endpoint_basic_authentication.rb
385
+ - spec/support/artifice/endpoint_extra.rb
386
+ - spec/support/artifice/endpoint_extra_missing.rb
387
+ - spec/support/artifice/endpoint_fallback.rb
388
+ - spec/support/artifice/endpoint_marshal_fail.rb
389
+ - spec/support/artifice/endpoint_redirect.rb
390
+ - spec/support/artifice/endpoint_timeout.rb
391
+ - spec/support/builders.rb
392
+ - spec/support/fakeweb/rack-1.0.0.marshal
393
+ - spec/support/fakeweb/windows.rb
394
+ - spec/support/helpers.rb
395
+ - spec/support/indexes.rb
396
+ - spec/support/matchers.rb
397
+ - spec/support/path.rb
398
+ - spec/support/platforms.rb
399
+ - spec/support/ruby_ext.rb
400
+ - spec/support/rubygems_ext.rb
401
+ - spec/support/rubygems_hax/platform.rb
402
+ - spec/support/sudo.rb
403
+ - spec/update/gems_spec.rb
404
+ - spec/update/git_spec.rb
405
+ - spec/update/source_spec.rb