Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
Merge pull request #179 from remind101/brad_heroku-18-test
Browse files Browse the repository at this point in the history
Update Ruby version and Heroku stack version
  • Loading branch information
jherico authored Jun 10, 2021
2 parents d2c20a5 + 1e3cd60 commit 4ffc897
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
jobs:
test:
runs-on: ubuntu-20.04
container: library/ruby:2.5.1
container: library/ruby:2.6.7
services:
postgres:
image: library/postgres:9.6
Expand Down
12 changes: 5 additions & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
AllCops:
NewCops: enable
DisplayCopNames: true
ExtraDetails: true
Include:
Expand All @@ -11,7 +12,7 @@ AllCops:
- 'script/**/*'
- 'vendor/**/*'

Metrics/LineLength:
Layout/LineLength:
Enabled: false

Metrics/MethodLength:
Expand Down Expand Up @@ -62,10 +63,10 @@ Metrics/BlockLength:
Lint/AmbiguousBlockAssociation:
Enabled: false

Layout/IndentArray:
Layout/FirstArrayElementIndentation:
Enabled: false

Layout/IndentHeredoc:
Layout/HeredocIndentation:
Enabled: false

Style/StringLiterals:
Expand All @@ -86,7 +87,7 @@ Style/NestedParenthesizedCalls:
Lint/UnusedBlockArgument:
Enabled: false

Lint/HandleExceptions:
Lint/SuppressedException:
Enabled: false

Style/HashSyntax:
Expand All @@ -95,9 +96,6 @@ Style/HashSyntax:
Style/GuardClause:
Enabled: false

Performance/RedundantMerge:
Enabled: false

Style/SymbolArray:
Enabled: false

Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.1
2.6.7
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cache: bundler
# - gem install bundler
dist: trusty
rvm:
- 2.5.1
- 2.6.7
before_script:
- psql -c 'create database travis_ci_test;' -U postgres
- ./bin/rake db:setup
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The following external dependencies are also required:

* `Postgresql 9.6`
* `Redis`
* `Ruby 2.5.1` (optionally `rbenv`)
* `Ruby 2.6.7` (optionally `rbenv`)
* `bundler`

### macOS
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.5.1
FROM ruby:2.6.7

RUN apt-get update && apt-get install -y \
build-essential openssl libssl-dev libpq-dev postgresql-client
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

ruby '2.5.1'
ruby '2.6.7'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 4.2.10'
Expand Down Expand Up @@ -48,7 +48,7 @@ group :development, :test do
gem 'rspec', '~> 3.7.0'
gem 'rspec-rails'
gem 'rspec-activemodel-mocks'
gem 'rubocop', '~> 0.58.0'
gem 'rubocop', '~> 1.16.0'

gem 'pry', '0.10.3'
gem 'pry-rails', '0.3.4'
Expand Down
36 changes: 19 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ GEM
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
arel (6.0.4)
ast (2.4.0)
ast (2.4.2)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
Expand Down Expand Up @@ -96,7 +96,6 @@ GEM
i18n (0.9.5)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
jaro_winkler (1.5.4)
jquery-rails (4.3.5)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
Expand Down Expand Up @@ -140,16 +139,15 @@ GEM
omniauth-oauth2 (1.6.0)
oauth2 (~> 1.1)
omniauth (~> 1.9)
parallel (1.18.0)
parser (2.6.5.0)
ast (~> 2.4.0)
parallel (1.20.1)
parser (3.0.1.1)
ast (~> 2.4.1)
pg (0.21.0)
pg_array_parser (0.0.9)
postgres_ext (3.0.1)
activerecord (~> 4.0)
arel (>= 4.0.1)
pg_array_parser (~> 0.0.9)
powerpack (0.1.2)
pry (0.10.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
Expand Down Expand Up @@ -192,9 +190,10 @@ GEM
rake (13.0.1)
redis (4.1.3)
ref (2.0.0)
regexp_parser (1.6.0)
regexp_parser (1.8.2)
request_store (1.4.1)
rack (>= 1.4)
rexml (3.2.5)
rollbar (2.8.3)
multi_json
rspec (3.7.0)
Expand Down Expand Up @@ -222,15 +221,18 @@ GEM
rspec-mocks (~> 3.7.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.1)
rubocop (0.58.2)
jaro_winkler (~> 1.5.1)
rubocop (1.16.0)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.7.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.10.1)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.7.0)
parser (>= 3.0.1.1)
ruby-progressbar (1.11.0)
safe_yaml (1.0.5)
sassc (2.2.1)
ffi (~> 1.9)
Expand Down Expand Up @@ -275,7 +277,7 @@ GEM
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.6.0)
unicode-display_width (2.0.0)
virtus (1.0.5)
axiom-types (~> 0.1)
coercible (~> 1.0)
Expand Down Expand Up @@ -327,7 +329,7 @@ DEPENDENCIES
rspec (~> 3.7.0)
rspec-activemodel-mocks
rspec-rails
rubocop (~> 0.58.0)
rubocop (~> 1.16.0)
sassc-rails
sidekiq
spring
Expand All @@ -340,7 +342,7 @@ DEPENDENCIES
webmock

RUBY VERSION
ruby 2.5.1p57
ruby 2.6.7p197

BUNDLED WITH
1.16.6
1.17.2
2 changes: 1 addition & 1 deletion config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment', __FILE__)
require ::File.expand_path('config/environment', __dir__)

run Rails.application
17 changes: 17 additions & 0 deletions spec/controllers/sessions_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
require 'rails_helper'

# Solve rake failures post-upgrade to Ruby 2.6.x per https://github.com/rails/rails/issues/34790#issuecomment-450502805more
if RUBY_VERSION>='2.6.0'
if Rails.version < '5'
class ActionController::TestResponse < ActionDispatch::TestResponse
def recycle!
# hack to avoid MonitorMixin double-initialize error:
@mon_mutex_owner_object_id = nil
@mon_mutex = nil
initialize
end
end
else
puts "Monkeypatch for ActionController::TestResponse no longer needed"
end
end


RSpec.describe SessionsController, type: :controller do
fixtures :users, :github_accounts

Expand Down

0 comments on commit 4ffc897

Please sign in to comment.