lib/bundler.rb in bundler-1.0.18 vs lib/bundler.rb in bundler-1.0.19.rc
- old
+ new
@@ -18,10 +18,11 @@
autoload :Definition, 'bundler/definition'
autoload :Dependency, 'bundler/dependency'
autoload :Dsl, 'bundler/dsl'
autoload :Environment, 'bundler/environment'
autoload :GemHelper, 'bundler/gem_helper'
+ autoload :GemInstaller, 'bundler/gem_installer'
autoload :Graph, 'bundler/graph'
autoload :Index, 'bundler/index'
autoload :Installer, 'bundler/installer'
autoload :LazySpecification, 'bundler/lazy_specification'
autoload :LockfileParser, 'bundler/lockfile_parser'
@@ -34,18 +35,19 @@
autoload :Source, 'bundler/source'
autoload :Specification, 'bundler/shared_helpers'
autoload :UI, 'bundler/ui'
class BundlerError < StandardError
- def self.status_code(code = nil)
+ def self.status_code(code)
define_method(:status_code) { code }
end
end
class GemfileNotFound < BundlerError; status_code(10) ; end
class GemNotFound < BundlerError; status_code(7) ; end
class GemfileError < BundlerError; status_code(4) ; end
+ class InstallError < BundlerError; status_code(5) ; end
class PathError < BundlerError; status_code(13) ; end
class GitError < BundlerError; status_code(11) ; end
class DeprecatedError < BundlerError; status_code(12) ; end
class GemspecError < BundlerError; status_code(14) ; end
class DslError < BundlerError; status_code(15) ; end
@@ -109,11 +111,10 @@
@completed_groups ||= []
# Figure out which groups haven't been loaded yet
unloaded = groups - @completed_groups
# Record groups that are now loaded
@completed_groups = groups
- # Load any groups that are not yet loaded
- unloaded.any? ? load.setup(*unloaded) : load
+ unloaded.any? ? load.setup(*groups) : load
end
end
def require(*groups)
setup(*groups).require(*groups)