aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler
diff options
context:
space:
mode:
authorErick Sasse <esasse@gmail.com>2015-07-19 12:22:06 -0300
committerErick Sasse <esasse@gmail.com>2015-07-19 12:22:06 -0300
commit4c462af674aa9fd46ca5af32b755436f0d6598f6 (patch)
tree896cadfa03f2aa02b9b1044463859138822b36db /lib/bundler
parent1bedb85afd03d5d20c1eda1e1b387feaeda0c500 (diff)
downloadbundler-4c462af674aa9fd46ca5af32b755436f0d6598f6.tar.gz
Fix pending offenses
Diffstat (limited to 'lib/bundler')
-rw-r--r--lib/bundler/definition.rb8
-rw-r--r--lib/bundler/index.rb8
-rw-r--r--lib/bundler/installer.rb2
-rw-r--r--lib/bundler/rubygems_ext.rb4
-rw-r--r--lib/bundler/similarity_detector.rb2
-rw-r--r--lib/bundler/spec_set.rb2
6 files changed, 13 insertions, 13 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 679dc3e0..f6558731 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -364,9 +364,9 @@ module Bundler
deleted.concat deleted_deps.map {|d| "* #{pretty_dep(d)}" }
end
- both_sources = Hash.new { |h, k| h[k] = [] }
- @dependencies.each { |d| both_sources[d.name][0] = d }
- @locked_deps.each { |d| both_sources[d.name][1] = d.source }
+ both_sources = Hash.new {|h, k| h[k] = [] }
+ @dependencies.each {|d| both_sources[d.name][0] = d }
+ @locked_deps.each {|d| both_sources[d.name][1] = d.source }
both_sources.each do |name, (dep, lock_source)|
if (dep.nil? && !lock_source.nil?) || (!dep.nil? && !lock_source.nil? && !lock_source.can_lock?(dep))
@@ -455,7 +455,7 @@ module Bundler
locals = []
Bundler.settings.local_overrides.map do |k, v|
- spec = @dependencies.find { |s| s.name == k }
+ spec = @dependencies.find {|s| s.name == k }
source = spec && spec.source
if source && source.respond_to?(:local_override!)
source.unlock! if @unlock[:gems].include?(spec.name)
diff --git a/lib/bundler/index.rb b/lib/bundler/index.rb
index 7a4b9ba4..3468aa75 100644
--- a/lib/bundler/index.rb
+++ b/lib/bundler/index.rb
@@ -16,16 +16,16 @@ module Bundler
def initialize
@sources = []
@cache = {}
- @specs = Hash.new { |h, k| h[k] = Hash.new }
- @all_specs = Hash.new { |h, k| h[k] = [] }
+ @specs = Hash.new {|h, k| h[k] = Hash.new }
+ @all_specs = Hash.new {|h, k| h[k] = [] }
end
def initialize_copy(o)
super
@sources = @sources.dup
@cache = {}
- @specs = Hash.new { |h, k| h[k] = Hash.new }
- @all_specs = Hash.new { |h, k| h[k] = [] }
+ @specs = Hash.new {|h, k| h[k] = Hash.new }
+ @all_specs = Hash.new {|h, k| h[k] = [] }
o.specs.each do |name, hash|
@specs[name] = hash.dup
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index 1525ec13..9169148f 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -125,7 +125,7 @@ module Bundler
if options.any?
Bundler.ui.warn "#{spec.name} has no executables, but you may want " +
"one from a gem it depends on."
- options.each{|name, bins| Bundler.ui.warn " #{name} has: #{bins.join(", ")}" }
+ options.each {|name, bins| Bundler.ui.warn " #{name} has: #{bins.join(", ")}" }
else
Bundler.ui.warn "There are no executables for the gem #{spec.name}."
end
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb
index 90560cba..b0ea9301 100644
--- a/lib/bundler/rubygems_ext.rb
+++ b/lib/bundler/rubygems_ext.rb
@@ -10,7 +10,7 @@ require "rubygems/specification"
require "bundler/match_platform"
module Gem
- @loaded_stacks = Hash.new { |h, k| h[k] = [] }
+ @loaded_stacks = Hash.new {|h, k| h[k] = [] }
class Specification
attr_accessor :remote, :location, :relative_loaded_from
@@ -122,7 +122,7 @@ module Gem
def to_lock
out = " #{name}"
unless requirement == Gem::Requirement.default
- reqs = requirement.requirements.map{|o, v| "#{o} #{v}" }.sort.reverse
+ reqs = requirement.requirements.map {|o, v| "#{o} #{v}" }.sort.reverse
out << " (#{reqs.join(", ")})"
end
out
diff --git a/lib/bundler/similarity_detector.rb b/lib/bundler/similarity_detector.rb
index 2b90b266..26f69d30 100644
--- a/lib/bundler/similarity_detector.rb
+++ b/lib/bundler/similarity_detector.rb
@@ -16,7 +16,7 @@ module Bundler
# return the result of 'similar_words', concatenated into a list
# (eg "a, b, or c")
def similar_word_list(word, limit = 3)
- words = similar_words(word,limit)
+ words = similar_words(word, limit)
if words.length == 1
words[0]
elsif words.length > 1
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb
index 9823f3fc..bf064eb2 100644
--- a/lib/bundler/spec_set.rb
+++ b/lib/bundler/spec_set.rb
@@ -129,7 +129,7 @@ module Bundler
def lookup
@lookup ||= begin
- lookup = Hash.new { |h, k| h[k] = [] }
+ lookup = Hash.new {|h, k| h[k] = [] }
specs = @specs.sort_by do |s|
s.platform.to_s == "ruby" ? "\0" : s.platform.to_s
end