Skip to content

Commit d3cf0d5

Browse files
committed
Fix violations of rubocop Style/SpaceInsideBlockBraces.
1 parent ff182ec commit d3cf0d5

167 files changed

Lines changed: 390 additions & 388 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ Style/NumericLiterals:
3939
Style/Semicolon:
4040
AllowAsExpressionSeparator: true
4141

42+
Style/SpaceInsideBlockBraces:
43+
EnforcedStyle: no_space
44+
SpaceBeforeBlockParameters: false
45+
4246
Style/WordArray:
4347
MinSize: 5
4448

bin/cron/push_latest_rds_backup_to_secondary_account

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def share_snapshot_with_account(backup_account_id, latest_snapshot)
6868
puts "Temporary snapshot #{copied_snapshot.snapshot_id} is ready - #{Time.now}"
6969

7070
# Share the new snapshot with the backup account
71-
restore_attribute = copied_snapshot.attributes.find { |attr| attr.name == 'restore' }
71+
restore_attribute = copied_snapshot.attributes.find {|attr| attr.name == 'restore'}
7272
restore_attribute.modify(
7373
{
7474
values_to_add: [backup_account_id],
@@ -95,11 +95,11 @@ def main
9595
rds_backup = Aws::RDS::Resource.new(credentials: credentials_backup)
9696
backup_account_id = Aws::STS::Client.new(credentials: credentials_backup).get_caller_identity.account
9797

98-
production_instance = rds_primary.db_instances.find { |i| i.id == 'production' }
98+
production_instance = rds_primary.db_instances.find {|i| i.id == 'production'}
9999

100100
# Find the latest automated backup
101101
sorted_snapshots = production_instance.snapshots.
102-
select { |snap| snap.status == 'available' && !snap.snapshot_id.start_with?('temp-snapshot-') }.
102+
select {|snap| snap.status == 'available' && !snap.snapshot_id.start_with?('temp-snapshot-')}.
103103
sort_by(&:snapshot_create_time)
104104
latest_snapshot = sorted_snapshots.last
105105

bin/i18n/sync-codeorg-in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def reformat_quotes
3636
filenames.each do |filename|
3737
temp_file = Tempfile.new("temp#{filename}.yml")
3838
File.open("dashboard/config/locales/#{filename}.en.yml", "r") do |f|
39-
f.each_line { |line| temp_file.puts line.gsub("'\"", '"').gsub("\"'", '"').gsub("''", "'")}
39+
f.each_line {|line| temp_file.puts line.gsub("'\"", '"').gsub("\"'", '"').gsub("''", "'")}
4040
end
4141
temp_file.close
4242
FileUtils.mv(temp_file.path, "dashboard/config/locales/#{filename}.en.yml")

bin/i18n/sync-hourofcode-out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ end
174174

175175
# Returns the contents of the file at path.
176176
def read_file(path)
177-
File.open(path) { |f| return f.read }
177+
File.open(path) {|f| return f.read}
178178
end
179179

180180
# Returns a tempfile containing str.

bin/ls_frontend_servers

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ CDO.log.level = Logger::WARN
1919
if __FILE__ == $0
2020
json_format = false
2121
OptionParser.new do |opts|
22-
opts.on('-j', '--json', 'Format output as Json') { json_format = true }
23-
opts.on('-h', '--help', 'Print this') { puts opts; exit }
22+
opts.on('-j', '--json', 'Format output as Json') {json_format = true}
23+
opts.on('-h', '--help', 'Print this') {puts opts; exit}
2424
end.parse!
2525

2626
output = CDO.app_servers
2727
if json_format
2828
puts output.to_json
2929
else
30-
output.each {|k, v| puts "#{k}\t#{v}" }
30+
output.each {|k, v| puts "#{k}\t#{v}"}
3131
end
3232
end

bin/mail/2016-12-12-hoc-post-survey/generate-organizers

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ US_VALUES = {
5050
def us?(row)
5151
US_VALUES.each do |key, values|
5252
row_value = row[key.to_s]
53-
return true if row_value && values.any? {|v| v.casecmp(row_value).zero? }
53+
return true if row_value && values.any? {|v| v.casecmp(row_value).zero?}
5454
end
5555

5656
false

bin/mail/hoc-2015-latam-mailing/generate-mailing-list-hoc-2015-latam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ COUNTRIES = [
7070
].freeze
7171

7272
QUERY = COUNTRIES.
73-
map {|country| %Q|(kind_s:"HocSignup2015" && location_country_s:"#{country}")| }.
73+
map {|country| %Q|(kind_s:"HocSignup2015" && location_country_s:"#{country}")|}.
7474
join(" || ")
7575

7676
puts QUERY

bin/mail/hoc-2015-mailing/generate-mailing-list-hoc-2015-latam

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ CSEDWEEK_COUNTRIES = %w(
9191
).freeze
9292

9393
HOC_SIGNUP_QUERY = HOC_SIGNUP_COUNTRIES.
94-
map {|country| %Q|(kind_s:"HocSignup2014" && location_country_s:"#{country}")| }.
94+
map {|country| %Q|(kind_s:"HocSignup2014" && location_country_s:"#{country}")|}.
9595
join(" || ")
9696
CSEDWEEK_QUERY = CSEDWEEK_COUNTRIES.
97-
map {|country| %Q|(kind_s:"CSEdWeekEvent2013" && country_s:"#{country}")| }.
97+
map {|country| %Q|(kind_s:"CSEdWeekEvent2013" && country_s:"#{country}")|}.
9898
join(" || ")
9999

100100
QUERY = HOC_SIGNUP_QUERY + " || " + CSEDWEEK_QUERY

bin/mail/old-isolated-scripts/generate-mailing-list-cities

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ SETS = {
8282
$key = ARGV[0].to_sym || raise("Usage: #{$0} #{SETS.keys.join('|')}")
8383

8484
def city_query
85-
queries = SETS[$key][:cities].map { |city| %(create_ip_city_s:"#{city}")}
85+
queries = SETS[$key][:cities].map {|city| %(create_ip_city_s:"#{city}")}
8686
"(#{queries.join(' || ')})"
8787
end
8888

bin/mail/old-isolated-scripts/generate-mailing-list-new-jersey.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
}.freeze
8787

8888
def city_query
89-
queries = SETS[$key][:cities].map { |city| %(create_ip_city_s:"#{city}")}
89+
queries = SETS[$key][:cities].map {|city| %(create_ip_city_s:"#{city}")}
9090
"(#{queries.join(' || ')})"
9191
end
9292

0 commit comments

Comments
 (0)