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.
- data/CHANGELOG.md +7 -0
- data/lib/bundler/cli.rb +3 -2
- data/lib/bundler/runtime.rb +7 -3
- data/lib/bundler/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG.md
CHANGED
data/lib/bundler/cli.rb
CHANGED
|
@@ -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'"
|
data/lib/bundler/runtime.rb
CHANGED
|
@@ -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 |
|
|
101
|
-
|
|
102
|
-
|
|
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
|
|
data/lib/bundler/version.rb
CHANGED