bundler 0.9.22 → 0.9.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,10 @@
1
+ ## 0.9.23 (April 20, 2010)
2
+
3
+ Bugfixes:
4
+
5
+ - cache command no longer prunes gems created by an older rubygems version
6
+ - cache command no longer prunes gems that are for other platforms
7
+
1
8
  ## 0.9.22 (April 20, 2010)
2
9
 
3
10
  Features:
@@ -72,6 +72,7 @@ module Bundler
72
72
  method_option "relock", :type => :boolean, :banner => "Unlock, install the gems, and relock."
73
73
  method_option "disable-shared-gems", :type => :boolean, :banner => "Do not use any shared gems, such as the system gem repository."
74
74
  method_option "gemfile", :type => :string, :banner => "Use the specified gemfile instead of Gemfile"
75
+ method_option "no-prune", :type => :boolean, :banner => "Don't remove stale gems from the cache."
75
76
  def install(path = nil)
76
77
  opts = options.dup
77
78
  opts[:without] ||= []
@@ -91,11 +92,11 @@ module Bundler
91
92
  raise GemfileChanged, "You changed your Gemfile after locking. " +
92
93
  "Please run `bundle install --relock`."
93
94
  end
94
- Bundler.ui.confirm "Your bundle is complete! " +
95
- "Use `bundle show [gemname]` to see where a bundled gem is installed."
96
95
 
97
96
  lock if options[:relock]
98
97
  cache if Bundler.root.join("vendor/cache").exist?
98
+ Bundler.ui.confirm "Your bundle is complete! " +
99
+ "Use `bundle show [gemname]` to see where a bundled gem is installed."
99
100
  rescue GemNotFound => e
100
101
  if Bundler.definition.sources.empty?
101
102
  Bundler.ui.warn "Your Gemfile doesn't have any sources. You can add one with a line like 'source :gemcutter'"
@@ -97,9 +97,13 @@ module Bundler
97
97
  FileUtils.mkdir_p(cache_path)
98
98
 
99
99
  Bundler.ui.info "Removing outdated .gem files from vendor/cache"
100
- cache_path.children.each do |gemfile|
101
- spec = Gem::Format.from_file_by_path(gemfile).spec
102
- gemfile.rmtree unless specs.include?(spec)
100
+ cache_path.children.each do |gem_path|
101
+ cached_spec = Gem::Format.from_file_by_path(gem_path).spec
102
+ next unless cached_spec.platform =~ Gem::Platform.local
103
+ unless specs.any?{|s| s.full_name == cached_spec.full_name }
104
+ Bundler.ui.info " * #{File.basename(gem_path)}"
105
+ gem_path.rmtree
106
+ end
103
107
  end
104
108
  end
105
109
 
@@ -1,3 +1,3 @@
1
1
  module Bundler
2
- VERSION = "0.9.22"
2
+ VERSION = "0.9.23"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 22
9
- version: 0.9.22
8
+ - 23
9
+ version: 0.9.23
10
10
  platform: ruby
11
11
  authors:
12
12
  - Carl Lerche