Skip to content

Commit

Permalink
Upgrade to Ruby 2.5.1
Browse files Browse the repository at this point in the history
The current version of Ruby, 2.3.1, is "In security maintenance phase
(will EOL soon!)", so upgrade to the newest available stable version of
Ruby.

I had to update Webmock as well because the version we were on is
incompatible with Ruby >= 2.4 [1]

[1]: bblimke/webmock#683
  • Loading branch information
chrismytton committed Oct 9, 2018
1 parent 82a4a15 commit 60dad7a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AllCops:
DisplayCopNames: true
TargetRubyVersion: 2.3
TargetRubyVersion: 2.5

Metrics/LineLength:
Max: 120
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ script:
- bundle exec rake
sudo: false
rvm:
- 2.3.1
- 2.5.1
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source 'https://rubygems.org'

# Warning: update the README, .travis.yml and TargetRubyVersion in .rubocop.yml
# if this version is changed:
ruby '2.3.1'
ruby '2.5.1'

git_source(:github) { |repo_name| "https://github.com/#{repo_name}.git" }

Expand All @@ -22,5 +22,5 @@ group :test do
gem 'pry'
gem 'rack-test'
gem 'rubocop'
gem 'webmock'
gem 'webmock', '~> 3.4.2'
end
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ GIT
GEM
remote: https://rubygems.org/
specs:
addressable (2.5.0)
public_suffix (~> 2.0, >= 2.0.2)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
ast (2.4.0)
autoprefixer-rails (6.7.0)
execjs
Expand All @@ -30,7 +30,7 @@ GEM
everypolitician-popolo (0.8.0)
require_all
execjs (2.7.0)
hashdiff (0.3.0)
hashdiff (0.3.7)
json (2.0.3)
method_source (0.8.2)
mini_portile2 (2.3.0)
Expand All @@ -46,7 +46,7 @@ GEM
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
public_suffix (2.0.4)
public_suffix (3.0.3)
rack (2.0.5)
rack-protection (2.0.4)
rack
Expand Down Expand Up @@ -83,7 +83,7 @@ GEM
tilt (2.0.8)
tins (1.13.2)
unicode-display_width (1.3.0)
webmock (2.1.0)
webmock (3.4.2)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
Expand All @@ -107,7 +107,7 @@ DEPENDENCIES
webmock

RUBY VERSION
ruby 2.3.1p112
ruby 2.5.1p57

BUNDLED WITH
1.14.6
1.16.5
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ For example, if you are using
[rbenv](https://cbednarski.com/articles/installing-ruby/):

1. Install the right Ruby version. That would be the version specified at the
beginning of the Gemfile. For example, if it was `ruby '2.3.1'`, you would type:
beginning of the Gemfile. For example, if it was `ruby '2.5.1'`, you would type:
```bash
rbenv install 2.3.1
rbenv install 2.5.1
rbenv rehash
```
2. Then you would move to the root directory of this project and type:
```bash
rbenv local 2.3.1
rbenv local 2.5.1
ruby -v
```

Expand Down
2 changes: 1 addition & 1 deletion bin/build_summaries.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def build_slug_to_uuid

def format_date(partial_iso8601)
return partial_iso8601 if partial_iso8601 =~ /^\d{4}$/
if /^\d{4}-\d{2}/ =~ partial_iso8601
if /^\d{4}-\d{2}/.match?(partial_iso8601)
d = Date.parse(partial_iso8601 + '-01')
return d.strftime('%B %Y')
end
Expand Down

0 comments on commit 60dad7a

Please sign in to comment.