diff options
author | Asutosh Palai <asupalai@gmail.com> | 2016-06-06 12:40:55 +0530 |
---|---|---|
committer | Asutosh Palai <asupalai@gmail.com> | 2016-06-06 12:41:06 +0530 |
commit | 008722762079ecc00470a577fc3d4a9416b39506 (patch) | |
tree | e422518a4723bc3088b5761f56b83fa1a0433fdf /lib/bundler/plugin | |
parent | cb7286d8815d774fdabcae91e5f987260d9871e0 (diff) | |
download | bundler-008722762079ecc00470a577fc3d4a9416b39506.tar.gz |
Fixed the issues raised in comments
Diffstat (limited to 'lib/bundler/plugin')
-rw-r--r-- | lib/bundler/plugin/api.rb | 2 | ||||
-rw-r--r-- | lib/bundler/plugin/dsl.rb | 4 | ||||
-rw-r--r-- | lib/bundler/plugin/installer.rb | 8 |
3 files changed, 6 insertions, 8 deletions
diff --git a/lib/bundler/plugin/api.rb b/lib/bundler/plugin/api.rb index ea9ff1ea12..4771c26121 100644 --- a/lib/bundler/plugin/api.rb +++ b/lib/bundler/plugin/api.rb @@ -21,7 +21,7 @@ module Bundler # To use it without inheriting, you will have to create an object of this # to use the functions (except for declaration functions like command, source, # and hooks). - class Plugin::Api + class Plugin::API # The plugins should declare that they handle a command through this helper. # # @param [String] command being handled by them diff --git a/lib/bundler/plugin/dsl.rb b/lib/bundler/plugin/dsl.rb index 89d9140aed..dc1eb538d5 100644 --- a/lib/bundler/plugin/dsl.rb +++ b/lib/bundler/plugin/dsl.rb @@ -2,7 +2,7 @@ module Bundler # Dsl to parse the Gemfile looking for plugins to install - class Plugin::Dsl < Bundler::Dsl + class Plugin::DSL < Bundler::Dsl alias_method :_gem, :gem # To use for plugin installation as gem # So that we don't have to override all there methods to dummy ones @@ -20,7 +20,7 @@ module Bundler end def method_missing(name, *args) - # Dummy evaluation + super unless Bundler::Dsl.instance_methods.include? name end end end diff --git a/lib/bundler/plugin/installer.rb b/lib/bundler/plugin/installer.rb index d4de0be502..38ca58ba09 100644 --- a/lib/bundler/plugin/installer.rb +++ b/lib/bundler/plugin/installer.rb @@ -34,7 +34,7 @@ module Bundler definition.resolve_remotely! specs = definition.specs - paths = install_from_spec specs + paths = install_from_specs specs paths.select {|name, _| plugins.include? name } end @@ -74,7 +74,7 @@ module Bundler idx = rg_source.specs specs = Resolver.resolve(deps_proxies, idx).materialize([dep]) - paths = install_from_spec specs + paths = install_from_specs specs paths[name] end @@ -85,12 +85,10 @@ module Bundler # @param specs to install # # @return [Hash] map of names to path where the plugin was installed - def install_from_spec(specs) + def install_from_specs(specs) paths = {} specs.each do |spec| - next if spec.name == "bundler" - spec.source.install spec paths[spec.name] = spec.full_gem_path |