summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Koronen <koronen@kth.se>2015-08-08 16:54:20 +0200
committerVictor Koronen <koronen@kth.se>2015-08-14 12:29:44 +0200
commit3dcd4d5ba009873f2499787f1dbfbf10cd6ec134 (patch)
tree03f02ff425201445ec15ce95285c60b0d129b268
parent1964fb87d73b6efb2331b3628ca0daf5fcb2515d (diff)
downloadbundler-3dcd4d5ba009873f2499787f1dbfbf10cd6ec134.tar.gz
Fix Style/MethodDefParentheses
-rw-r--r--.rubocop_todo.yml6
-rw-r--r--lib/bundler/cli/gem.rb2
-rw-r--r--lib/bundler/fetcher.rb2
-rw-r--r--lib/bundler/graph.rb2
4 files changed, 3 insertions, 9 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 9383ef757b..33b16c6c44 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -223,12 +223,6 @@ Style/LineEndConcatenation:
Style/MethodCallParentheses:
Enabled: false
-# Offense count: 3
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles.
-Style/MethodDefParentheses:
- Enabled: false
-
# Offense count: 2
Style/ModuleFunction:
Enabled: false
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index de673fa69d..2704bbec7c 100644
--- a/lib/bundler/cli/gem.rb
+++ b/lib/bundler/cli/gem.rb
@@ -195,7 +195,7 @@ module Bundler
req.join(".")
end
- def ensure_safe_gem_name name, constant_array
+ def ensure_safe_gem_name(name, constant_array)
if name =~ /^\d/
Bundler.ui.error "Invalid gem name #{name} Please give a name which does not start with numbers."
exit 1
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index 829b709c38..6236bee7b6 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -223,7 +223,7 @@ module Bundler
end
# cached gem specification path, if one exists
- def gemspec_cached_path spec_file_name
+ def gemspec_cached_path(spec_file_name)
paths = Bundler.rubygems.spec_cache_dirs.map {|dir| File.join(dir, spec_file_name) }
paths = paths.select {|path| File.file? path }
paths.first
diff --git a/lib/bundler/graph.rb b/lib/bundler/graph.rb
index 6bf5c2d151..4c5d9efd34 100644
--- a/lib/bundler/graph.rb
+++ b/lib/bundler/graph.rb
@@ -95,7 +95,7 @@ module Bundler
# method borrow from rubygems/dependency.rb
# redefinition of matching_specs will also redefine to_spec and to_specs
Gem::Dependency.class_eval do
- def matching_specs platform_only = false
+ def matching_specs(platform_only = false)
matches = Bundler.load.specs.select { |spec|
self.name == spec.name and
requirement.satisfied_by? spec.version