Skip to content

Commit

Permalink
Merge pull request #1 from civisanalytics/civis-6117
Browse files Browse the repository at this point in the history
[CIVIS-6117] ruby 3.1, 3.2, and 3.3 upgrade
  • Loading branch information
thatguyinabeanie authored May 20, 2024
2 parents 9d351b4 + 499ce2d commit 74376c5
Show file tree
Hide file tree
Showing 26 changed files with 500 additions and 125 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ tmp
*.swo
.ruby-version
.ruby-gemset
.env
155 changes: 138 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
# This Travis CI matrix specifies different combinations of Ruby versions and gemfiles to test against.
# Each combination will be run as a separate job in the Travis CI build.


language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1.10
- 2.2.6
- 2.3.3
- 2.4.0
- jruby-19mode # JRuby in 1.9 mode
# The versions listed below will be expanded to the latest patch version of each minor version.
# For example, 2.1 will be expanded to 2.1.10.
- 2.1
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- 2.7
- 3.0
- 3.1
- 3.2
- 3.3
# - jruby-19mode # JRuby in 1.9 mode
# - rbx-2

before_install:
Expand All @@ -17,21 +28,131 @@ gemfile:
- gemfiles/4.0.gemfile
- gemfiles/4.1.gemfile
- gemfiles/4.2.gemfile
- gemfiles/5.0.gemfile
- gemfiles/5.1.gemfile
- gemfiles/5.2.gemfile
- gemfiles/6.0.gemfile
- gemfiles/6.1.gemfile
- gemfiles/7.0.gemfile
- gemfiles/7.1.gemfile

script: bundle exec rspec && gem build civis-authority.gemspec

matrix:
exclude:
- rvm: rbx
gemfile: gemfiles/4.0.gemfile
- rvm: 2.4.0
# Rails 3.2
- rvm: 2.5
gemfile: gemfiles/3.2.gemfile
- rvm: 2.7
gemfile: gemfiles/3.2.gemfile
- rvm: 3.0
gemfile: gemfiles/3.2.gemfile
- rvm: 3.1
gemfile: gemfiles/3.2.gemfile
- rvm: 3.2
gemfile: gemfiles/3.2.gemfile
- rvm: 3.3
gemfile: gemfiles/3.2.gemfile
- rvm: 2.4.0

# Rails 4.0
- rvm: 2.7
gemfile: gemfiles/4.0.gemfile
- rvm: 3.0
gemfile: gemfiles/4.0.gemfile
- rvm: 3.1
gemfile: gemfiles/4.0.gemfile
- rvm: 3.2
gemfile: gemfiles/4.0.gemfile
- rvm: 3.3
gemfile: gemfiles/4.0.gemfile

# Rails 4.1
- rvm: 2.7
gemfile: gemfiles/4.1.gemfile
- rvm: 3.0
gemfile: gemfiles/4.1.gemfile
- rvm: 2.4.0
- rvm: 3.1
gemfile: gemfiles/4.1.gemfile
- rvm: 3.2
gemfile: gemfiles/4.1.gemfile
- rvm: 3.3
gemfile: gemfiles/4.1.gemfile

# Rails 4.2
- rvm: 2.7
gemfile: gemfiles/4.2.gemfile
include:
- rvm: 2.2.6
gemfile: gemfiles/5.0.gemfile
- rvm: 2.3.3
- rvm: 3.0
gemfile: gemfiles/4.2.gemfile
- rvm: 3.1
gemfile: gemfiles/4.2.gemfile
- rvm: 3.2
gemfile: gemfiles/4.2.gemfile
- rvm: 3.3
gemfile: gemfiles/4.2.gemfile

# Rails 5.0
- rvm: 2.1
gemfile: gemfiles/5.0.gemfile
- rvm: 2.4.0
- rvm: 3.0
gemfile: gemfiles/5.0.gemfile

# Rails 5.1
- rvm: 2.1
gemfile: gemfiles/5.1.gemfile
- rvm: 3.0
gemfile: gemfiles/5.1.gemfile

# Rails 5.2
- rvm: 2.1
gemfile: gemfiles/5.2.gemfile
- rvm: 3.0
gemfile: gemfiles/5.2.gemfile

# Rails 6.0
- rvm: 2.1
gemfile: gemfiles/6.0.gemfile
- rvm: 2.3
gemfile: gemfiles/6.0.gemfile
- rvm: 2.4
gemfile: gemfiles/6.0.gemfile
- rvm: 2.2
gemfile: gemfiles/6.0.gemfile

# Rails 6.1
- rvm: 2.1
gemfile: gemfiles/6.1.gemfile
- rvm: 2.2
gemfile: gemfiles/6.1.gemfile
- rvm: 2.3
gemfile: gemfiles/6.1.gemfile
- rvm: 2.4
gemfile: gemfiles/6.1.gemfile

# Rails 7.0
- rvm: 2.1
gemfile: gemfiles/7.0.gemfile
- rvm: 2.2
gemfile: gemfiles/7.0.gemfile
- rvm: 2.3
gemfile: gemfiles/7.0.gemfile
- rvm: 2.4
gemfile: gemfiles/7.0.gemfile
- rvm: 2.5
gemfile: gemfiles/7.0.gemfile
- rvm: 2.6
gemfile: gemfiles/7.0.gemfile

# Rails 7.1
- rvm: 2.1
gemfile: gemfiles/7.1.gemfile
- rvm: 2.2
gemfile: gemfiles/7.1.gemfile
- rvm: 2.3
gemfile: gemfiles/7.1.gemfile
- rvm: 2.4
gemfile: gemfiles/7.1.gemfile
- rvm: 2.5
gemfile: gemfiles/7.1.gemfile
- rvm: 2.6
gemfile: gemfiles/7.1.gemfile

9 changes: 6 additions & 3 deletions CHANGELOG.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

Authority does its best to use [semantic versioning](http://semver.org).

## Unreleased
## 4.0.0

(nothing)
- Drops support for Ruby 1.X
- Drops support for Ruby 2.0
- Adds support for Ruby 3.0, 3.1, 3.2, and 3.3
- Adds support for Rails 5.1, 5.2, 6.0, 6.1, 7.0, and 7.1

## 3.3.0

Expand Down Expand Up @@ -41,7 +44,7 @@ Officially drop support for Ruby < 1.9.3 and Rails < 3.2.

## v2.9.0

Add `all_actions` option for `authorize_actions_for`, thanks to [Igor Davydov](https://github.com/div).
Add `all_actions` option for `authorize_actions_for`, thanks to [Igor Davydov](https://github.com/div).

## v2.8.1

Expand Down
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ARG RUBY_VERSION
FROM --platform=linux/amd64 ruby:${RUBY_VERSION}
ARG RAILS_VERSION

# Set the working directory in the container to /app
WORKDIR /src

# Add metadata to the image to describe which port the container is listening on at runtime
EXPOSE 3000

COPY ./gemfiles ./gemfiles
COPY civis-authority.gemspec .
COPY ./lib/authority/version.rb ./lib/authority/version.rb


RUN cp ./gemfiles/${RAILS_VERSION}.gemfile ./Gemfile && \
sed -i -e '$ d' './Gemfile' && \
echo "gemspec" >> ./Gemfile && \
bundle install

COPY . .

Loading

0 comments on commit 74376c5

Please sign in to comment.