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.

@@ -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