Skip to content

Commit b73c782

Browse files
Fix rubocop Rakefile issues
1 parent 93cb8a5 commit b73c782

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

android_tests/Rakefile

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ require 'rubygems'
22
require 'rake'
33
require 'rubocop/rake_task'
44

5-
task :default => :android
5+
task default: :android
66

77
# Run sh and ignore exception
8+
# rubocop:disable Lint/HandleExceptions
89
def run_sh(cmd)
9-
begin
10-
sh cmd
11-
rescue
12-
end
10+
sh cmd
11+
rescue
1312
end
1413

1514
# Run cmd. On failure run install and try again.

ios_tests/Rakefile

+6-7
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ require 'rubygems'
22
require 'rake'
33
require 'rubocop/rake_task'
44

5-
task :default => :ios
5+
task default: :ios
66

77
# Run sh and ignore exception
8+
# rubocop:disable Lint/HandleExceptions
89
def run_sh(cmd)
9-
begin
10-
sh cmd
11-
rescue
12-
end
10+
sh cmd
11+
rescue
1312
end
1413

1514
# Run cmd. On failure run install and try again.
@@ -32,13 +31,13 @@ end
3231
# Run all tests with:
3332
# rake ios
3433
desc 'Run the iOS tests'
35-
task :ios, :args, :test_file do |args, test_file|
34+
task :ios, :args, :test_file do |_args, test_file|
3635
# rake android['ok']
3736
# args = android
3837
# test_file = {:args=>"ok"}
3938
test_file = test_file[:args]
4039
cmd = 'bundle exec ruby ./lib/run.rb ios'
41-
cmd += %Q( "#{test_file}") if test_file
40+
cmd += %( "#{test_file}") if test_file
4241
bash cmd
4342
end
4443

0 commit comments

Comments
 (0)