Skip to content

Commit

Permalink
Merge pull request #28 from citizensadvice/2.3.0
Browse files Browse the repository at this point in the history
2.3.0
  • Loading branch information
mrdaniellewis authored Jul 4, 2024
2 parents 2dbe6de + 9fdab0f commit 204ca48
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 79 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ RSpec/MultipleExpectations:

RSpec/NestedGroups:
Enabled: false

RSpecRails:
Enabled: false
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.1
3.3.3
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## v2.3.0 _2023-07-04_

- Update to Ruby 3.3.3
- Update to Alpine 20
- Update dependencies

## v2.2.0 _2023-02-13_

- Added a version endpoint
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:3.2.1-alpine3.17 as builder
FROM ruby:3.3.3-alpine3.20 as builder

ENV LANG C.UTF-8
WORKDIR /app
Expand All @@ -17,7 +17,7 @@ RUN gem install bundler \

#################################################

FROM ruby:3.2.1-alpine3.17
FROM ruby:3.3.3-alpine3.20

WORKDIR /app
ENV RACK_ENV=production
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "3.2.1"
ruby "3.3.3"

gem "image_processing"
gem "puma"
Expand All @@ -14,7 +14,7 @@ gem "svg_optimizer"
gem "newrelic_rpm"

group :development, :test do
gem "citizens-advice-style", github: "citizensadvice/citizens-advice-style-ruby", tag: "v10.0.0"
gem "citizens-advice-style", github: "citizensadvice/citizens-advice-style-ruby", tag: "v11.0.0"
gem "debug"
gem "rack-test"
gem "rspec"
Expand Down
177 changes: 112 additions & 65 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,121 +1,168 @@
GIT
remote: https://github.com/citizensadvice/citizens-advice-style-ruby.git
revision: 399708d8878e96a811c99af041d12f9f9e58d4dc
tag: v10.0.0
revision: 6762c3c2185d457e090147ce04facaa5a3e71249
tag: v11.0.0
specs:
citizens-advice-style (9.0.0)
rubocop (~> 1.45)
rubocop-rails (~> 2.17)
rubocop-rspec (~> 2.18)
citizens-advice-style (11.0.0)
rubocop (~> 1.62)
rubocop-performance (~> 1.20)
rubocop-rails (~> 2.24)
rubocop-rspec (~> 2.27)

GEM
remote: https://rubygems.org/
specs:
activesupport (7.0.4.2)
activesupport (7.1.3.4)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
ast (2.4.2)
concurrent-ruby (1.2.0)
debug (1.7.1)
diff-lcs (1.5.0)
ffi (1.15.5)
i18n (1.12.0)
base64 (0.2.0)
bigdecimal (3.1.8)
concurrent-ruby (1.3.3)
connection_pool (2.4.1)
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
diff-lcs (1.5.1)
drb (2.2.1)
ffi (1.17.0-aarch64-linux-musl)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-musl)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
image_processing (1.12.2)
mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.17, < 3)
json (2.6.3)
mini_magick (4.12.0)
minitest (5.17.0)
io-console (0.7.2)
irb (1.13.2)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.7.2)
language_server-protocol (3.17.0.3)
mini_magick (4.13.1)
minitest (5.24.1)
multi_json (1.15.0)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
newrelic_rpm (8.16.0)
nio4r (2.5.8)
nokogiri (1.14.1-aarch64-linux)
mutex_m (0.2.0)
newrelic_rpm (9.11.0)
nio4r (2.7.3)
nokogiri (1.16.6-aarch64-linux)
racc (~> 1.4)
nokogiri (1.14.1-arm64-darwin)
nokogiri (1.16.6-arm64-darwin)
racc (~> 1.4)
nokogiri (1.14.1-x86_64-darwin)
nokogiri (1.16.6-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.14.1-x86_64-linux)
nokogiri (1.16.6-x86_64-linux)
racc (~> 1.4)
parallel (1.22.1)
parser (3.2.1.0)
parallel (1.25.1)
parser (3.3.3.0)
ast (~> 2.4.1)
puma (6.1.0)
racc
psych (5.1.2)
stringio
puma (6.4.2)
nio4r (~> 2.0)
racc (1.6.2)
rack (2.2.6.2)
rack-protection (3.0.5)
rack
rack-test (2.0.2)
racc (1.8.0)
rack (3.1.6)
rack-protection (4.0.0)
base64 (>= 0.1.0)
rack (>= 3.0.0, < 4)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
rainbow (3.1.1)
regexp_parser (2.7.0)
rexml (3.2.5)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.1)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
rdoc (6.7.0)
psych (>= 4.0.0)
regexp_parser (2.9.2)
reline (0.5.9)
io-console (~> 0.5)
rexml (3.3.1)
strscan
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.3)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (1.45.1)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubocop (1.64.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.0.0)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.24.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.26.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.17.0)
rubocop-ast (1.31.3)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
rubocop-rails (2.17.4)
rubocop-factory_bot (2.26.1)
rubocop (~> 1.61)
rubocop-performance (1.21.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails (2.25.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-rspec (2.18.1)
rubocop (~> 1.33)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (2.31.0)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
ruby-progressbar (1.11.0)
ruby-vips (2.1.4)
rubocop-factory_bot (~> 2.22)
rubocop-rspec_rails (~> 2.28)
rubocop-rspec_rails (2.29.1)
rubocop (~> 1.61)
ruby-progressbar (1.13.0)
ruby-vips (2.2.1)
ffi (~> 1.12)
ruby2_keywords (0.0.5)
sinatra (3.0.5)
sinatra (4.0.0)
mustermann (~> 3.0)
rack (~> 2.2, >= 2.2.4)
rack-protection (= 3.0.5)
rack (>= 3.0.0, < 4)
rack-protection (= 4.0.0)
rack-session (>= 2.0.0, < 3)
tilt (~> 2.0)
sinatra-contrib (3.0.5)
multi_json
sinatra-contrib (4.0.0)
multi_json (>= 0.0.2)
mustermann (~> 3.0)
rack-protection (= 3.0.5)
sinatra (= 3.0.5)
rack-protection (= 4.0.0)
sinatra (= 4.0.0)
tilt (~> 2.0)
svg_optimizer (0.2.6)
stringio (3.1.1)
strscan (3.1.0)
svg_optimizer (0.3.0)
nokogiri
tilt (2.0.11)
tilt (2.4.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
unicode-display_width (2.5.0)

PLATFORMS
aarch64-linux-musl
arm64-darwin-21
x86_64-darwin-21
x86_64-darwin-23
x86_64-linux-musl

DEPENDENCIES
Expand All @@ -131,7 +178,7 @@ DEPENDENCIES
svg_optimizer

RUBY VERSION
ruby 3.2.1p31
ruby 3.3.3p89

BUNDLED WITH
2.4.6
2.5.14
2 changes: 1 addition & 1 deletion lib/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# frozen_string_literal: true

VERSION = "2.2.0"
VERSION = "2.3.0"
16 changes: 8 additions & 8 deletions spec/app_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,27 +67,27 @@
end
end

context "with a .png image that has smaller dimensions than 800px" do
let(:test_image_file_name) { "test-png-small-314x580px.png" }
context "with a .png image that has larger dimensions than 800px" do
let(:test_image_file_name) { "test-png-1102x1287px.png" }

it "returns the PNG image at its original size" do
it "returns the PNG image resized to maximum dimensions of 800px" do
post("/image", image_file:)

expect(last_response.status).to eq 200
expect(resized_image.type).to eq "PNG"
expect(resized_image.dimensions).to eq [314, 580]
expect(resized_image.dimensions).to eq [685, 800]
end
end

context "with a .png image that has larger dimensions than 800px" do
let(:test_image_file_name) { "test-png-1102x1287px.png" }
context "with a .png image that has smaller dimensions than 800px" do
let(:test_image_file_name) { "test-png-small-314x580px.png" }

it "returns the PNG image resized to maximum dimensions of 800px" do
it "returns the PNG image at its original size" do
post("/image", image_file:)

expect(last_response.status).to eq 200
expect(resized_image.type).to eq "PNG"
expect(resized_image.dimensions).to eq [685, 800]
expect(resized_image.dimensions).to eq [314, 580]
end
end

Expand Down

0 comments on commit 204ca48

Please sign in to comment.