bundler 0.9.26 → 1.0.0.beta.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.
- data/CHANGELOG.md +7 -0
- data/README.md +3 -1
- data/ROADMAP.md +19 -34
- data/TODO.md +16 -0
- data/lib/bundler.rb +87 -41
- data/lib/bundler/cli.rb +115 -73
- data/lib/bundler/definition.rb +203 -34
- data/lib/bundler/dependency.rb +77 -0
- data/lib/bundler/dsl.rb +57 -16
- data/lib/bundler/environment.rb +13 -109
- data/lib/bundler/graph.rb +130 -0
- data/lib/bundler/index.rb +19 -41
- data/lib/bundler/installer.rb +22 -58
- data/lib/bundler/lazy_specification.rb +67 -0
- data/lib/bundler/lockfile_parser.rb +100 -0
- data/lib/bundler/remote_specification.rb +2 -1
- data/lib/bundler/resolver.rb +185 -45
- data/lib/bundler/rubygems_ext.rb +105 -6
- data/lib/bundler/runtime.rb +24 -82
- data/lib/bundler/settings.rb +9 -5
- data/lib/bundler/setup.rb +6 -14
- data/lib/bundler/shared_helpers.rb +2 -25
- data/lib/bundler/source.rb +306 -132
- data/lib/bundler/spec_set.rb +77 -17
- data/lib/bundler/templates/Executable +28 -0
- data/lib/bundler/vendor/thor.rb +31 -4
- data/lib/bundler/vendor/thor/invocation.rb +1 -1
- data/lib/bundler/vendor/thor/parser/arguments.rb +14 -3
- data/lib/bundler/vendor/thor/parser/options.rb +0 -5
- data/lib/bundler/vendor/thor/shell/basic.rb +28 -0
- data/lib/bundler/vendor/thor/task.rb +6 -6
- data/lib/bundler/vendor/thor/util.rb +13 -14
- data/lib/bundler/vendor/thor/version.rb +1 -1
- data/lib/bundler/version.rb +1 -1
- metadata +11 -5
- data/lib/bundler/templates/environment.erb +0 -91
@@ -1,91 +0,0 @@
|
|
1
|
-
# DO NOT MODIFY THIS FILE
|
2
|
-
# Generated by Bundler <%= Bundler::VERSION %>
|
3
|
-
|
4
|
-
require 'digest/sha1'
|
5
|
-
require 'yaml'
|
6
|
-
<%= shared_helpers %>
|
7
|
-
|
8
|
-
module Bundler
|
9
|
-
ENV_LOADED = true
|
10
|
-
LOCKED_BY = '<%= Bundler::VERSION %>'
|
11
|
-
FINGERPRINT = <%= gemfile_fingerprint.inspect %>
|
12
|
-
HOME = '<%= Bundler.home %>'
|
13
|
-
AUTOREQUIRES = <%= autorequires_for_groups.inspect %>
|
14
|
-
SPECS = [
|
15
|
-
<% specs_for_lock_file.each do |spec| -%>
|
16
|
-
<%= spec.inspect %>,
|
17
|
-
<% end -%>
|
18
|
-
].map do |hash|
|
19
|
-
if hash[:virtual_spec]
|
20
|
-
spec = eval(hash[:virtual_spec], TOPLEVEL_BINDING, "<virtual spec for '#{hash[:name]}'>")
|
21
|
-
else
|
22
|
-
dir = File.dirname(hash[:loaded_from])
|
23
|
-
spec = Dir.chdir(dir){ eval(File.read(hash[:loaded_from]), TOPLEVEL_BINDING, hash[:loaded_from]) }
|
24
|
-
end
|
25
|
-
spec.loaded_from = hash[:loaded_from]
|
26
|
-
spec.require_paths = hash[:load_paths]
|
27
|
-
if spec.loaded_from.include?(HOME)
|
28
|
-
Bundler::Specification.from_gemspec(spec)
|
29
|
-
else
|
30
|
-
spec
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
extend SharedHelpers
|
35
|
-
|
36
|
-
def self.configure_gem_path_and_home(specs)
|
37
|
-
# Fix paths, so that Gem.source_index and such will work
|
38
|
-
paths = specs.map{|s| s.installation_path }
|
39
|
-
paths.flatten!; paths.compact!; paths.uniq!; paths.reject!{|p| p.empty? }
|
40
|
-
ENV['GEM_PATH'] = paths.join(File::PATH_SEPARATOR)
|
41
|
-
ENV['GEM_HOME'] = paths.first
|
42
|
-
Gem.clear_paths
|
43
|
-
end
|
44
|
-
|
45
|
-
def self.match_fingerprint
|
46
|
-
lockfile = File.expand_path('../../Gemfile.lock', __FILE__)
|
47
|
-
lock_print = YAML.load(File.read(lockfile))["hash"] if File.exist?(lockfile)
|
48
|
-
gem_print = Digest::SHA1.hexdigest(File.read(File.expand_path('../../Gemfile', __FILE__)))
|
49
|
-
|
50
|
-
unless gem_print == lock_print
|
51
|
-
abort 'Gemfile changed since you last locked. Please run `bundle lock` to relock.'
|
52
|
-
end
|
53
|
-
|
54
|
-
unless gem_print == FINGERPRINT
|
55
|
-
abort 'Your bundled environment is out of date. Run `bundle install` to regenerate it.'
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
def self.setup(*groups)
|
60
|
-
match_fingerprint
|
61
|
-
clean_load_path
|
62
|
-
cripple_rubygems(SPECS)
|
63
|
-
configure_gem_path_and_home(SPECS)
|
64
|
-
SPECS.each do |spec|
|
65
|
-
Gem.loaded_specs[spec.name] = spec
|
66
|
-
spec.require_paths.each do |path|
|
67
|
-
$LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path)
|
68
|
-
end
|
69
|
-
end
|
70
|
-
self
|
71
|
-
end
|
72
|
-
|
73
|
-
def self.require(*groups)
|
74
|
-
groups = [:default] if groups.empty?
|
75
|
-
groups.each do |group|
|
76
|
-
(AUTOREQUIRES[group.to_sym] || []).each do |file, explicit|
|
77
|
-
if explicit
|
78
|
-
Kernel.require file
|
79
|
-
else
|
80
|
-
begin
|
81
|
-
Kernel.require file
|
82
|
-
rescue LoadError
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
# Set up load paths unless this file is being loaded after the Bundler gem
|
90
|
-
setup unless defined?(Bundler::GEM_LOADED)
|
91
|
-
end
|