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 +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile +12 -0
- data/README.md +1 -1
- data/bin/ruby_version_test +1 -1
- data/laa-fee-calculator-client.gemspec +2 -12
- data/lib/laa/fee_calculator/calculator.rb +1 -1
- data/lib/laa/fee_calculator/client.rb +1 -2
- data/lib/laa/fee_calculator/has_manyable.rb +1 -1
- data/lib/laa/fee_calculator/raise_error.rb +4 -4
- data/lib/laa/fee_calculator/version.rb +2 -2
- metadata +6 -145
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52dad37ddaa604f0310847d554f9b406e43dd9b2153fa6d17a4dbea85762b102
|
4
|
+
data.tar.gz: 95a890df3d0845b5221dc665012f8b5871a239b1897821ca7a14ad7d1a9b6bb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb5410870bc5c8a3e72338abe89dc2c6f17aa40bd5acca6823b8f8253b81d62664723295ea80f75f752c83ade5dae49643faa7cdd1e78359dbdc43697829e276
|
7
|
+
data.tar.gz: 247a6c9aadf2b51350a1c0b2521418cbff6d8e4ab2f257d13ce80b608005fc3fdb7fbb570c3b01f383c6d20f742ce8fe73f4c59fa208e28b8b847d5829e60a3b
|
data/CHANGELOG.md
CHANGED
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 (
|
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
|
|
data/bin/ruby_version_test
CHANGED
@@ -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 = '>=
|
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
|
@@ -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.
|
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.
|
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)
|
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
|
17
|
+
raise LAA::FeeCalculator::ResponseError, response_values(env)
|
18
18
|
when 404
|
19
|
-
raise LAA::FeeCalculator::ResourceNotFound
|
19
|
+
raise LAA::FeeCalculator::ResourceNotFound, response_values(env)
|
20
20
|
when CLIENT_ERROR_STATUSES
|
21
|
-
raise LAA::FeeCalculator::ClientError
|
21
|
+
raise LAA::FeeCalculator::ClientError, response_values(env)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
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
|
+
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:
|
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:
|
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
|
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
|