Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 84 lines (67 sloc) 1.963 kB
63b636b First pass at gemfile pack
Carlhuda authored
1 require 'fileutils'
ce350cc Get a simple bbl install working
Carlhuda authored
2 require 'pathname'
88741e6 First pass at bbl lock
Carlhuda authored
3 require 'yaml'
152a50a Rename gemfile back to bundler
Carl Lerche authored
4 require 'bundler/rubygems'
ce350cc Get a simple bbl install working
Carlhuda authored
5
152a50a Rename gemfile back to bundler
Carl Lerche authored
6 module Bundler
de65328 Bump up the version
Carl Lerche authored
7 VERSION = "0.9.0.pre3"
67859e4 Moving in thor
Carlhuda authored
8
152a50a Rename gemfile back to bundler
Carl Lerche authored
9 autoload :Definition, 'bundler/definition'
10 autoload :Dependency, 'bundler/dependency'
11 autoload :Dsl, 'bundler/dsl'
12 autoload :Environment, 'bundler/environment'
13 autoload :Index, 'bundler/index'
14 autoload :Installer, 'bundler/installer'
15 autoload :RemoteSpecification, 'bundler/remote_specification'
16 autoload :Resolver, 'bundler/resolver'
17 autoload :Source, 'bundler/source'
18 autoload :Specification, 'bundler/specification'
434fb42 First pass at output
Carlhuda authored
19 autoload :UI, 'bundler/ui'
67859e4 Moving in thor
Carlhuda authored
20
21 class GemfileNotFound < StandardError; end
22 class GemNotFound < StandardError; end
23 class VersionConflict < StandardError; end
88741e6 First pass at bbl lock
Carlhuda authored
24 class GemfileError < StandardError; end
67859e4 Moving in thor
Carlhuda authored
25
434fb42 First pass at output
Carlhuda authored
26 def self.ui
27 @ui ||= UI.new
28 end
29
30 def self.ui=(ui)
31 @ui = ui
32 end
33
8637b67 Implementing groups and install --without
Carlhuda authored
34 def self.setup(*groups)
35 gemfile = default_gemfile
36 load(gemfile).setup(*groups)
ce350cc Get a simple bbl install working
Carlhuda authored
37 end
38
ee0e2c1 Start working on the environment.rb lock file
Carl Lerche authored
39 def self.load(gemfile = default_gemfile)
40 root = Pathname.new(gemfile).dirname
41 Environment.new root, definition(gemfile)
67859e4 Moving in thor
Carlhuda authored
42 end
43
ee0e2c1 Start working on the environment.rb lock file
Carl Lerche authored
44 def self.definition(gemfile = default_gemfile)
4317f3c Fix the lock stuff
Carl Lerche authored
45 root = Pathname.new(gemfile).dirname
46 lockfile = root.join("vendor/lock.yml")
88741e6 First pass at bbl lock
Carlhuda authored
47 if lockfile.exist?
48 Definition.from_lock(lockfile)
49 else
50 Definition.from_gemfile(gemfile)
51 end
67859e4 Moving in thor
Carlhuda authored
52 end
f31835e More work towards awesomeness
Carlhuda authored
53
54 def self.home
f329d58 Add first round of source pinning support
Carl Lerche authored
55 Pathname.new(Gem.dir).join("bundler")
f31835e More work towards awesomeness
Carlhuda authored
56 end
57
0d2492d Add more stuff for git
Carl Lerche authored
58 def self.install_path
59 home.join("gems")
60 end
61
f31835e More work towards awesomeness
Carlhuda authored
62 def self.cache
63 home.join("cache")
64 end
ee0e2c1 Start working on the environment.rb lock file
Carl Lerche authored
65
63b636b First pass at gemfile pack
Carlhuda authored
66 def self.root
67 default_gemfile.dirname
68 end
69
ee0e2c1 Start working on the environment.rb lock file
Carl Lerche authored
70 private
71
72 def self.default_gemfile
73 current = Pathname.new(Dir.pwd)
74
75 until current.root?
76 filename = current.join("Gemfile")
77 return filename if filename.exist?
78 current = current.parent
79 end
80
81 raise GemfileNotFound, "The default Gemfile was not found"
82 end
83
67859e4 Moving in thor
Carlhuda authored
84 end
Something went wrong with that request. Please try again.