summaryrefslogtreecommitdiff
path: root/lib/bundler/plugin.rb
diff options
context:
space:
mode:
authorAsutosh Palai <asupalai@gmail.com>2016-06-22 00:39:34 +0530
committerAsutosh Palai <asupalai@gmail.com>2016-07-03 09:40:59 +0530
commit4c2ec5ef0d0e45bb08576d45bb3d5043f6656cc6 (patch)
treeb1af80a977ac56aa86214127eee76f3c60781a6f /lib/bundler/plugin.rb
parent267002b2374d01a63041d8494b80a33df9c13f9a (diff)
downloadbundler-4c2ec5ef0d0e45bb08576d45bb3d5043f6656cc6.tar.gz
Few correction from suggestions
Diffstat (limited to 'lib/bundler/plugin.rb')
-rw-r--r--lib/bundler/plugin.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/bundler/plugin.rb b/lib/bundler/plugin.rb
index 98a03362d8..425f64609f 100644
--- a/lib/bundler/plugin.rb
+++ b/lib/bundler/plugin.rb
@@ -128,11 +128,11 @@ module Bundler
#
# @param [Hash] plugins mapped to their installtion path
# @param [Array<String>] names of auto added source plugins that can be ignored
- def save_plugins(plugins, optionals = [])
+ def save_plugins(plugins, optional_plugins = [])
plugins.each do |name, path|
path = Pathname.new path
validate_plugin! path
- register_plugin name, path, optionals.include?(name)
+ register_plugin name, path, optional_plugins.include?(name)
Bundler.ui.info "Installed plugin #{name}"
end
end
@@ -153,9 +153,9 @@ module Bundler
#
# @param [String] name the name of the plugin
# @param [Pathname] path the path where the plugin is installed at
- # @param [Boolean] optional_plugin, removed if there is conflict (used for
- # default source plugins)
- def register_plugin(name, path, optional = false)
+ # @param [Boolean] optional_plugin, removed if there is conflict with any
+ # other plugin (used for default source plugins)
+ def register_plugin(name, path, optional_plugin = false)
commands = @commands
sources = @sources
@@ -168,7 +168,7 @@ module Bundler
raise MalformattedPlugin, "#{e.class}: #{e.message}"
end
- if optional && @sources.keys.any? {|s| source? s }
+ if optional_plugin && @sources.keys.any? {|s| source? s }
Bundler.rm_rf(path)
else
index.register_plugin name, path.to_s, @commands.keys, @sources.keys