bundler 1.10.6 → 1.11.0.pre.1
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.
- checksums.yaml +4 -4
- data/.rubocop.yml +105 -0
- data/.rubocop_todo.yml +120 -0
- data/.travis.yml +8 -23
- data/CHANGELOG.md +69 -0
- data/CODE_OF_CONDUCT.md +6 -4
- data/DEVELOPMENT.md +4 -5
- data/README.md +2 -2
- data/Rakefile +70 -87
- data/bin/rake +14 -0
- data/bin/rspec +10 -0
- data/bin/rubocop +11 -0
- data/bundler.gemspec +17 -15
- data/exe/bundle +20 -0
- data/{bin → exe}/bundle_ruby +6 -4
- data/exe/bundler +20 -0
- data/lib/bundler.rb +98 -119
- data/lib/bundler/capistrano.rb +2 -2
- data/lib/bundler/cli.rb +85 -74
- data/lib/bundler/cli/binstubs.rb +1 -2
- data/lib/bundler/cli/cache.rb +0 -1
- data/lib/bundler/cli/check.rb +7 -5
- data/lib/bundler/cli/clean.rb +0 -1
- data/lib/bundler/cli/common.rb +6 -7
- data/lib/bundler/cli/config.rb +69 -56
- data/lib/bundler/cli/console.rb +8 -8
- data/lib/bundler/cli/exec.rb +4 -3
- data/lib/bundler/cli/gem.rb +50 -39
- data/lib/bundler/cli/init.rb +5 -6
- data/lib/bundler/cli/inject.rb +1 -2
- data/lib/bundler/cli/install.rb +18 -21
- data/lib/bundler/cli/lock.rb +8 -3
- data/lib/bundler/cli/open.rb +4 -5
- data/lib/bundler/cli/outdated.rb +7 -8
- data/lib/bundler/cli/package.rb +1 -1
- data/lib/bundler/cli/platform.rb +2 -3
- data/lib/bundler/cli/show.rb +9 -9
- data/lib/bundler/cli/update.rb +2 -3
- data/lib/bundler/cli/viz.rb +1 -2
- data/lib/bundler/constants.rb +1 -1
- data/lib/bundler/current_ruby.rb +38 -3
- data/lib/bundler/definition.rb +83 -88
- data/lib/bundler/dep_proxy.rb +11 -9
- data/lib/bundler/dependency.rb +26 -11
- data/lib/bundler/deployment.rb +2 -2
- data/lib/bundler/deprecate.rb +3 -3
- data/lib/bundler/dsl.rb +63 -44
- data/lib/bundler/env.rb +19 -12
- data/lib/bundler/environment.rb +1 -2
- data/lib/bundler/errors.rb +82 -0
- data/lib/bundler/fetcher.rb +45 -39
- data/lib/bundler/fetcher/base.rb +20 -7
- data/lib/bundler/fetcher/dependency.rb +5 -5
- data/lib/bundler/fetcher/downloader.rb +1 -2
- data/lib/bundler/fetcher/index.rb +4 -7
- data/lib/bundler/friendly_errors.rb +15 -8
- data/lib/bundler/gem_helper.rb +44 -35
- data/lib/bundler/gem_helpers.rb +7 -8
- data/lib/bundler/gem_remote_fetcher.rb +41 -0
- data/lib/bundler/gem_tasks.rb +4 -1
- data/lib/bundler/graph.rb +25 -24
- data/lib/bundler/index.rb +21 -18
- data/lib/bundler/injector.rb +2 -4
- data/lib/bundler/inline.rb +3 -3
- data/lib/bundler/installer.rb +57 -144
- data/lib/bundler/installer/gem_installer.rb +76 -0
- data/lib/bundler/installer/parallel_installer.rb +22 -13
- data/lib/bundler/installer/standalone.rb +48 -0
- data/lib/bundler/lazy_specification.rb +3 -4
- data/lib/bundler/lockfile_parser.rb +21 -19
- data/lib/bundler/match_platform.rb +4 -4
- data/lib/bundler/psyched_yaml.rb +3 -3
- data/lib/bundler/remote_specification.rb +1 -1
- data/lib/bundler/resolver.rb +93 -88
- data/lib/bundler/retry.rb +9 -10
- data/lib/bundler/ruby_dsl.rb +1 -1
- data/lib/bundler/ruby_version.rb +7 -10
- data/lib/bundler/rubygems_ext.rb +32 -27
- data/lib/bundler/{gem_installer.rb → rubygems_gem_installer.rb} +2 -2
- data/lib/bundler/rubygems_integration.rb +85 -70
- data/lib/bundler/runtime.rb +57 -61
- data/lib/bundler/settings.rb +27 -26
- data/lib/bundler/setup.rb +3 -3
- data/lib/bundler/shared_helpers.rb +45 -20
- data/lib/bundler/similarity_detector.rb +19 -21
- data/lib/bundler/source.rb +4 -5
- data/lib/bundler/source/git.rb +29 -31
- data/lib/bundler/source/git/git_proxy.rb +52 -26
- data/lib/bundler/source/path.rb +25 -28
- data/lib/bundler/source/path/installer.rb +4 -4
- data/lib/bundler/source/rubygems.rb +62 -48
- data/lib/bundler/source/rubygems/remote.rb +3 -3
- data/lib/bundler/source_list.rb +4 -4
- data/lib/bundler/spec_set.rb +17 -15
- data/lib/bundler/ssl_certs/certificate_manager.rb +5 -6
- data/lib/bundler/stub_specification.rb +2 -2
- data/lib/bundler/templates/Executable +5 -5
- data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +42 -6
- data/lib/bundler/templates/newgem/README.md.tt +1 -1
- data/lib/bundler/templates/newgem/Rakefile.tt +4 -2
- data/lib/bundler/templates/newgem/bin/setup.tt +2 -1
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +2 -2
- data/lib/bundler/ui.rb +3 -3
- data/lib/bundler/ui/rg_proxy.rb +2 -2
- data/lib/bundler/ui/shell.rb +10 -6
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +82 -71
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +9 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +40 -21
- data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +8 -0
- data/lib/bundler/vendored_molinillo.rb +1 -1
- data/lib/bundler/vendored_persistent.rb +3 -3
- data/lib/bundler/vendored_thor.rb +2 -2
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler/vlad.rb +1 -1
- data/lib/bundler/worker.rb +4 -5
- data/man/bundle-config.ronn +4 -2
- data/man/bundle-gem.ronn +77 -0
- data/man/bundle-install.ronn +13 -6
- data/man/bundle-lock.ronn +47 -0
- data/man/bundle.ronn +1 -1
- data/man/gemfile.5.ronn +8 -0
- data/man/index.txt +1 -0
- metadata +37 -8
- data/bin/bundle +0 -21
- data/bin/bundler +0 -21
data/README.md
CHANGED
@@ -33,8 +33,8 @@ Feel free to chat with the Bundler core team (and many other users) on IRC in th
|
|
33
33
|
|
34
34
|
### Contributing
|
35
35
|
|
36
|
-
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 [DEVELOPMENT](https://github.com/bundler/bundler/blob/master/DEVELOPMENT.md)
|
36
|
+
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 [DEVELOPMENT](https://github.com/bundler/bundler/blob/master/DEVELOPMENT.md).
|
37
37
|
|
38
38
|
### Code of Conduct
|
39
39
|
|
40
|
-
Everyone interacting in the Bundler project’s codebases, issue trackers, chat rooms, and mailing lists is expected to follow the [Bundler code of conduct](https://github.com/bundler/bundler/blob/master/CODE_OF_CONDUCT.md).
|
40
|
+
Everyone interacting in the Bundler project’s codebases, issue trackers, chat rooms, and mailing lists is expected to follow the [Bundler code of conduct](https://github.com/bundler/bundler/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
$:.unshift File.expand_path("../lib", __FILE__)
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "shellwords"
|
4
|
+
require "benchmark"
|
5
5
|
|
6
6
|
RUBYGEMS_REPO = File.expand_path("tmp/rubygems")
|
7
7
|
BUNDLER_SPEC = Gem::Specification.load("bundler.gemspec")
|
@@ -27,84 +27,28 @@ module Rake
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
-
def clean_files(files, regex, replacement = '')
|
31
|
-
files.each do |file|
|
32
|
-
contents = File.read(file)
|
33
|
-
contents.gsub!(regex, replacement)
|
34
|
-
File.open(file, 'w') { |f| f << contents }
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
namespace :molinillo do
|
39
|
-
task :namespace do
|
40
|
-
files = Dir.glob('lib/bundler/vendor/molinillo*/**/*.rb')
|
41
|
-
clean_files(files, 'Molinillo', 'Bundler::Molinillo')
|
42
|
-
clean_files(files, /require (["'])molinillo/, 'require \1bundler/vendor/molinillo/lib/molinillo')
|
43
|
-
end
|
44
|
-
|
45
|
-
task :clean do
|
46
|
-
files = Dir.glob('lib/bundler/vendor/molinillo*/*', File::FNM_DOTMATCH).reject { |f| %(. .. lib).include? f.split('/').last }
|
47
|
-
rm_r files
|
48
|
-
end
|
49
|
-
|
50
|
-
task :update, [:tag] => [] do |t, args|
|
51
|
-
tag = args[:tag]
|
52
|
-
Dir.chdir 'lib/bundler/vendor' do
|
53
|
-
rm_rf 'molinillo'
|
54
|
-
sh "curl -L https://github.com/CocoaPods/molinillo/archive/#{tag}.tar.gz | tar -xz"
|
55
|
-
sh "mv Molinillo-* molinillo"
|
56
|
-
end
|
57
|
-
Rake::Task['molinillo:namespace'].invoke
|
58
|
-
Rake::Task['molinillo:clean'].invoke
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
namespace :thor do
|
63
|
-
task :namespace do
|
64
|
-
files = Dir.glob('lib/bundler/vendor/thor*/**/*.rb')
|
65
|
-
clean_files(files, 'Thor', 'Bundler::Thor')
|
66
|
-
clean_files(files, /require (["'])thor/, 'require \1bundler/vendor/thor/lib/thor')
|
67
|
-
clean_files(files, /(autoload\s+[:\w]+,\s+["'])(thor[\w\/]+["'])/, '\1bundler/vendor/thor/lib/\2')
|
68
|
-
end
|
69
|
-
|
70
|
-
task :clean do
|
71
|
-
files = Dir.glob('lib/bundler/vendor/thor*/*', File::FNM_DOTMATCH).reject { |f| %(. .. lib).include? f.split('/').last }
|
72
|
-
rm_r files
|
73
|
-
end
|
74
|
-
|
75
|
-
task :update, [:tag] => [] do |t, args|
|
76
|
-
tag = args[:tag]
|
77
|
-
Dir.chdir 'lib/bundler/vendor' do
|
78
|
-
rm_rf 'thor'
|
79
|
-
sh "curl -L https://github.com/erikhuda/thor/archive/#{tag}.tar.gz | tar -xz"
|
80
|
-
sh "mv thor-* thor"
|
81
|
-
end
|
82
|
-
Rake::Task['thor:namespace'].invoke
|
83
|
-
Rake::Task['thor:clean'].invoke
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
30
|
namespace :spec do
|
88
31
|
desc "Ensure spec dependencies are installed"
|
89
32
|
task :deps do
|
90
33
|
deps = Hash[BUNDLER_SPEC.development_dependencies.map do |d|
|
91
34
|
[d.name, d.requirement.to_s]
|
92
35
|
end]
|
36
|
+
deps["rubocop"] ||= "= 0.35.1" if RUBY_VERSION >= "1.9.3" # can't go in the gemspec because of the ruby version requirement
|
93
37
|
|
94
38
|
# JRuby can't build ronn or rdiscount, so we skip that
|
95
|
-
if defined?(RUBY_ENGINE) && RUBY_ENGINE ==
|
39
|
+
if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
|
96
40
|
deps.delete("ronn")
|
97
41
|
deps.delete("rdiscount")
|
98
42
|
end
|
99
43
|
|
100
|
-
deps.sort_by{|name, _| name }.each do |name, version|
|
101
|
-
sh %
|
102
|
-
|
44
|
+
deps.sort_by {|name, _| name }.each do |name, version|
|
45
|
+
sh %(#{Gem.ruby} -S gem list -i "^#{name}$" -v "#{version}" || ) +
|
46
|
+
%(#{Gem.ruby} -S gem install #{name} -v "#{version}" --no-ri --no-rdoc)
|
103
47
|
end
|
104
48
|
|
105
49
|
# Download and install gems used inside tests
|
106
50
|
$LOAD_PATH.unshift("./spec")
|
107
|
-
require
|
51
|
+
require "support/rubygems_ext"
|
108
52
|
Spec::Rubygems.setup
|
109
53
|
end
|
110
54
|
|
@@ -118,7 +62,7 @@ namespace :spec do
|
|
118
62
|
sh "sudo apt-get install groff -y"
|
119
63
|
# Install graphviz so that the viz specs can run
|
120
64
|
sh "sudo apt-get install graphviz -y 2>&1 | tail -n 2"
|
121
|
-
if RUBY_VERSION <
|
65
|
+
if RUBY_VERSION < "1.9"
|
122
66
|
# Downgrade Rubygems on 1.8 so Ronn can be required
|
123
67
|
# https://github.com/rubygems/rubygems/issues/784
|
124
68
|
sh "gem update --system 2.1.11"
|
@@ -134,36 +78,43 @@ namespace :spec do
|
|
134
78
|
end
|
135
79
|
|
136
80
|
begin
|
137
|
-
rspec = BUNDLER_SPEC.development_dependencies.find{|d| d.name == "rspec" }
|
138
|
-
gem
|
139
|
-
require
|
81
|
+
rspec = BUNDLER_SPEC.development_dependencies.find {|d| d.name == "rspec" }
|
82
|
+
gem "rspec", rspec.requirement.to_s
|
83
|
+
require "rspec/core/rake_task"
|
140
84
|
|
141
85
|
desc "Run specs"
|
142
86
|
RSpec::Core::RakeTask.new
|
143
87
|
task :spec => "man:build"
|
144
88
|
|
89
|
+
if RUBY_VERSION >= "1.9.3"
|
90
|
+
# can't go in the gemspec because of the ruby version requirement
|
91
|
+
gem "rubocop", "= 0.35.1"
|
92
|
+
require "rubocop/rake_task"
|
93
|
+
RuboCop::RakeTask.new
|
94
|
+
end
|
95
|
+
|
145
96
|
namespace :spec do
|
146
97
|
task :clean do
|
147
|
-
rm_rf
|
98
|
+
rm_rf "tmp"
|
148
99
|
end
|
149
100
|
|
150
101
|
desc "Run the real-world spec suite (requires internet)"
|
151
|
-
task :realworld =>
|
102
|
+
task :realworld => %w(set_realworld spec)
|
152
103
|
|
153
104
|
task :set_realworld do
|
154
|
-
ENV[
|
105
|
+
ENV["BUNDLER_REALWORLD_TESTS"] = "1"
|
155
106
|
end
|
156
107
|
|
157
108
|
desc "Run the spec suite with the sudo tests"
|
158
|
-
task :sudo =>
|
109
|
+
task :sudo => %w(set_sudo spec clean_sudo)
|
159
110
|
|
160
111
|
task :set_sudo do
|
161
|
-
ENV[
|
112
|
+
ENV["BUNDLER_SUDO_TESTS"] = "1"
|
162
113
|
end
|
163
114
|
|
164
115
|
task :clean_sudo do
|
165
116
|
puts "Cleaning up sudo test files..."
|
166
|
-
system "sudo rm -rf #{File.expand_path(
|
117
|
+
system "sudo rm -rf #{File.expand_path("../tmp/sudo_gem_home", __FILE__)}"
|
167
118
|
end
|
168
119
|
|
169
120
|
# Rubygems specs by version
|
@@ -171,7 +122,7 @@ begin
|
|
171
122
|
rubyopt = ENV["RUBYOPT"]
|
172
123
|
# When editing this list, also edit .travis.yml!
|
173
124
|
branches = %w(master)
|
174
|
-
releases = %w(v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.29 v2.0.14 v2.1.11 v2.2.
|
125
|
+
releases = %w(v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.29 v2.0.14 v2.1.11 v2.2.5 v2.4.8 v2.5.0)
|
175
126
|
(branches + releases).each do |rg|
|
176
127
|
desc "Run specs with Rubygems #{rg}"
|
177
128
|
RSpec::Core::RakeTask.new(rg) do |t|
|
@@ -203,7 +154,7 @@ begin
|
|
203
154
|
|
204
155
|
puts "Checked out rubygems '#{rg}' at #{hash}"
|
205
156
|
ENV["RUBYOPT"] = "-I#{File.expand_path("tmp/rubygems/lib")} #{rubyopt}"
|
206
|
-
puts "RUBYOPT=#{ENV[
|
157
|
+
puts "RUBYOPT=#{ENV["RUBYOPT"]}"
|
207
158
|
end
|
208
159
|
|
209
160
|
task rg => ["man:build", "clone_rubygems_#{rg}"]
|
@@ -217,7 +168,7 @@ begin
|
|
217
168
|
end
|
218
169
|
|
219
170
|
task "setup_co" do
|
220
|
-
rg = File.expand_path ENV[
|
171
|
+
rg = File.expand_path ENV["RG"]
|
221
172
|
puts "Running specs against Rubygems in #{rg}..."
|
222
173
|
ENV["RUBYOPT"] = "-I#{rg} #{rubyopt}"
|
223
174
|
end
|
@@ -228,7 +179,12 @@ begin
|
|
228
179
|
|
229
180
|
desc "Run the tests on Travis CI against a rubygem version (using ENV['RGV'])"
|
230
181
|
task :travis do
|
231
|
-
rg = ENV[
|
182
|
+
rg = ENV["RGV"] || raise("Rubygems version is required on Travis!")
|
183
|
+
|
184
|
+
if RUBY_VERSION > "1.9.3"
|
185
|
+
puts "\n\e[1;33m[Travis CI] Running bundler linter\e[m\n\n"
|
186
|
+
Rake::Task["rubocop"].invoke
|
187
|
+
end
|
232
188
|
|
233
189
|
puts "\n\e[1;33m[Travis CI] Running bundler specs against rubygems #{rg}\e[m\n\n"
|
234
190
|
specs = safe_task { Rake::Task["spec:rubygems:#{rg}"].invoke }
|
@@ -238,14 +194,14 @@ begin
|
|
238
194
|
puts "\n\e[1;33m[Travis CI] Running bundler sudo specs against rubygems #{rg}\e[m\n\n"
|
239
195
|
sudos = system("sudo -E rake spec:rubygems:#{rg}:sudo")
|
240
196
|
# clean up by chowning the newly root-owned tmp directory back to the travis user
|
241
|
-
system("sudo chown -R #{ENV[
|
197
|
+
system("sudo chown -R #{ENV["USER"]} #{File.join(File.dirname(__FILE__), "tmp")}")
|
242
198
|
|
243
199
|
Rake::Task["spec:rubygems:#{rg}"].reenable
|
244
200
|
|
245
201
|
puts "\n\e[1;33m[Travis CI] Running bundler real world specs against rubygems #{rg}\e[m\n\n"
|
246
202
|
realworld = safe_task { Rake::Task["spec:rubygems:#{rg}:realworld"].invoke }
|
247
203
|
|
248
|
-
{"specs" => specs, "sudo" => sudos, "realworld" => realworld}.each do |name, passed|
|
204
|
+
{ "specs" => specs, "sudo" => sudos, "realworld" => realworld }.each do |name, passed|
|
249
205
|
if passed
|
250
206
|
puts "\e[0;32m[Travis CI] #{name} passed\e[m"
|
251
207
|
else
|
@@ -254,7 +210,7 @@ begin
|
|
254
210
|
end
|
255
211
|
|
256
212
|
unless specs && sudos && realworld
|
257
|
-
|
213
|
+
raise "Spec run failed, please review the log for more information"
|
258
214
|
end
|
259
215
|
end
|
260
216
|
end
|
@@ -263,15 +219,19 @@ rescue LoadError
|
|
263
219
|
task :spec do
|
264
220
|
abort "Run `rake spec:deps` to be able to run the specs"
|
265
221
|
end
|
222
|
+
|
223
|
+
task :rubocop do
|
224
|
+
abort "Run `rake spec:deps` to be able to run rubocop"
|
225
|
+
end
|
266
226
|
end
|
267
227
|
|
268
228
|
begin
|
269
|
-
require
|
229
|
+
require "ronn"
|
270
230
|
|
271
231
|
namespace :man do
|
272
232
|
directory "lib/bundler/man"
|
273
233
|
|
274
|
-
sources = Dir["man/*.ronn"].map{|f| File.basename(f, ".ronn") }
|
234
|
+
sources = Dir["man/*.ronn"].map {|f| File.basename(f, ".ronn") }
|
275
235
|
sources.map do |basename|
|
276
236
|
ronn = "man/#{basename}.ronn"
|
277
237
|
roff = "lib/bundler/man/#{basename}"
|
@@ -289,7 +249,7 @@ begin
|
|
289
249
|
|
290
250
|
task :clean do
|
291
251
|
leftovers = Dir["lib/bundler/man/*"].reject do |f|
|
292
|
-
basename = File.basename(f).sub(/\.(txt|ronn)/,
|
252
|
+
basename = File.basename(f).sub(/\.(txt|ronn)/, "")
|
293
253
|
sources.include?(basename)
|
294
254
|
end
|
295
255
|
rm leftovers if leftovers.any?
|
@@ -303,7 +263,7 @@ begin
|
|
303
263
|
rm_rf "lib/bundler/man"
|
304
264
|
end
|
305
265
|
|
306
|
-
task(:require) {
|
266
|
+
task(:require) {}
|
307
267
|
end
|
308
268
|
|
309
269
|
rescue LoadError
|
@@ -313,13 +273,36 @@ rescue LoadError
|
|
313
273
|
end
|
314
274
|
end
|
315
275
|
|
276
|
+
begin
|
277
|
+
require "automatiek"
|
278
|
+
|
279
|
+
Automatiek::RakeTask.new("molinillo") do |lib|
|
280
|
+
lib.download = { :github => "https://github.com/CocoaPods/Molinillo" }
|
281
|
+
lib.namespace = "Molinillo"
|
282
|
+
lib.prefix = "Bundler"
|
283
|
+
lib.vendor_lib = "lib/bundler/vendor/molinillo"
|
284
|
+
end
|
285
|
+
|
286
|
+
Automatiek::RakeTask.new("thor") do |lib|
|
287
|
+
lib.download = { :github => "https://github.com/erikhuda/thor" }
|
288
|
+
lib.namespace = "Thor"
|
289
|
+
lib.prefix = "Bundler"
|
290
|
+
lib.vendor_lib = "lib/bundler/vendor/thor"
|
291
|
+
end
|
292
|
+
rescue LoadError
|
293
|
+
namespace :vendor do
|
294
|
+
task(:molinillo) { abort "Install the automatiek gem to be able to vendor gems." }
|
295
|
+
task(:thor) { abort "Install the automatiek gem to be able to vendor gems." }
|
296
|
+
end
|
297
|
+
end
|
298
|
+
|
316
299
|
desc "Update vendored SSL certs to match the certs vendored by Rubygems"
|
317
300
|
task :update_certs => "spec:rubygems:clone_rubygems_master" do
|
318
|
-
require
|
301
|
+
require "bundler/ssl_certs/certificate_manager"
|
319
302
|
Bundler::SSLCerts::CertificateManager.update_from!(RUBYGEMS_REPO)
|
320
303
|
end
|
321
304
|
|
322
|
-
require
|
305
|
+
require "bundler/gem_tasks"
|
323
306
|
task :build => ["man:build"]
|
324
307
|
task :release => ["man:require", "man:build"]
|
325
308
|
|
data/bin/rake
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "rubygems"
|
4
|
+
|
5
|
+
bundler_spec = Gem::Specification.load(File.expand_path("../../bundler.gemspec", __FILE__))
|
6
|
+
bundler_spec.dependencies.each do |dep|
|
7
|
+
begin
|
8
|
+
gem dep.name, dep.requirement.to_s
|
9
|
+
rescue Gem::LoadError => e
|
10
|
+
$stderr.puts "#{e.message} (#{e.class})"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
load Gem.bin_path("rake", "rake")
|
data/bin/rspec
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "rubygems"
|
4
|
+
|
5
|
+
bundler_spec = Gem::Specification.load(File.expand_path("../../bundler.gemspec", __FILE__))
|
6
|
+
bundler_spec.dependencies.each do |dep|
|
7
|
+
gem dep.name, dep.requirement.to_s
|
8
|
+
end
|
9
|
+
|
10
|
+
load Gem.bin_path("rspec-core", "rspec")
|
data/bin/rubocop
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "rubygems"
|
4
|
+
|
5
|
+
bundler_spec = Gem::Specification.load(File.expand_path("../../bundler.gemspec", __FILE__))
|
6
|
+
bundler_spec.dependencies.each do |dep|
|
7
|
+
gem dep.name, dep.requirement.to_s
|
8
|
+
end
|
9
|
+
|
10
|
+
gem "rubocop", "= 0.35.1"
|
11
|
+
load Gem.bin_path("rubocop", "rubocop")
|
data/bundler.gemspec
CHANGED
@@ -1,32 +1,34 @@
|
|
1
1
|
# coding: utf-8
|
2
|
-
lib = File.expand_path(
|
2
|
+
lib = File.expand_path("../lib/", __FILE__)
|
3
3
|
$:.unshift lib unless $:.include?(lib)
|
4
|
-
require
|
4
|
+
require "bundler/version"
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
7
|
+
s.name = "bundler"
|
8
8
|
s.version = Bundler::VERSION
|
9
|
-
s.licenses = [
|
9
|
+
s.licenses = ["MIT"]
|
10
10
|
s.authors = ["André Arko", "Terence Lee", "Carl Lerche", "Yehuda Katz"]
|
11
11
|
s.email = ["andre.arko+terence.lee@gmail.com"]
|
12
12
|
s.homepage = "http://bundler.io"
|
13
|
-
s.summary =
|
14
|
-
s.description =
|
13
|
+
s.summary = "The best way to manage your application's dependencies"
|
14
|
+
s.description = "Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably"
|
15
15
|
|
16
|
-
s.required_ruby_version =
|
17
|
-
s.required_rubygems_version =
|
16
|
+
s.required_ruby_version = ">= 1.8.7"
|
17
|
+
s.required_rubygems_version = ">= 1.3.6"
|
18
18
|
|
19
|
-
s.add_development_dependency
|
20
|
-
s.add_development_dependency
|
21
|
-
s.add_development_dependency
|
22
|
-
s.add_development_dependency
|
23
|
-
s.add_development_dependency
|
19
|
+
s.add_development_dependency "automatiek", "~> 0.1.0"
|
20
|
+
s.add_development_dependency "mustache", "0.99.6"
|
21
|
+
s.add_development_dependency "rake", "~> 10.0"
|
22
|
+
s.add_development_dependency "rdiscount", "~> 1.6"
|
23
|
+
s.add_development_dependency "ronn", "~> 0.7.3"
|
24
|
+
s.add_development_dependency "rspec", "~> 3.0"
|
24
25
|
|
25
|
-
s.files
|
26
|
+
s.files = `git ls-files -z`.split("\x0").reject {|f| f.match(%r{^(test|spec|features)/}) }
|
26
27
|
# we don't check in man pages, but we need to ship them because
|
27
28
|
# we use them to generate the long-form help for each command.
|
28
|
-
s.files
|
29
|
+
s.files += Dir.glob("lib/bundler/man/**/*")
|
29
30
|
|
31
|
+
s.bindir = "exe"
|
30
32
|
s.executables = %w(bundle bundler)
|
31
33
|
s.require_paths = ["lib"]
|
32
34
|
end
|
data/exe/bundle
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Exit cleanly from an early interrupt
|
4
|
+
Signal.trap("INT") { exit 1 }
|
5
|
+
|
6
|
+
require "bundler"
|
7
|
+
# Check if an older version of bundler is installed
|
8
|
+
$LOAD_PATH.each do |path|
|
9
|
+
next unless path =~ %r{/bundler-0\.(\d+)} && $1.to_i < 9
|
10
|
+
err = "Looks like you have a version of bundler that's older than 0.9.\n"
|
11
|
+
err << "Please remove your old versions.\n"
|
12
|
+
err << "An easy way to do this is by running `gem cleanup bundler`."
|
13
|
+
abort(err)
|
14
|
+
end
|
15
|
+
|
16
|
+
require "bundler/friendly_errors"
|
17
|
+
Bundler.with_friendly_errors do
|
18
|
+
require "bundler/cli"
|
19
|
+
Bundler::CLI.start(ARGV, :debug => true)
|
20
|
+
end
|
data/{bin → exe}/bundle_ruby
RENAMED
@@ -2,12 +2,14 @@
|
|
2
2
|
|
3
3
|
Signal.trap("INT") { exit 1 }
|
4
4
|
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
5
|
+
require "bundler/ruby_version"
|
6
|
+
require "bundler/ruby_dsl"
|
7
|
+
require "bundler/shared_helpers"
|
8
8
|
|
9
9
|
module Bundler
|
10
10
|
class GemfileError < RuntimeError; end
|
11
|
+
class GemfileEvalError < GemfileError; end
|
12
|
+
|
11
13
|
class Dsl
|
12
14
|
include RubyDsl
|
13
15
|
|
@@ -18,7 +20,7 @@ module Bundler
|
|
18
20
|
end
|
19
21
|
|
20
22
|
def eval_gemfile(gemfile, contents = nil)
|
21
|
-
contents ||= File.open(gemfile, "rb"
|
23
|
+
contents ||= File.open(gemfile, "rb", &:read)
|
22
24
|
instance_eval(contents, gemfile.to_s, 1)
|
23
25
|
rescue SyntaxError => e
|
24
26
|
bt = e.message.split("\n")[1..-1]
|