Permalink
Browse files

WIP move more methods over

  • Loading branch information...
1 parent b093333 commit ecf9a79b18c0a3f9d692fa90c96a96937bef5e0e Carlhuda committed Dec 11, 2009
Showing with 14 additions and 17 deletions.
  1. +13 −4 lib/bundler/bundle.rb
  2. +1 −1 lib/bundler/cli.rb
  3. +0 −12 lib/bundler/environment.rb
View
@@ -115,6 +115,19 @@ def cache2(*gemfiles)
end
end
+ def list_outdated(options={})
+ outdated_gems = source_index.outdated.sort
+
+ if outdated_gems.empty?
+ Bundler.logger.info "All gems are up to date."
+ else
+ Bundler.logger.info "Outdated gems:"
+ outdated_gems.each do |name|
+ Bundler.logger.info " * #{name}"
+ end
+ end
+ end
+
def prune(dependencies, sources)
sources.each do |s|
s.repository = self
@@ -137,10 +150,6 @@ def gems
source_index.gems.values
end
- def outdated_gems
- source_index.outdated.sort
- end
-
def source_index
index = Gem::SourceIndex.from_gems_in(@path.join("specifications"))
index.each { |n, spec| spec.loaded_from = @path.join("specifications", "#{spec.full_name}.gemspec") }
View
@@ -53,7 +53,7 @@ def list
end
def list_outdated
- @environment.list_outdated(@options)
+ @bundle.list_outdated(@options)
end
def exec
@@ -54,18 +54,6 @@ def list(options = {})
end
end
- def list_outdated(options={})
- outdated_gems = repository.outdated_gems
- if outdated_gems.empty?
- Bundler.logger.info "All gems are up to date."
- else
- Bundler.logger.info "Outdated gems:"
- outdated_gems.each do |name|
- Bundler.logger.info " * #{name}"
- end
- end
- end
-
def require_env(env = nil)
dependencies.each { |d| d.require_env(env) }
end

0 comments on commit ecf9a79

Please sign in to comment.