Skip to content

Commit

Permalink
Upgrade dev setup and base docker image to ruby 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Danial Pearce committed Dec 24, 2021
1 parent cf4404f commit dd6bbe0
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 23 deletions.
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
AllCops:
TargetRubyVersion: 2.6
TargetRubyVersion: 3.0

Gemspec/RequiredRubyVersion:
Enabled: false

Eval:
Exclude:
Expand Down
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: ruby
rvm:
- 2.6.8
- 2.7.4
- 2.6.9
- 2.7.5
- 3.0.3
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGES

## 1.7.2 (2021-12-24)

* Upgrade dev setup and base docker image to ruby 3.0

## 1.7.1 (2021-08-31)

* Dependency upgrades. Uplift of release process.
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.6-alpine@sha256:fff44cacf0eee17e86eb66a8047d7a14e851e009f4c9e2bf0bd787b7bb324893 as build
FROM ruby:3.0-alpine@sha256:9afcc885895358e84929c19ea53cb62ecc50daf93dcbd45de469f2e668d96e9a as build

WORKDIR /app
COPY bin /app/bin
Expand All @@ -10,7 +10,7 @@ COPY LICENSE.md /app/
COPY stackup.gemspec /app/
RUN gem build stackup.gemspec

FROM ruby:2.6-alpine@sha256:fff44cacf0eee17e86eb66a8047d7a14e851e009f4c9e2bf0bd787b7bb324893
FROM ruby:3.0-alpine@sha256:9afcc885895358e84929c19ea53cb62ecc50daf93dcbd45de469f2e668d96e9a

MAINTAINER https://github.com/realestate-com-au/stackup

Expand Down
16 changes: 7 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# frozen_string_literal: true

source "https://rubygems.org" do
source "https://rubygems.org"

gemspec
gemspec

gem "rake", "~> 12.1"

group :test do
gem "byebug"
gem "rspec", "~> 3.7"
gem "rubocop", "~> 0.93"
end
gem "rake", "~> 12.1"

group :test do
gem "byebug"
gem "rspec", "~> 3.7"
gem "rubocop", "~> 0.93"
end
2 changes: 1 addition & 1 deletion auto/dev-environment
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ cd $(dirname $0)/..

trap "docker-compose down --volumes" 0

docker volume create --name ruby2.6-bundle-cache > /dev/null
docker volume create --name ruby3.0-bundle-cache > /dev/null
docker-compose run --rm dev sh -c 'bundle check > /dev/null || bundle install'
docker-compose run --rm dev bundle exec "${@-bash}"
2 changes: 1 addition & 1 deletion auto/release-gem
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ git fetch origin
git diff origin/main --exit-code

echo "--- Releasing gem"
docker run --rm -itw /cwd -v "$PWD:/cwd" ruby:2.6-alpine auto/release-in-docker
docker run --rm -itw /cwd -v "$PWD:/cwd" ruby:3.0-alpine auto/release-in-docker
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ version: "2"

services:
dev:
image: ruby:2.6@sha256:83963ce90bf49a1e7baaf1bc73e1d57ae8f631949452c3dfcddf8fe8402c64b8
image: ruby:3.0@sha256:f6c236c1474acd83216ccacbaf7019778cbaea73c8048652087a4b64a862af63
volumes:
- .:/work
- ruby2.6-bundle-cache:/usr/local/bundle
- ruby3.0-bundle-cache:/usr/local/bundle
environment:
BUNDLE_GEMFILE: /work/Gemfile
AWS_ACCESS_KEY_ID:
Expand All @@ -16,5 +16,5 @@ services:
command: ["bash"]

volumes:
ruby2.6-bundle-cache:
ruby3.0-bundle-cache:
external: true
2 changes: 1 addition & 1 deletion lib/stackup/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Stackup

VERSION = "1.7.1"
VERSION = "1.7.2"

end
6 changes: 3 additions & 3 deletions stackup.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Gem::Specification.new do |spec|

spec.name = "stackup"
spec.version = Stackup::VERSION
spec.authors = ["Mike Williams", "Arvind Kunday"]
spec.email = ["mike.williams@rea-group.com", "arvind.kunday@rea-group.com"]
spec.authors = ["Danial Pearce", "Ahmed Shash"]
spec.email = ["danial.pearce@rea-group.com", "ahmed.shash@rea-group.com"]
spec.summary = "Manage CloudFormation stacks"
spec.homepage = "https://github.com/realestate-com-au/stackup"
spec.license = "MIT"
Expand All @@ -29,5 +29,5 @@ Gem::Specification.new do |spec|
spec.add_dependency "diffy", "~> 3.2"
spec.add_dependency "multi_json"

spec.required_ruby_version = "~> 2.6"
spec.required_ruby_version = "> 2.6"
end

0 comments on commit dd6bbe0

Please sign in to comment.