Skip to content

Commit 8a5bc11

Browse files
committed
Fix rubocop errors
1 parent 6f6ede3 commit 8a5bc11

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/bankrupt.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def asset_html(path, cdn, local, options = nil)
167167
# @param options [Hash] the options has to convert
168168
# @return [String] concatenated options suitable for use in lookups
169169
def options_string(options)
170-
return nil if Hash(options).size.zero?
170+
return nil if Hash(options).empty?
171171

172172
options.map do |k, v|
173173
[k.to_s, v.to_s].join
@@ -182,7 +182,7 @@ def options_string(options)
182182
def actual_options?(options)
183183
return false if options.nil?
184184

185-
if (options.is_a?(String) || options.is_a?(Hash)) && !options.size.zero?
185+
if (options.is_a?(String) || options.is_a?(Hash)) && !options.empty?
186186
true
187187
else
188188
false

lib/bankrupt/tasks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
s3 = Aws::S3::Client.new(region: 'eu-west-1')
3030

3131
JSON.parse(File.read(File.join(APP_ROOT, 'tmp', 'assets.json')),
32-
symbolize_names: true).each do |_key, asset|
32+
symbolize_names: true).each_value do |asset|
3333
r = s3.put_object(
3434
bucket: CDN_BUCKET,
3535
key: if asset[:hashless]

0 commit comments

Comments
 (0)