aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2015-07-18 16:42:16 -0600
committerAndre Arko <andre@arko.net>2015-07-18 16:44:56 -0600
commit14a7eb25ee03c9fb4ecf3e4c6b1f44a8267a413a (patch)
tree080c4590629671f0bf0fc23225b9b4b5e5e16e95 /spec/support
parent6537566d7179d3aee3451ece710cbe79ced95d4c (diff)
downloadbundler-14a7eb25ee03c9fb4ecf3e4c6b1f44a8267a413a.tar.gz
Fix Style/SpaceInsideBlockBraces
closes #3850
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/builders.rb4
-rw-r--r--spec/support/helpers.rb12
-rw-r--r--spec/support/indexes.rb2
-rw-r--r--spec/support/matchers.rb4
-rw-r--r--spec/support/platforms.rb4
-rw-r--r--spec/support/streams.rb4
6 files changed, 15 insertions, 15 deletions
diff --git a/spec/support/builders.rb b/spec/support/builders.rb
index 4d7ad444..c9159e64 100644
--- a/spec/support/builders.rb
+++ b/spec/support/builders.rb
@@ -409,7 +409,7 @@ module Spec
end
def versions(versions)
- versions.split(/\s+/).each { |version| yield v(version) }
+ versions.split(/\s+/).each {|version| yield v(version) }
end
end
@@ -517,7 +517,7 @@ module Spec
@files.each do |file, source|
file = Pathname.new(path).join(file)
FileUtils.mkdir_p(file.dirname)
- File.open(file, "w") { |f| f.puts source }
+ File.open(file, "w") {|f| f.puts source }
end
@spec.files = @files.keys
path
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index d179ea3b..cf8c6d2e 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -66,9 +66,9 @@ module Spec
requires = options.delete(:requires) || []
requires << File.expand_path("../fakeweb/"+options.delete(:fakeweb)+".rb", __FILE__) if options.key?(:fakeweb)
requires << File.expand_path("../artifice/"+options.delete(:artifice)+".rb", __FILE__) if options.key?(:artifice)
- requires_str = requires.map{|r| "-r#{r}"}.join(" ")
+ requires_str = requires.map{|r| "-r#{r}" }.join(" ")
- env = (options.delete(:env) || {}).map{|k, v| "#{k}='#{v}'"}.join(" ")
+ env = (options.delete(:env) || {}).map{|k, v| "#{k}='#{v}'" }.join(" ")
args = options.map do |k, v|
v == true ? " --#{k}" : " --#{k} #{v}" if v
end.join
@@ -86,9 +86,9 @@ module Spec
requires = options.delete(:requires) || []
requires << File.expand_path("../fakeweb/"+options.delete(:fakeweb)+".rb", __FILE__) if options.key?(:fakeweb)
requires << File.expand_path("../artifice/"+options.delete(:artifice)+".rb", __FILE__) if options.key?(:artifice)
- requires_str = requires.map{|r| "-r#{r}"}.join(" ")
+ requires_str = requires.map{|r| "-r#{r}" }.join(" ")
- env = (options.delete(:env) || {}).map{|k, v| "#{k}='#{v}' "}.join
+ env = (options.delete(:env) || {}).map{|k, v| "#{k}='#{v}' " }.join
cmd = "#{env}#{Gem.ruby} -I#{lib} #{requires_str} #{bundle_bin}"
sys_exec(cmd, expect_err){|i| yield i if block_given? }
@@ -96,7 +96,7 @@ module Spec
def ruby(ruby, options = {})
expect_err = options.delete(:expect_err)
- env = (options.delete(:env) || {}).map{|k, v| "#{k}='#{v}' "}.join
+ env = (options.delete(:env) || {}).map{|k, v| "#{k}='#{v}' " }.join
ruby.gsub!(/["`\$]/) {|m| "\\#{m}" }
lib_option = options[:no_lib] ? "" : " -I#{lib}"
sys_exec(%{#{env}#{Gem.ruby}#{lib_option} -e "#{ruby}"}, expect_err)
@@ -355,7 +355,7 @@ module Spec
changed_lines = pathname.readlines.map do |line|
yield line
end
- File.open(pathname, "w") { |file| file.puts(changed_lines.join) }
+ File.open(pathname, "w") {|file| file.puts(changed_lines.join) }
end
def with_env_vars(env_hash, &block)
diff --git a/spec/support/indexes.rb b/spec/support/indexes.rb
index 9761a2cb..119197d4 100644
--- a/spec/support/indexes.rb
+++ b/spec/support/indexes.rb
@@ -7,7 +7,7 @@ module Spec
def platform(*args)
@platforms ||= []
- @platforms.concat args.map { |p| Gem::Platform.new(p) }
+ @platforms.concat args.map {|p| Gem::Platform.new(p) }
end
alias platforms platform
diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb
index b4b18e78..5d5e4a05 100644
--- a/spec/support/matchers.rb
+++ b/spec/support/matchers.rb
@@ -4,13 +4,13 @@ module Spec
dep = Bundler::Dependency.new(*args)
match do |actual|
- actual.length == 1 && actual.all? { |d| d == dep }
+ actual.length == 1 && actual.all? {|d| d == dep }
end
end
RSpec::Matchers.define :have_gem do |*args|
match do |actual|
- actual.length == args.length && actual.all? { |a| args.include?(a.full_name) }
+ actual.length == args.length && actual.all? {|a| args.include?(a.full_name) }
end
end
diff --git a/spec/support/platforms.rb b/spec/support/platforms.rb
index 05122786..fa12523a 100644
--- a/spec/support/platforms.rb
+++ b/spec/support/platforms.rb
@@ -39,7 +39,7 @@ module Spec
end
def not_local
- all_platforms.find { |p| p != generic(Gem::Platform.local) }
+ all_platforms.find {|p| p != generic(Gem::Platform.local) }
end
def local_tag
@@ -51,7 +51,7 @@ module Spec
end
def not_local_tag
- [:ruby, :jruby].find { |tag| tag != local_tag }
+ [:ruby, :jruby].find {|tag| tag != local_tag }
end
def local_ruby_engine
diff --git a/spec/support/streams.rb b/spec/support/streams.rb
index 6a099513..f89c506c 100644
--- a/spec/support/streams.rb
+++ b/spec/support/streams.rb
@@ -4,10 +4,10 @@ def capture(*streams)
streams.map!(&:to_s)
begin
result = StringIO.new
- streams.each { |stream| eval "$#{stream} = result" }
+ streams.each {|stream| eval "$#{stream} = result" }
yield
ensure
- streams.each { |stream| eval("$#{stream} = #{stream.upcase}") }
+ streams.each {|stream| eval("$#{stream} = #{stream.upcase}") }
end
result.string
end