laa-fee-calculator-client 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ef6d4916284e517e033ca34430e3159698a99d5839cd8d5da11ad5e6dc78250
4
- data.tar.gz: ff85257fcd205872dd8ac5c98791a5705818247b5871051319d10116a68af7aa
3
+ metadata.gz: 52dad37ddaa604f0310847d554f9b406e43dd9b2153fa6d17a4dbea85762b102
4
+ data.tar.gz: 95a890df3d0845b5221dc665012f8b5871a239b1897821ca7a14ad7d1a9b6bb6
5
5
  SHA512:
6
- metadata.gz: 531ea668cdb58324b8a77c69a4865442473d32bcbb11f88964e5130135eb60a38bc36fed6b339935f7f8f8baad3baa6cc8dfabeb016329e7b9e097a7071621e5
7
- data.tar.gz: 602b711f8be0b58ec29b0bd695ad93278f1cf0bce962e04c2b35c653b8e5de6b8fd309f283ba0c65584127a20cb31beabe193a258076b10b2ceb1d873f9bd507
6
+ metadata.gz: eb5410870bc5c8a3e72338abe89dc2c6f17aa40bd5acca6823b8f8253b81d62664723295ea80f75f752c83ade5dae49643faa7cdd1e78359dbdc43697829e276
7
+ data.tar.gz: 247a6c9aadf2b51350a1c0b2521418cbff6d8e4ab2f257d13ce80b608005fc3fdb7fbb570c3b01f383c6d20f742ce8fe73f4c59fa208e28b8b847d5829e60a3b
data/CHANGELOG.md CHANGED
@@ -14,6 +14,13 @@ Add latest change log entries at top using template:
14
14
  -
15
15
  ```
16
16
 
17
+ ## Version 1.5.0
18
+
19
+ ### Added
20
+ - Support for Ruby 3.2 and 3.3
21
+
22
+ ### Removed
23
+ - Support for Ruby 2.6 and 2.7
17
24
 
18
25
  ## Version 1.4.0
19
26
 
data/Gemfile CHANGED
@@ -6,3 +6,15 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
6
 
7
7
  # Specify your gem's dependencies in laa-fee-calculator-client.gemspec
8
8
  gemspec
9
+
10
+ # Gems for development and test
11
+ gem 'awesome_print'
12
+ gem 'rake', '~> 13.0'
13
+ gem 'rb-readline'
14
+ gem 'rspec', '~> 3.0'
15
+ gem 'rubocop', '~> 1.28'
16
+ gem 'rubocop-performance', '~> 1.13'
17
+ gem 'rubocop-rake', '~> 0.6'
18
+ gem 'rubocop-rspec', '~> 2.10'
19
+ gem 'vcr'
20
+ gem 'webmock'
data/README.md CHANGED
@@ -184,7 +184,7 @@ Bug reports and pull requests are welcome on GitHub at [ministryofjustice/laa-fe
184
184
 
185
185
  1. Make required changes, run specs (rerecord vcr cassettes if necessary)
186
186
 
187
- 2. Run `bin/ruby_version_test` to test against ruby versions (2.7+ supported at present)
187
+ 2. Run `bin/ruby_version_test` to test against ruby versions (3.0+ supported at present)
188
188
 
189
189
  3. Update the VERSION in `lib/laa/fee_calculator/version` using [semantic versioning](https://guides.rubygems.org/patterns/#semantic-versioning).
190
190
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  set -e
4
4
 
5
- RUBIES="2.7 3.0 3.1"
5
+ RUBIES="3.0 3.1 3.2 3.3"
6
6
 
7
7
  if [ -e Gemfile.lock ]
8
8
  then
@@ -23,19 +23,9 @@ Gem::Specification.new do |spec|
23
23
  spec.require_paths = ['lib']
24
24
 
25
25
  # see bin/ruby_version_test
26
- spec.required_ruby_version = '>= 2.6.0'
26
+ spec.required_ruby_version = '>= 3.0.0'
27
27
 
28
28
  spec.add_runtime_dependency 'faraday', '~> 1.0'
29
29
  spec.add_runtime_dependency 'faraday-http-cache', '~> 2.2'
30
-
31
- spec.add_development_dependency 'awesome_print'
32
- spec.add_development_dependency 'rake', '~> 13.0'
33
- spec.add_development_dependency 'rb-readline'
34
- spec.add_development_dependency 'rspec', '~> 3.0'
35
- spec.add_development_dependency 'rubocop', '~> 1.28'
36
- spec.add_development_dependency 'rubocop-performance', '~> 1.13'
37
- spec.add_development_dependency 'rubocop-rake', '~> 0.6'
38
- spec.add_development_dependency 'rubocop-rspec', '~> 2.10'
39
- spec.add_development_dependency 'vcr'
40
- spec.add_development_dependency 'webmock'
30
+ spec.metadata['rubygems_mfa_required'] = 'true'
41
31
  end
@@ -8,7 +8,7 @@ module LAA
8
8
 
9
9
  def initialize(scheme_pk, options)
10
10
  @uri = "fee-schemes/#{scheme_pk}/calculate/"
11
- @filtered_params = options.reject { |k, _v| k.eql?(:id) }
11
+ @filtered_params = options.except(:id)
12
12
  end
13
13
 
14
14
  def call
@@ -18,8 +18,7 @@ module LAA
18
18
 
19
19
  def fee_schemes(id = nil, **options)
20
20
  uri = fee_schemes_uri(id || options[:id])
21
- filtered_params = options.reject { |k, _| k.eql?(:id) }
22
- # Ruby 3.0+; filtered_params = options.except(:id)
21
+ filtered_params = options.except(:id)
23
22
 
24
23
  json = get(uri, filtered_params).body
25
24
 
@@ -21,7 +21,7 @@ module LAA
21
21
  def has_many(association)
22
22
  define_method(association) do |id = nil, **options|
23
23
  uri = uri_for(association, id: id || options[:id])
24
- filtered_params = options.reject { |k, _v| k.eql?(:id) }
24
+ filtered_params = options.except(:id)
25
25
 
26
26
  json = get(uri, filtered_params).body
27
27
 
@@ -9,16 +9,16 @@ module LAA
9
9
  # gem specific handlers.
10
10
  #
11
11
  class RaiseError < Faraday::Response::Middleware
12
- CLIENT_ERROR_STATUSES = (400...600).freeze
12
+ CLIENT_ERROR_STATUSES = (400...600)
13
13
 
14
14
  def on_complete(env)
15
15
  case env[:status]
16
16
  when 400
17
- raise LAA::FeeCalculator::ResponseError.new(response_values(env))
17
+ raise LAA::FeeCalculator::ResponseError, response_values(env)
18
18
  when 404
19
- raise LAA::FeeCalculator::ResourceNotFound.new(response_values(env))
19
+ raise LAA::FeeCalculator::ResourceNotFound, response_values(env)
20
20
  when CLIENT_ERROR_STATUSES
21
- raise LAA::FeeCalculator::ClientError.new(response_values(env))
21
+ raise LAA::FeeCalculator::ClientError, response_values(env)
22
22
  end
23
23
  end
24
24
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module LAA
4
4
  module FeeCalculator
5
- VERSION = '1.4.0'
6
- USER_AGENT = "laa-fee-calculator-client/#{VERSION}"
5
+ VERSION = '1.5.0'
6
+ USER_AGENT = "laa-fee-calculator-client/#{VERSION}".freeze
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: laa-fee-calculator-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katharine Ahern
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-05-16 00:00:00.000000000 Z
12
+ date: 2024-02-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -39,146 +39,6 @@ dependencies:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '2.2'
42
- - !ruby/object:Gem::Dependency
43
- name: awesome_print
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- version: '0'
49
- type: :development
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: '0'
56
- - !ruby/object:Gem::Dependency
57
- name: rake
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - "~>"
61
- - !ruby/object:Gem::Version
62
- version: '13.0'
63
- type: :development
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - "~>"
68
- - !ruby/object:Gem::Version
69
- version: '13.0'
70
- - !ruby/object:Gem::Dependency
71
- name: rb-readline
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: '0'
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- version: '0'
84
- - !ruby/object:Gem::Dependency
85
- name: rspec
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - "~>"
89
- - !ruby/object:Gem::Version
90
- version: '3.0'
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - "~>"
96
- - !ruby/object:Gem::Version
97
- version: '3.0'
98
- - !ruby/object:Gem::Dependency
99
- name: rubocop
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - "~>"
103
- - !ruby/object:Gem::Version
104
- version: '1.28'
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - "~>"
110
- - !ruby/object:Gem::Version
111
- version: '1.28'
112
- - !ruby/object:Gem::Dependency
113
- name: rubocop-performance
114
- requirement: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - "~>"
117
- - !ruby/object:Gem::Version
118
- version: '1.13'
119
- type: :development
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - "~>"
124
- - !ruby/object:Gem::Version
125
- version: '1.13'
126
- - !ruby/object:Gem::Dependency
127
- name: rubocop-rake
128
- requirement: !ruby/object:Gem::Requirement
129
- requirements:
130
- - - "~>"
131
- - !ruby/object:Gem::Version
132
- version: '0.6'
133
- type: :development
134
- prerelease: false
135
- version_requirements: !ruby/object:Gem::Requirement
136
- requirements:
137
- - - "~>"
138
- - !ruby/object:Gem::Version
139
- version: '0.6'
140
- - !ruby/object:Gem::Dependency
141
- name: rubocop-rspec
142
- requirement: !ruby/object:Gem::Requirement
143
- requirements:
144
- - - "~>"
145
- - !ruby/object:Gem::Version
146
- version: '2.10'
147
- type: :development
148
- prerelease: false
149
- version_requirements: !ruby/object:Gem::Requirement
150
- requirements:
151
- - - "~>"
152
- - !ruby/object:Gem::Version
153
- version: '2.10'
154
- - !ruby/object:Gem::Dependency
155
- name: vcr
156
- requirement: !ruby/object:Gem::Requirement
157
- requirements:
158
- - - ">="
159
- - !ruby/object:Gem::Version
160
- version: '0'
161
- type: :development
162
- prerelease: false
163
- version_requirements: !ruby/object:Gem::Requirement
164
- requirements:
165
- - - ">="
166
- - !ruby/object:Gem::Version
167
- version: '0'
168
- - !ruby/object:Gem::Dependency
169
- name: webmock
170
- requirement: !ruby/object:Gem::Requirement
171
- requirements:
172
- - - ">="
173
- - !ruby/object:Gem::Version
174
- version: '0'
175
- type: :development
176
- prerelease: false
177
- version_requirements: !ruby/object:Gem::Requirement
178
- requirements:
179
- - - ">="
180
- - !ruby/object:Gem::Version
181
- version: '0'
182
42
  description: Ruby client for the Ministry of Justices LAA fee calculator API. A simple
183
43
  interface for transparent calling of the API endpoints to query data and return
184
44
  calculated fee amounts.
@@ -215,7 +75,8 @@ files:
215
75
  homepage: https://github.com/ministryofjustice/laa-fee-calculator-client
216
76
  licenses:
217
77
  - MIT
218
- metadata: {}
78
+ metadata:
79
+ rubygems_mfa_required: 'true'
219
80
  post_install_message:
220
81
  rdoc_options: []
221
82
  require_paths:
@@ -224,14 +85,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
224
85
  requirements:
225
86
  - - ">="
226
87
  - !ruby/object:Gem::Version
227
- version: 2.6.0
88
+ version: 3.0.0
228
89
  required_rubygems_version: !ruby/object:Gem::Requirement
229
90
  requirements:
230
91
  - - ">="
231
92
  - !ruby/object:Gem::Version
232
93
  version: '0'
233
94
  requirements: []
234
- rubygems_version: 3.3.7
95
+ rubygems_version: 3.5.3
235
96
  signing_key:
236
97
  specification_version: 4
237
98
  summary: Ruby client for the Legal Aid Agency fee calculator API