aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/installer.rb
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2010-02-03 22:40:20 -0800
committerCarl Lerche <carllerche@mac.com>2010-02-03 22:49:16 -0800
commitc0f8641c397205bd498c0f58f7bd83dbd3a552da (patch)
treea1547ea64413db36adbd773dc281a153edaefd75 /lib/bundler/installer.rb
parent4582d39bf9b6c4a2cda880daee646a0bfb2ea8d5 (diff)
downloadbundler-c0f8641c397205bd498c0f58f7bd83dbd3a552da.tar.gz
Persist spec groups to the lockfile
Diffstat (limited to 'lib/bundler/installer.rb')
-rw-r--r--lib/bundler/installer.rb26
1 files changed, 1 insertions, 25 deletions
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index 2b440317..02c3f424 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -1,18 +1,11 @@
require 'rubygems/dependency_installer'
module Bundler
- class Installer
+ class Installer < Environment
def self.install(root, definition, options)
new(root, definition).run(options)
end
- attr_reader :root
-
- def initialize(root, definition)
- @root = root
- @definition = definition
- end
-
def run(options)
if dependencies.empty?
Bundler.ui.warn "The Gemfile specifies no dependencies"
@@ -82,23 +75,6 @@ module Bundler
specs
end
- def group_specs(specs)
- dependencies.each do |d|
- spec = specs.find { |s| s.name == d.name }
- group_spec(specs, spec, d.groups)
- end
- specs
- end
-
- def group_spec(specs, spec, groups)
- spec.groups.concat(groups)
- spec.groups.uniq!
- spec.dependencies.select { |d| d.type != :development }.each do |d|
- spec = specs.find { |s| s.name == d.name }
- group_spec(specs, spec, groups)
- end
- end
-
def ambiguous?(dep)
dep.version_requirements.requirements.any? { |op,_| op != '=' }
end