diff options
author | Asutosh Palai <asupalai@gmail.com> | 2016-06-22 14:20:06 +0530 |
---|---|---|
committer | Asutosh Palai <asupalai@gmail.com> | 2016-07-03 09:41:58 +0530 |
commit | 4bf1b97b939a8e094484d045e389e9b066197ec4 (patch) | |
tree | 3518dbcad7c84f62426d882d321751db8526cc23 /lib/bundler/plugin.rb | |
parent | d7c0c3fc498c4696d78a07bc350fb2fc4e642b38 (diff) | |
download | bundler-4bf1b97b939a8e094484d045e389e9b066197ec4.tar.gz |
Fixed plugin install order for 1.8.7
Diffstat (limited to 'lib/bundler/plugin.rb')
-rw-r--r-- | lib/bundler/plugin.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/bundler/plugin.rb b/lib/bundler/plugin.rb index ed77813c..85ae33af 100644 --- a/lib/bundler/plugin.rb +++ b/lib/bundler/plugin.rb @@ -28,7 +28,7 @@ module Bundler def install(names, options) paths = Installer.new.install(names, options) - save_plugins paths + save_plugins names, paths rescue PluginError => e paths.values.map {|path| Bundler.rm_rf(path) } if paths Bundler.ui.error "Failed to install plugin #{name}: #{e.message}\n #{e.backtrace[0]}" @@ -49,9 +49,10 @@ module Bundler return if definition.dependencies.empty? - plugins = Installer.new.install_definition(definition) + plugins = definition.dependencies.map(&:name) + install_paths = Installer.new.install_definition(definition) - save_plugins plugins, builder.inferred_plugins + save_plugins plugins, install_paths, builder.inferred_plugins end # The index object used to store the details about the plugin @@ -128,9 +129,9 @@ module Bundler # # @param [Hash] plugins mapped to their installation path # @param [Array<String>] names of inferred source plugins that can be ignored - def save_plugins(plugins, optional_plugins = []) - plugins.each do |name, path| - path = Pathname.new path + def save_plugins(plugins, paths, optional_plugins = []) + plugins.each do |name| + path = Pathname.new paths[name] validate_plugin! path register_plugin name, path, optional_plugins.include?(name) Bundler.ui.info "Installed plugin #{name}" |