Skip to content
This repository has been archived by the owner on Jul 11, 2021. It is now read-only.

Commit

Permalink
Update for Ruby 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
nerab committed Mar 8, 2018
1 parent 235f967 commit 0288d01
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AllCops:
TargetRubyVersion: 2.4.2
TargetRubyVersion: 2.5.0
Include:
- '**/Gemfile'
- '**/Guardfile'
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.4.2
ruby-2.5.0
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: ruby
rvm:
- 2.4.2
- 2.5.0
script:
- bundle exec rubocop
- bundle exec rake spec:ci
43 changes: 21 additions & 22 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ GEM
remote: http://rubygems.org/
specs:
addressable (2.4.0)
ast (2.3.0)
backports (3.10.3)
ast (2.4.0)
backports (3.11.1)
byebug (10.0.0)
coderay (1.1.2)
crack (0.4.3)
safe_yaml (~> 1.0.0)
diff-lcs (1.3)
ethon (0.10.1)
ethon (0.11.0)
ffi (>= 1.3.0)
faraday (0.13.1)
faraday (0.14.0)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.12.2)
faraday (>= 0.7.4, < 1.0)
ffi (1.9.18)
ffi (1.9.23)
formatador (0.2.5)
gh (0.15.1)
addressable (~> 2.4.0)
Expand All @@ -24,10 +24,10 @@ GEM
multi_json (~> 1.0)
net-http-persistent (~> 2.9)
net-http-pipeline
guard (2.14.1)
guard (2.14.2)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (~> 1.0)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
Expand All @@ -43,7 +43,7 @@ GEM
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
hashdiff (0.3.7)
highline (1.7.8)
highline (1.7.10)
json (2.1.0)
launchy (2.4.3)
addressable (~> 2.3)
Expand All @@ -53,7 +53,7 @@ GEM
ruby_dep (~> 1.2)
lumberjack (1.0.12)
method_source (0.9.0)
multi_json (1.12.2)
multi_json (1.13.1)
multipart-post (2.0.0)
mustermann (1.0.2)
nenv (0.3.0)
Expand All @@ -62,9 +62,9 @@ GEM
notiffany (0.1.1)
nenv (~> 0.1)
shellany (~> 0.0)
parallel (1.12.0)
parser (2.4.0.0)
ast (~> 2.2)
parallel (1.12.1)
parser (2.5.0.3)
ast (~> 2.4.0)
powerpack (0.1.1)
pry (0.11.3)
coderay (~> 1.1.0)
Expand All @@ -81,10 +81,9 @@ GEM
rack
rack-test (0.8.3)
rack (>= 1.0, < 3)
rainbow (2.2.2)
rake
rainbow (3.0.0)
rake (12.3.0)
rb-fsevent (0.10.2)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rb-readline (0.5.5)
Expand All @@ -96,20 +95,20 @@ GEM
rspec-mocks (~> 3.7.0)
rspec-collection_matchers (1.1.3)
rspec-expectations (>= 2.99.0.beta1)
rspec-core (3.7.0)
rspec-core (3.7.1)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-mocks (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.0)
rubocop (0.51.0)
rspec-support (3.7.1)
rubocop (0.53.0)
parallel (~> 1.10)
parser (>= 2.3.3.1, < 3.0)
parser (>= 2.5)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 3.0)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.9.0)
Expand Down Expand Up @@ -142,7 +141,7 @@ GEM
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
websocket (1.2.4)
websocket (1.2.5)

PLATFORMS
ruby
Expand All @@ -167,4 +166,4 @@ DEPENDENCIES
webmock

BUNDLED WITH
1.15.4
1.16.1
12 changes: 4 additions & 8 deletions lib/love_track/songs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,11 @@ class SongsController < Sinatra::Base
configure :production do
set :notifier, Notifier.new(ENV.fetch('SLACK_WEBHOOK_URL'))
end

# rubocop:disable Lint/RescueWithoutErrorClass
get '/' do
begin
"#{Time.new}: #{song}"
rescue => e
warn e.inspect
[500, "Sorry; #{e.message}"]
end
"#{Time.new}: #{song}"
rescue StandardError => e
warn e.inspect
[500, "Sorry; #{e.message}"]
end

post '/' do
Expand Down
1 change: 1 addition & 0 deletions spec/system/love_track/songs_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,4 @@ def app
end
end
end
# rubocop:enable Metrics/BlockLength

0 comments on commit 0288d01

Please sign in to comment.