Skip to content

Commit

Permalink
Merge pull request #53 from trade-tariff/BAU-ruby-334
Browse files Browse the repository at this point in the history
BAU: Bumps ruby to 3.3.4
  • Loading branch information
willfish authored Jul 15, 2024
2 parents c4bf49c + 308fd5a commit 7f52e97
Show file tree
Hide file tree
Showing 13 changed files with 84 additions and 63 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ orbs:
jobs:
checking:
docker:
- image: cimg/ruby:3.2.2
- image: cimg/ruby:3.3.4
steps:
- checkout
- ruby/install-deps
Expand All @@ -15,7 +15,7 @@ jobs:
label: Inspecting with Rubocop
test:
docker:
- image: cimg/ruby:3.2.2
- image: cimg/ruby:3.3.4
steps:
- checkout
- ruby/install-deps
Expand Down
9 changes: 6 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
inherit_gem:
rubocop-govuk:
- config/default.yml
- config/rails.yml

require: rubocop-rspec

AllCops:
TargetRubyVersion: 3.2.2
TargetRubyVersion: 3.3.4
Exclude:
- 'db/schema.rb'
- 'vendor/**/*'
Expand All @@ -24,12 +25,14 @@ Metrics/BlockLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Rails/FilePath:
Enabled: false
Rails/Blank:
Enabled: false
RSpec/ExampleLength:
Enabled: false
RSpec/NestedGroups:
Enabled: false
RSpec/FilePath:
Enabled: false
RSpec/VerifiedDoubles:
Enabled: false
RSpec/MultipleExpectations:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.2
3.3.4
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby 3.3.4
109 changes: 59 additions & 50 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,28 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activesupport (7.0.6)
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)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.8)
byebug (11.1.3)
coderay (1.1.3)
concurrent-ruby (1.2.2)
concurrent-ruby (1.3.3)
connection_pool (2.4.1)
diff-lcs (1.5.0)
dotenv (2.8.1)
diff-lcs (1.5.1)
dotenv (3.1.2)
drb (2.2.1)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand All @@ -49,19 +57,20 @@ GEM
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday (~> 1.0)
i18n (1.14.1)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
json (2.6.3)
json-schema (4.0.0)
json (2.7.2)
json-schema (4.3.1)
addressable (>= 2.8)
language_server-protocol (3.17.0.3)
method_source (1.0.0)
minitest (5.19.0)
multipart-post (2.3.0)
method_source (1.1.0)
minitest (5.24.1)
multipart-post (2.4.1)
mutex_m (0.2.0)
net-http-persistent (4.0.2)
connection_pool (~> 2.2)
parallel (1.23.0)
parser (3.2.2.3)
parallel (1.25.1)
parser (3.3.4.0)
ast (~> 2.4.1)
racc
pry (0.14.2)
Expand All @@ -70,66 +79,66 @@ GEM
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
public_suffix (5.0.3)
racc (1.7.1)
rack (3.0.8)
public_suffix (6.0.0)
racc (1.8.0)
rack (3.1.7)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.8.1)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
rake (13.2.1)
regexp_parser (2.9.2)
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.6)
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.1)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.55.0)
rubocop (1.64.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.3)
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.28.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.29.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.18.0)
rubocop-ast (1.31.3)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.23.1)
rubocop (~> 1.33)
rubocop-govuk (4.12.0)
rubocop (= 1.55.0)
rubocop-ast (= 1.29.0)
rubocop-rails (= 2.20.2)
rubocop-govuk (5.0.2)
rubocop (= 1.64.1)
rubocop-ast (= 1.31.3)
rubocop-capybara (= 2.21.0)
rubocop-rails (= 2.25.1)
rubocop-rake (= 0.6.0)
rubocop-rspec (= 2.22.0)
rubocop-rails (2.20.2)
rubocop-rspec (= 3.0.1)
rubocop-rails (2.25.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (2.22.0)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
rubocop-rspec (3.0.1)
rubocop (~> 1.61)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
strscan (3.1.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
unicode-display_width (2.5.0)

PLATFORMS
ruby
Expand Down
4 changes: 3 additions & 1 deletion spec/uktt/country_spec.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
RSpec.describe Uktt::Country do
subject(:country) { described_class.new(http) }

let(:http) { instance_double('Uktt::Http') }
let(:http) { instance_double(Uktt::Http) }

describe '#retrieve_all' do
it 'performs a retrieve of countries' do
allow(http).to receive(:retrieve).with('geographical_areas/countries.json', {})

country.retrieve_all

expect(http).to have_received(:retrieve).with('geographical_areas/countries.json', {})
end
end
end
4 changes: 3 additions & 1 deletion spec/uktt/exchange_rate_spec.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
RSpec.describe Uktt::ExchangeRate do
subject(:exchange_rate) { described_class.new(http) }

let(:http) { instance_double('Uktt::Http') }
let(:http) { instance_double(Uktt::Http) }

describe '#retrieve' do
it 'performs a retrieve of exchange_rates' do
allow(http).to receive(:retrieve).with('exchange_rates.json', {})

exchange_rate.retrieve_all

expect(http).to have_received(:retrieve).with('exchange_rates.json', {})
end
end
end
4 changes: 3 additions & 1 deletion spec/uktt/geographical_area_spec.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
RSpec.describe Uktt::GeographicalArea do
subject(:geographical_area) { described_class.new(http) }

let(:http) { instance_double('Uktt::Http') }
let(:http) { instance_double(Uktt::Http) }

describe '#retrieve_all' do
it 'performs a retrieve of geographical_areas' do
allow(http).to receive(:retrieve).with('geographical_areas.json', {})

geographical_area.retrieve_all

expect(http).to have_received(:retrieve).with('geographical_areas.json', {})
end
end
end
2 changes: 1 addition & 1 deletion spec/http_spec.rb → spec/uktt/http_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
let(:retriable_intervals) { [] }
let(:public_routes) { false }

let(:response) { instance_double('Faraday::Response', body:) }
let(:response) { instance_double(Faraday::Response, body:) }
let(:body) { '{}' }
let(:parser) { double(parse: {}) }

Expand Down
2 changes: 1 addition & 1 deletion spec/uktt/monetary_exchange_rate_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RSpec.describe Uktt::MonetaryExchangeRate do
subject(:resource) { described_class.new(http) }

let(:http) { instance_double('Uktt::Http') }
let(:http) { instance_double(Uktt::Http) }

describe '#retrieve_all' do
it 'performs a retrieve of monetary_exchange_rates' do
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion spec/uktt/rules_of_origin_scheme_spec.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
RSpec.describe Uktt::RulesOfOriginScheme, :http do
subject(:rules_of_origin_scheme) { described_class.new(http) }

let(:http) { instance_double('Uktt::Http') }
let(:http) { instance_double(Uktt::Http) }

describe '#retrieve_all' do
it 'performs a retrieve of countries' do
allow(http).to receive(:retrieve).with('rules_of_origin_schemes.json', { heading_code: '050100', country_code: 'RO' })

rules_of_origin_scheme.retrieve_all(heading_code: '050100', country_code: 'RO')

expect(http).to have_received(:retrieve).with('rules_of_origin_schemes.json', { heading_code: '050100', country_code: 'RO' })
end
end
end
2 changes: 1 addition & 1 deletion spec/uktt_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

RSpec.describe Uktt do
it 'has a version number and is in the correct format' do
expect(Uktt::VERSION).not_to be(nil)
expect(Uktt::VERSION).not_to be_nil
expect(Uktt::VERSION).to match(/^\d+\.\d+\.\d+$/)
end
end

0 comments on commit 7f52e97

Please sign in to comment.