Commit e7386e9e authored by Samuel Giddins's avatar Samuel Giddins

[RuboCop] Fix offenses

parent d4f63d95
...@@ -391,14 +391,14 @@ module Pod ...@@ -391,14 +391,14 @@ module Pod
source_file = validation_dir.+('App/main.m') source_file = validation_dir.+('App/main.m')
source_file.parent.mkpath source_file.parent.mkpath
import_statement = if use_frameworks import_statement = if use_frameworks
"@import #{pod_target.product_module_name};\n" "@import #{pod_target.product_module_name};\n"
else else
header_name = "#{pod_target.product_module_name}/#{pod_target.product_module_name}.h" header_name = "#{pod_target.product_module_name}/#{pod_target.product_module_name}.h"
if pod_target.sandbox.public_headers.root.+(header_name).file? if pod_target.sandbox.public_headers.root.+(header_name).file?
"#import <#{header_name}>\n" "#import <#{header_name}>\n"
else else
'' ''
end end
end end
source_file.open('w') { |f| f << "@import Foundation;\n#{import_statement}int main() {}\n" } source_file.open('w') { |f| f << "@import Foundation;\n#{import_statement}int main() {}\n" }
end end
...@@ -678,7 +678,7 @@ module Pod ...@@ -678,7 +678,7 @@ module Pod
# returns its output (both STDOUT and STDERR). # returns its output (both STDOUT and STDERR).
# #
def xcodebuild def xcodebuild
command = %W(clean build -workspace App.xcworkspace -scheme App) command = %w(clean build -workspace App.xcworkspace -scheme App)
case consumer.platform_name case consumer.platform_name
when :ios when :ios
command += %w(CODE_SIGN_IDENTITY=- -sdk iphonesimulator) command += %w(CODE_SIGN_IDENTITY=- -sdk iphonesimulator)
...@@ -706,7 +706,7 @@ module Pod ...@@ -706,7 +706,7 @@ module Pod
# #
def _xcodebuild(command) def _xcodebuild(command)
UI.puts 'xcodebuild ' << command.join(' ') if config.verbose UI.puts 'xcodebuild ' << command.join(' ') if config.verbose
Executable.capture_command('xcodebuild', command, capture: :merge) Executable.capture_command('xcodebuild', command, :capture => :merge)
end end
#-------------------------------------------------------------------------# #-------------------------------------------------------------------------#
......
...@@ -406,10 +406,10 @@ module Pod ...@@ -406,10 +406,10 @@ module Pod
Executable.stubs(:which).with('git').returns(git) Executable.stubs(:which).with('git').returns(git)
Executable.expects(:which).with('xcodebuild').times(4).returns('/usr/bin/xcodebuild') Executable.expects(:which).with('xcodebuild').times(4).returns('/usr/bin/xcodebuild')
command = %w(clean build -workspace App.xcworkspace -scheme App) command = %w(clean build -workspace App.xcworkspace -scheme App)
Executable.expects(:capture_command).with('xcodebuild', command, capture: :merge).once.returns(['', stub(:success? => true)]) Executable.expects(:capture_command).with('xcodebuild', command, :capture => :merge).once.returns(['', stub(:success? => true)])
Executable.expects(:capture_command).with('xcodebuild', command + %w(CODE_SIGN_IDENTITY=- -sdk appletvsimulator), capture: :merge).once.returns(['', stub(:success? => true)]) Executable.expects(:capture_command).with('xcodebuild', command + %w(CODE_SIGN_IDENTITY=- -sdk appletvsimulator), :capture => :merge).once.returns(['', stub(:success? => true)])
Executable.expects(:capture_command).with('xcodebuild', command + %w(CODE_SIGN_IDENTITY=- -sdk iphonesimulator), capture: :merge).once.returns(['', stub(:success? => true)]) Executable.expects(:capture_command).with('xcodebuild', command + %w(CODE_SIGN_IDENTITY=- -sdk iphonesimulator), :capture => :merge).once.returns(['', stub(:success? => true)])
Executable.expects(:capture_command).with('xcodebuild', command + %w(CODE_SIGN_IDENTITY=- -sdk watchsimulator), capture: :merge).once.returns(['', stub(:success? => true)]) Executable.expects(:capture_command).with('xcodebuild', command + %w(CODE_SIGN_IDENTITY=- -sdk watchsimulator), :capture => :merge).once.returns(['', stub(:success? => true)])
validator.validate validator.validate
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment