1
0
Fork 0
mirror of https://github.com/pry/pry-rails.git synced 2022-11-09 12:36:03 -05:00

Add Rails 5.2 and 6.0 to build, fixing up issues

In addition to adding scenarios for 5.2 and 6.0, I had to do some
cleanup to get everything working well:

* Replace string-based version checks with numeric ones, and update all
  version checks to treat 6+ the same as 5 (except where necessary).

* Avoid touching `ActiveSupport::Deprecation::DeprecationProxy`
  instances to fix a couple of warnings in Rails 6.

* Update Bundler as part of container setup, because Rails 6's config
  seems to rely on a newer version of Bundler than the one that comes
  with the Ruby image.

* Update the regexes in the `show-routes` spec to be compatible with 5.2
  and up.

* Add a new code path to `show-routes` for Rails 6.

* Upgrade all bundles, just for hygiene.
This commit is contained in:
Ryan Fitzgerald 2018-12-29 15:52:51 -08:00
parent 3fad595b6c
commit 035d5c8203
23 changed files with 102 additions and 25 deletions

View file

@ -2,4 +2,4 @@ FROM ruby:2.0
RUN mkdir -p /scenario
WORKDIR /scenario
ENV LANG=C.UTF-8
CMD (bundle check || bundle install) && bundle exec rake
CMD (bundle check || (gem install bundler && bundle install)) && bundle exec rake

View file

@ -2,4 +2,4 @@ FROM ruby:2.0
RUN mkdir -p /scenario
WORKDIR /scenario
ENV LANG=C.UTF-8
CMD (bundle check || bundle install) && bundle exec rake
CMD (bundle check || (gem install bundler && bundle install)) && bundle exec rake

View file

@ -2,4 +2,4 @@ FROM ruby:2.0
RUN mkdir -p /scenario
WORKDIR /scenario
ENV LANG=C.UTF-8
CMD (bundle check || bundle install) && bundle exec rake
CMD (bundle check || (gem install bundler && bundle install)) && bundle exec rake

View file

@ -2,4 +2,4 @@ FROM ruby:2.3
RUN mkdir -p /scenario
WORKDIR /scenario
ENV LANG=C.UTF-8
CMD (bundle check || bundle install) && bundle exec rake
CMD (bundle check || (gem install bundler && bundle install)) && bundle exec rake

View file

@ -2,4 +2,4 @@ FROM ruby:2.3
RUN mkdir -p /scenario
WORKDIR /scenario
ENV LANG=C.UTF-8
CMD (bundle check || bundle install) && bundle exec rake
CMD (bundle check || (gem install bundler && bundle install)) && bundle exec rake

View file

@ -2,4 +2,4 @@ FROM ruby:2.4
RUN mkdir -p /scenario
WORKDIR /scenario
ENV LANG=C.UTF-8
CMD (bundle check || bundle install) && bundle exec rake
CMD (bundle check || (gem install bundler && bundle install)) && bundle exec rake

View file

@ -2,4 +2,4 @@ FROM ruby:2.4
RUN mkdir -p /scenario
WORKDIR /scenario
ENV LANG=C.UTF-8
CMD (bundle check || bundle install) && bundle exec rake
CMD (bundle check || (gem install bundler && bundle install)) && bundle exec rake

View file

@ -2,4 +2,4 @@ FROM ruby:2.4
RUN mkdir -p /scenario
WORKDIR /scenario
ENV LANG=C.UTF-8
CMD (bundle check || bundle install) && bundle exec rake
CMD (bundle check || (gem install bundler && bundle install)) && bundle exec rake

View file

@ -0,0 +1,15 @@
---
version: "2"
services:
scenario:
build:
context: ..
dockerfile: scenarios/rails52.dockerfile
image: pryrails_scenario_rails52
volumes:
- "..:/scenario"
- "bundle_rails52:/usr/local/bundle"
environment:
BUNDLE_GEMFILE: scenarios/rails52.gemfile
volumes:
bundle_rails52: {}

View file

@ -0,0 +1,5 @@
FROM ruby:2.4
RUN mkdir -p /scenario
WORKDIR /scenario
ENV LANG=C.UTF-8
CMD (bundle check || (gem install bundler && bundle install)) && bundle exec rake

View file

@ -0,0 +1,7 @@
source "https://rubygems.org"
gem "rails", "~> 5.2.0"
gem "mongoid"
gem "sqlite3"
gemspec :path => "../"

View file

@ -0,0 +1,15 @@
---
version: "2"
services:
scenario:
build:
context: ..
dockerfile: scenarios/rails60.dockerfile
image: pryrails_scenario_rails60
volumes:
- "..:/scenario"
- "bundle_rails60:/usr/local/bundle"
environment:
BUNDLE_GEMFILE: scenarios/rails60.gemfile
volumes:
bundle_rails60: {}

View file

@ -0,0 +1,5 @@
FROM ruby:2.5
RUN mkdir -p /scenario
WORKDIR /scenario
ENV LANG=C.UTF-8
CMD (bundle check || (gem install bundler && bundle install)) && bundle exec rake

View file

@ -0,0 +1,7 @@
source "https://rubygems.org"
gem "rails", github: "rails/rails"
gem "mongoid"
gem "sqlite3"
gemspec :path => "../"