defra_ruby_mocks 2.4.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/services/defra_ruby_mocks/companies_house_service.rb +1 -3
- data/app/services/defra_ruby_mocks/govpay_create_payment_service.rb +18 -18
- data/app/services/defra_ruby_mocks/govpay_get_payment_service.rb +50 -50
- data/app/services/defra_ruby_mocks/govpay_refund_details_service.rb +6 -6
- data/app/services/defra_ruby_mocks/govpay_request_refund_service.rb +4 -4
- data/lib/defra_ruby_mocks/version.rb +1 -1
- metadata +12 -207
- data/spec/defra_ruby_mocks_spec.rb +0 -44
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/assets/javascripts/application.js +0 -13
- data/spec/dummy/app/assets/stylesheets/application.css +0 -15
- data/spec/dummy/app/controllers/application_controller.rb +0 -5
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/bin/setup +0 -29
- data/spec/dummy/config/application.rb +0 -27
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -38
- data/spec/dummy/config/environments/production.rb +0 -76
- data/spec/dummy/config/environments/test.rb +0 -42
- data/spec/dummy/config/initializers/assets.rb +0 -11
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -4
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/initializers/to_time_preserves_timezone.rb +0 -10
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -9
- data/spec/dummy/config/locales/en.yml +0 -23
- data/spec/dummy/config/routes.rb +0 -4
- data/spec/dummy/config/secrets.yml +0 -22
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/log/test.log +0 -2013
- data/spec/dummy/public/404.html +0 -67
- data/spec/dummy/public/422.html +0 -67
- data/spec/dummy/public/500.html +0 -66
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/examples.txt +0 -68
- data/spec/fixtures/files/govpay/create_payment_created_response.json +0 -24
- data/spec/fixtures/files/govpay/create_payment_error_response.json +0 -5
- data/spec/fixtures/files/govpay/get_payment_response_cancelled.json +0 -61
- data/spec/fixtures/files/govpay/get_payment_response_created.json +0 -73
- data/spec/fixtures/files/govpay/get_payment_response_error.json +0 -5
- data/spec/fixtures/files/govpay/get_payment_response_failure.json +0 -9
- data/spec/fixtures/files/govpay/get_payment_response_not_found.json +0 -4
- data/spec/fixtures/files/govpay/get_payment_response_submitted.json +0 -75
- data/spec/fixtures/files/govpay/get_payment_response_success.json +0 -62
- data/spec/lib/configuration_spec.rb +0 -75
- data/spec/rails_helper.rb +0 -46
- data/spec/requests/company_spec.rb +0 -91
- data/spec/requests/govpay_spec.rb +0 -170
- data/spec/requests/officers_spec.rb +0 -37
- data/spec/services/companies_house_service_spec.rb +0 -69
- data/spec/services/govpay_create_payment_service_spec.rb +0 -44
- data/spec/services/govpay_get_payment_service_spec.rb +0 -30
- data/spec/services/govpay_refund_details_service_spec.rb +0 -58
- data/spec/services/govpay_request_refund_service_spec.rb +0 -31
- data/spec/spec_helper.rb +0 -86
- data/spec/support/helpers/configuration.rb +0 -17
- data/spec/support/helpers/helpers.rb +0 -13
- data/spec/support/helpers/waste_carriers_engine.rb +0 -10
- data/spec/support/helpers/xml_matchers.rb +0 -19
- data/spec/support/pry.rb +0 -7
- data/spec/support/simplecov.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c648dae3e678030c2d132615c0d148b673bedacde6d9d0e653dd2f20710fe4f9
|
4
|
+
data.tar.gz: '0948298e72ee7c2adb8e5cd98ff71eaf0f72de6fe9a9faf0aa0e6ae1e3699c3b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cdb1d9e9b0f434ef1b7bcc58de8f5ec79c07bb10621772cd705ef33bad0a66a7767b764df299a8b506af750b296429b814a5b4575385b66d08cf8f985853778
|
7
|
+
data.tar.gz: 4ca9a9935239757a5af2874392c85de2df9e9a1c93ee504610a8430b6179004de218b2ef9fb06ef20ffdc4e9edcc1f0d812d9ee14ed06a024ed14c46279dd50c
|
@@ -11,9 +11,7 @@ module DefraRubyMocks
|
|
11
11
|
# SC534714, CE000958
|
12
12
|
# IP00141R, IP27702R, SP02252R
|
13
13
|
# https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/426891/uniformResourceIdentifiersCustomerGuide.pdf
|
14
|
-
VALID_COMPANIES_HOUSE_REGISTRATION_NUMBER_REGEX =
|
15
|
-
/\A(\d{8,8}$)|([a-zA-Z]{2}\d{6}$)|([a-zA-Z]{2}\d{5}[a-zA-Z]{1}$)\z/i
|
16
|
-
).freeze
|
14
|
+
VALID_COMPANIES_HOUSE_REGISTRATION_NUMBER_REGEX = /\A(\d{8,8}$)|([a-zA-Z]{2}\d{6}$)|([a-zA-Z]{2}\d{5}[a-zA-Z]{1}$)\z/i
|
17
15
|
|
18
16
|
NOT_FOUND = "99999999"
|
19
17
|
|
@@ -32,28 +32,28 @@ module DefraRubyMocks
|
|
32
32
|
# rubocop:disable Metrics/MethodLength
|
33
33
|
def success_response
|
34
34
|
{
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
35
|
+
created_date: "2020-03-03T16:17:19.554Z",
|
36
|
+
state: {
|
37
|
+
status: "created",
|
38
|
+
finished: false
|
39
39
|
},
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
_links: {
|
41
|
+
self: {
|
42
|
+
href: "https://publicapi.payments.service.gov.uk/v1/payments/hu20sqlact5260q2nanm0q8u93",
|
43
|
+
method: "GET"
|
44
44
|
},
|
45
|
-
|
46
|
-
|
47
|
-
|
45
|
+
next_url: {
|
46
|
+
href: "https://www.payments.service.gov.uk/secure/bb0a272c-8eaf-468d-b3xf-ae5e000d2231",
|
47
|
+
method: "GET"
|
48
48
|
}
|
49
49
|
},
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
50
|
+
amount: 14_500,
|
51
|
+
reference: "12345",
|
52
|
+
description: "Pay your council tax",
|
53
|
+
return_url: "https://your.service.gov.uk/completed",
|
54
|
+
payment_id: "hu20sqlact5260q2nanm0q8u93",
|
55
|
+
payment_provider: "worldpay",
|
56
|
+
provider_id: "10987654321"
|
57
57
|
}
|
58
58
|
end
|
59
59
|
# rubocop:enable Metrics/MethodLength
|
@@ -22,64 +22,64 @@ module DefraRubyMocks
|
|
22
22
|
# rubocop:disable Metrics/MethodLength
|
23
23
|
def response_success
|
24
24
|
{
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
25
|
+
amount: 10_501,
|
26
|
+
description: "Waste carrier registration upper tier",
|
27
|
+
reference: "12345",
|
28
|
+
language: "en",
|
29
|
+
metadata: {
|
30
|
+
ledger_code: "AB100",
|
31
|
+
an_internal_reference_number: 200
|
32
32
|
},
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
email: "sherlock.holmes@example.com",
|
34
|
+
state: {
|
35
|
+
status: "success",
|
36
|
+
finished: true
|
37
37
|
},
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
38
|
+
payment_id: "cnnffa1e6s3u9a6n24u2cp527d",
|
39
|
+
payment_provider: "sandbox",
|
40
|
+
created_date: "2022-05-18T11:52:13.669Z",
|
41
|
+
refund_summary: {
|
42
|
+
status: "available",
|
43
|
+
amount_available: 10_501,
|
44
|
+
amount_submitted: 0
|
45
45
|
},
|
46
|
-
|
47
|
-
|
48
|
-
|
46
|
+
settlement_summary: {
|
47
|
+
capture_submit_time: "2022-05-18T11:52:39.172Z",
|
48
|
+
captured_date: "2022-05-18"
|
49
49
|
},
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
50
|
+
card_details: {
|
51
|
+
last_digits_card_number: "5100",
|
52
|
+
first_digits_card_number: "510510",
|
53
|
+
cardholder_name: "Sherlock Holmes",
|
54
|
+
expiry_date: "01/24",
|
55
|
+
billing_address: {
|
56
|
+
line1: "221 Baker Street",
|
57
|
+
line2: "Flat b",
|
58
|
+
postcode: "NW1 6XE",
|
59
|
+
city: "London",
|
60
|
+
country: "GB"
|
61
61
|
},
|
62
|
-
|
63
|
-
|
62
|
+
card_brand: "Mastercard",
|
63
|
+
card_type: "debit"
|
64
64
|
},
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
65
|
+
delayed_capture: false,
|
66
|
+
moto: false,
|
67
|
+
provider_id: "9bb0c2c1-d0c5-4a63-8945-f4240e06f8ae",
|
68
|
+
return_url: "https://some-wcr-env.defra.gov.uk/completed",
|
69
|
+
authorisation_mode: "web",
|
70
|
+
card_brand: "Mastercard",
|
71
|
+
_links: {
|
72
|
+
self: {
|
73
|
+
href: "https://publicapi.payments.service.gov.uk/v1/payments/cnnffa1e6s3u9a6n24u2cp527d",
|
74
|
+
method: "GET"
|
75
75
|
},
|
76
|
-
|
77
|
-
|
78
|
-
|
76
|
+
events: {
|
77
|
+
href: "https://publicapi.payments.service.gov.uk/v1/payments/cnnffa1e6s3u9a6n24u2cp527d/events",
|
78
|
+
method: "GET"
|
79
79
|
},
|
80
|
-
|
81
|
-
|
82
|
-
|
80
|
+
refunds: {
|
81
|
+
href: "https://publicapi.payments.service.gov.uk/v1/payments/cnnffa1e6s3u9a6n24u2cp527d/refunds",
|
82
|
+
method: "GET"
|
83
83
|
}
|
84
84
|
}
|
85
85
|
}
|
@@ -5,12 +5,12 @@ module DefraRubyMocks
|
|
5
5
|
|
6
6
|
def run(payment_id:, refund_id:) # rubocop:disable Lint/UnusedMethodArgument
|
7
7
|
{
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
amount: 2000,
|
9
|
+
created_date: "2019-09-19T16:53:03.213Z",
|
10
|
+
refund_id: refund_id,
|
11
|
+
status: status,
|
12
|
+
settlement_summary: {
|
13
|
+
settled_date: "2019-09-21"
|
14
14
|
}
|
15
15
|
}
|
16
16
|
end
|
@@ -8,10 +8,10 @@ module DefraRubyMocks
|
|
8
8
|
|
9
9
|
# This currently supports only "submitted" status:
|
10
10
|
{
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
amount: amount,
|
12
|
+
created_date: "2019-09-19T16:53:03.213Z",
|
13
|
+
refund_id: SecureRandom.hex(22),
|
14
|
+
status: "submitted"
|
15
15
|
}
|
16
16
|
end
|
17
17
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: defra_ruby_mocks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Defra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,78 +16,22 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '7.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '7.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sprockets
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 3.7.2
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 3.7.2
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: github_changelog_generator
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: defra_ruby_style
|
57
29
|
requirement: !ruby/object:Gem::Requirement
|
58
30
|
requirements:
|
59
31
|
- - ">="
|
60
32
|
- !ruby/object:Gem::Version
|
61
33
|
version: '0'
|
62
|
-
type: :
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: pry-byebug
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rails-controller-testing
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
34
|
+
type: :runtime
|
91
35
|
prerelease: false
|
92
36
|
version_requirements: !ruby/object:Gem::Requirement
|
93
37
|
requirements:
|
@@ -95,33 +39,19 @@ dependencies:
|
|
95
39
|
- !ruby/object:Gem::Version
|
96
40
|
version: '0'
|
97
41
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
42
|
+
name: sprockets-rails
|
99
43
|
requirement: !ruby/object:Gem::Requirement
|
100
44
|
requirements:
|
101
45
|
- - ">="
|
102
46
|
- !ruby/object:Gem::Version
|
103
47
|
version: '0'
|
104
|
-
type: :
|
48
|
+
type: :runtime
|
105
49
|
prerelease: false
|
106
50
|
version_requirements: !ruby/object:Gem::Requirement
|
107
51
|
requirements:
|
108
52
|
- - ">="
|
109
53
|
- !ruby/object:Gem::Version
|
110
54
|
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: simplecov
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 0.17.1
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: 0.17.1
|
125
55
|
description: A Rails engine which can be used to mock external services when loaded
|
126
56
|
into an application
|
127
57
|
email:
|
@@ -156,73 +86,11 @@ files:
|
|
156
86
|
- lib/defra_ruby_mocks/version.rb
|
157
87
|
- lib/tasks/changelog.rake
|
158
88
|
- lib/tasks/defra_ruby_mocks_tasks.rake
|
159
|
-
- spec/defra_ruby_mocks_spec.rb
|
160
|
-
- spec/dummy/README.rdoc
|
161
|
-
- spec/dummy/Rakefile
|
162
|
-
- spec/dummy/app/assets/javascripts/application.js
|
163
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
164
|
-
- spec/dummy/app/controllers/application_controller.rb
|
165
|
-
- spec/dummy/app/helpers/application_helper.rb
|
166
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
167
|
-
- spec/dummy/bin/bundle
|
168
|
-
- spec/dummy/bin/rails
|
169
|
-
- spec/dummy/bin/rake
|
170
|
-
- spec/dummy/bin/setup
|
171
|
-
- spec/dummy/config.ru
|
172
|
-
- spec/dummy/config/application.rb
|
173
|
-
- spec/dummy/config/boot.rb
|
174
|
-
- spec/dummy/config/environment.rb
|
175
|
-
- spec/dummy/config/environments/development.rb
|
176
|
-
- spec/dummy/config/environments/production.rb
|
177
|
-
- spec/dummy/config/environments/test.rb
|
178
|
-
- spec/dummy/config/initializers/assets.rb
|
179
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
180
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
181
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
182
|
-
- spec/dummy/config/initializers/inflections.rb
|
183
|
-
- spec/dummy/config/initializers/mime_types.rb
|
184
|
-
- spec/dummy/config/initializers/session_store.rb
|
185
|
-
- spec/dummy/config/initializers/to_time_preserves_timezone.rb
|
186
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
187
|
-
- spec/dummy/config/locales/en.yml
|
188
|
-
- spec/dummy/config/routes.rb
|
189
|
-
- spec/dummy/config/secrets.yml
|
190
|
-
- spec/dummy/log/test.log
|
191
|
-
- spec/dummy/public/404.html
|
192
|
-
- spec/dummy/public/422.html
|
193
|
-
- spec/dummy/public/500.html
|
194
|
-
- spec/dummy/public/favicon.ico
|
195
|
-
- spec/examples.txt
|
196
|
-
- spec/fixtures/files/govpay/create_payment_created_response.json
|
197
|
-
- spec/fixtures/files/govpay/create_payment_error_response.json
|
198
|
-
- spec/fixtures/files/govpay/get_payment_response_cancelled.json
|
199
|
-
- spec/fixtures/files/govpay/get_payment_response_created.json
|
200
|
-
- spec/fixtures/files/govpay/get_payment_response_error.json
|
201
|
-
- spec/fixtures/files/govpay/get_payment_response_failure.json
|
202
|
-
- spec/fixtures/files/govpay/get_payment_response_not_found.json
|
203
|
-
- spec/fixtures/files/govpay/get_payment_response_submitted.json
|
204
|
-
- spec/fixtures/files/govpay/get_payment_response_success.json
|
205
|
-
- spec/lib/configuration_spec.rb
|
206
|
-
- spec/rails_helper.rb
|
207
|
-
- spec/requests/company_spec.rb
|
208
|
-
- spec/requests/govpay_spec.rb
|
209
|
-
- spec/requests/officers_spec.rb
|
210
|
-
- spec/services/companies_house_service_spec.rb
|
211
|
-
- spec/services/govpay_create_payment_service_spec.rb
|
212
|
-
- spec/services/govpay_get_payment_service_spec.rb
|
213
|
-
- spec/services/govpay_refund_details_service_spec.rb
|
214
|
-
- spec/services/govpay_request_refund_service_spec.rb
|
215
|
-
- spec/spec_helper.rb
|
216
|
-
- spec/support/helpers/configuration.rb
|
217
|
-
- spec/support/helpers/helpers.rb
|
218
|
-
- spec/support/helpers/waste_carriers_engine.rb
|
219
|
-
- spec/support/helpers/xml_matchers.rb
|
220
|
-
- spec/support/pry.rb
|
221
|
-
- spec/support/simplecov.rb
|
222
89
|
homepage: https://github.com/DEFRA/defra-ruby-mocks
|
223
90
|
licenses:
|
224
91
|
- The Open Government Licence (OGL) Version 3
|
225
|
-
metadata:
|
92
|
+
metadata:
|
93
|
+
rubygems_mfa_required: 'true'
|
226
94
|
post_install_message:
|
227
95
|
rdoc_options: []
|
228
96
|
require_paths:
|
@@ -231,78 +99,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
231
99
|
requirements:
|
232
100
|
- - ">="
|
233
101
|
- !ruby/object:Gem::Version
|
234
|
-
version:
|
102
|
+
version: 3.2.2
|
235
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
236
104
|
requirements:
|
237
105
|
- - ">="
|
238
106
|
- !ruby/object:Gem::Version
|
239
107
|
version: '0'
|
240
108
|
requirements: []
|
241
|
-
rubygems_version: 3.
|
109
|
+
rubygems_version: 3.4.10
|
242
110
|
signing_key:
|
243
111
|
specification_version: 4
|
244
112
|
summary: Defra Ruby on Rails external API mocking engine
|
245
|
-
test_files:
|
246
|
-
- spec/spec_helper.rb
|
247
|
-
- spec/dummy/app/controllers/application_controller.rb
|
248
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
249
|
-
- spec/dummy/app/assets/javascripts/application.js
|
250
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
251
|
-
- spec/dummy/app/helpers/application_helper.rb
|
252
|
-
- spec/dummy/bin/rake
|
253
|
-
- spec/dummy/bin/setup
|
254
|
-
- spec/dummy/bin/bundle
|
255
|
-
- spec/dummy/bin/rails
|
256
|
-
- spec/dummy/config/secrets.yml
|
257
|
-
- spec/dummy/config/routes.rb
|
258
|
-
- spec/dummy/config/locales/en.yml
|
259
|
-
- spec/dummy/config/environments/production.rb
|
260
|
-
- spec/dummy/config/environments/development.rb
|
261
|
-
- spec/dummy/config/environments/test.rb
|
262
|
-
- spec/dummy/config/environment.rb
|
263
|
-
- spec/dummy/config/application.rb
|
264
|
-
- spec/dummy/config/boot.rb
|
265
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
266
|
-
- spec/dummy/config/initializers/mime_types.rb
|
267
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
268
|
-
- spec/dummy/config/initializers/session_store.rb
|
269
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
270
|
-
- spec/dummy/config/initializers/assets.rb
|
271
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
272
|
-
- spec/dummy/config/initializers/to_time_preserves_timezone.rb
|
273
|
-
- spec/dummy/config/initializers/inflections.rb
|
274
|
-
- spec/dummy/config.ru
|
275
|
-
- spec/dummy/Rakefile
|
276
|
-
- spec/dummy/public/favicon.ico
|
277
|
-
- spec/dummy/public/422.html
|
278
|
-
- spec/dummy/public/500.html
|
279
|
-
- spec/dummy/public/404.html
|
280
|
-
- spec/dummy/log/test.log
|
281
|
-
- spec/dummy/README.rdoc
|
282
|
-
- spec/examples.txt
|
283
|
-
- spec/defra_ruby_mocks_spec.rb
|
284
|
-
- spec/requests/govpay_spec.rb
|
285
|
-
- spec/requests/company_spec.rb
|
286
|
-
- spec/requests/officers_spec.rb
|
287
|
-
- spec/support/simplecov.rb
|
288
|
-
- spec/support/pry.rb
|
289
|
-
- spec/support/helpers/helpers.rb
|
290
|
-
- spec/support/helpers/xml_matchers.rb
|
291
|
-
- spec/support/helpers/configuration.rb
|
292
|
-
- spec/support/helpers/waste_carriers_engine.rb
|
293
|
-
- spec/lib/configuration_spec.rb
|
294
|
-
- spec/fixtures/files/govpay/get_payment_response_submitted.json
|
295
|
-
- spec/fixtures/files/govpay/get_payment_response_not_found.json
|
296
|
-
- spec/fixtures/files/govpay/create_payment_created_response.json
|
297
|
-
- spec/fixtures/files/govpay/get_payment_response_created.json
|
298
|
-
- spec/fixtures/files/govpay/create_payment_error_response.json
|
299
|
-
- spec/fixtures/files/govpay/get_payment_response_success.json
|
300
|
-
- spec/fixtures/files/govpay/get_payment_response_failure.json
|
301
|
-
- spec/fixtures/files/govpay/get_payment_response_cancelled.json
|
302
|
-
- spec/fixtures/files/govpay/get_payment_response_error.json
|
303
|
-
- spec/rails_helper.rb
|
304
|
-
- spec/services/govpay_get_payment_service_spec.rb
|
305
|
-
- spec/services/govpay_request_refund_service_spec.rb
|
306
|
-
- spec/services/companies_house_service_spec.rb
|
307
|
-
- spec/services/govpay_refund_details_service_spec.rb
|
308
|
-
- spec/services/govpay_create_payment_service_spec.rb
|
113
|
+
test_files: []
|
@@ -1,44 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "rails_helper"
|
4
|
-
|
5
|
-
RSpec.describe DefraRubyMocks do
|
6
|
-
describe "VERSION" do
|
7
|
-
it "is a version string in the correct format" do
|
8
|
-
expect(DefraRubyMocks::VERSION).to be_a(String)
|
9
|
-
expect(DefraRubyMocks::VERSION).to match(/\d+\.\d+\.\d+/)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
describe "#configuration" do
|
14
|
-
before(:each) { Helpers::Configuration.reset_for_tests }
|
15
|
-
|
16
|
-
context "when the host app has not provided configuration" do
|
17
|
-
let(:enabled) { false }
|
18
|
-
let(:delay) { 1000 }
|
19
|
-
|
20
|
-
it "returns a DefraRubyMocks::Configuration instance with default values" do
|
21
|
-
expect(described_class.configuration).to be_an_instance_of(DefraRubyMocks::Configuration)
|
22
|
-
|
23
|
-
expect(described_class.configuration.enabled?).to eq(enabled)
|
24
|
-
expect(described_class.configuration.delay).to eq(delay)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
context "when the host app has provided configuration" do
|
29
|
-
let(:enabled) { true }
|
30
|
-
let(:delay) { 2000 }
|
31
|
-
|
32
|
-
it "returns an DefraRubyMocks::Configuration instance with matching values" do
|
33
|
-
described_class.configure do |config|
|
34
|
-
config.enable = enabled
|
35
|
-
config.delay = delay
|
36
|
-
end
|
37
|
-
|
38
|
-
expect(described_class.configuration).to be_an_instance_of(DefraRubyMocks::Configuration)
|
39
|
-
expect(described_class.configuration.enabled?).to eq(enabled)
|
40
|
-
expect(described_class.configuration.delay).to eq(delay)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
data/spec/dummy/README.rdoc
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
== README
|
2
|
-
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
4
|
-
application up and running.
|
5
|
-
|
6
|
-
Things you may want to cover:
|
7
|
-
|
8
|
-
* Ruby version
|
9
|
-
|
10
|
-
* System dependencies
|
11
|
-
|
12
|
-
* Configuration
|
13
|
-
|
14
|
-
* Database creation
|
15
|
-
|
16
|
-
* Database initialization
|
17
|
-
|
18
|
-
* How to run the test suite
|
19
|
-
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
21
|
-
|
22
|
-
* Deployment instructions
|
23
|
-
|
24
|
-
* ...
|
25
|
-
|
26
|
-
|
27
|
-
Please feel free to use a different markup language if you do not plan to run
|
28
|
-
<tt>rake doc:app</tt>.
|
data/spec/dummy/Rakefile
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// compiled file.
|
9
|
-
//
|
10
|
-
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
-
// about supported directives.
|
12
|
-
//
|
13
|
-
//= require_tree .
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
-
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
-
* file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Dummy</title>
|
5
|
-
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
6
|
-
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
|
-
<%= csrf_meta_tags %>
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
|
11
|
-
<%= yield %>
|
12
|
-
|
13
|
-
</body>
|
14
|
-
</html>
|