Skip to content

Commit

Permalink
remove redundant begin
Browse files Browse the repository at this point in the history
  • Loading branch information
eitoball committed May 16, 2020
1 parent 8cbbcdd commit 2a685cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
8 changes: 3 additions & 5 deletions app/safecast/tasks/device_story/update_metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ def call

def call
each_metadata(parse(fetch(devices_uri))) do |device_urn, metadata|
begin
find_or_update_device(device_urn, metadata)
rescue ActiveRecord::RecordInvalid
warn "Could not update device metadata for #{device_urn}."
end
find_or_update_device(device_urn, metadata)
rescue ActiveRecord::RecordInvalid
warn "Could not update device metadata for #{device_urn}."
end
end

Expand Down
12 changes: 5 additions & 7 deletions bin/yarn
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@

APP_ROOT = File.expand_path('..', __dir__)
Dir.chdir(APP_ROOT) do
begin
exec 'yarnpkg', *ARGV
rescue Errno::ENOENT
warn 'Yarn executable was not detected in the system.'
warn 'Download Yarn at https://yarnpkg.com/en/docs/install'
exit 1
end
exec 'yarnpkg', *ARGV
rescue Errno::ENOENT
warn 'Yarn executable was not detected in the system.'
warn 'Download Yarn at https://yarnpkg.com/en/docs/install'
exit 1
end

0 comments on commit 2a685cf

Please sign in to comment.