companies-house-gateway 0.2.0 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +32 -3
- data/lib/companies_house_gateway/checks/check.rb +8 -3
- data/lib/companies_house_gateway/checks/company_appointments.rb +3 -3
- data/lib/companies_house_gateway/checks/document.rb +14 -2
- data/lib/companies_house_gateway/checks/mortgages.rb +3 -3
- data/lib/companies_house_gateway/checks/name_search.rb +1 -2
- data/lib/companies_house_gateway/checks/number_search.rb +1 -2
- data/lib/companies_house_gateway/checks/officer_details.rb +4 -3
- data/lib/companies_house_gateway/checks/officer_search.rb +2 -2
- data/lib/companies_house_gateway/client.rb +6 -5
- data/lib/companies_house_gateway/constants.rb +14 -0
- data/lib/companies_house_gateway/errors/api_error.rb +4 -0
- data/lib/companies_house_gateway/errors/invalid_request_error.rb +10 -0
- data/lib/companies_house_gateway/errors/invalid_response_error.rb +4 -0
- data/lib/companies_house_gateway/middleware/check_response.rb +29 -0
- data/lib/companies_house_gateway/request.rb +2 -1
- data/lib/companies_house_gateway/validations.rb +78 -0
- data/lib/companies_house_gateway/version.rb +1 -1
- data/lib/companies_house_gateway.rb +5 -0
- data/spec/checks/company_appointments_spec.rb +3 -3
- data/spec/checks/company_details_spec.rb +2 -1
- data/spec/checks/document_info_spec.rb +2 -1
- data/spec/checks/document_spec.rb +6 -3
- data/spec/checks/filing_history_spec.rb +2 -1
- data/spec/checks/mortgages_spec.rb +3 -3
- data/spec/checks/name_search_spec.rb +2 -1
- data/spec/checks/number_search_spec.rb +2 -1
- data/spec/checks/officer_details_spec.rb +2 -2
- data/spec/checks/officer_search_spec.rb +2 -2
- data/spec/fixtures/bad_response.xml +35 -0
- data/spec/fixtures/check_responses/company_appointments.xml +319 -0
- data/spec/fixtures/check_responses/company_details.xml +62 -0
- data/spec/fixtures/check_responses/document.xml +32 -0
- data/spec/fixtures/check_responses/document_info.xml +34 -0
- data/spec/fixtures/check_responses/filing_history.xml +57 -0
- data/spec/fixtures/check_responses/mortgages.xml +107 -0
- data/spec/fixtures/check_responses/name_search.xml +101 -0
- data/spec/fixtures/check_responses/number_search.xml +36 -0
- data/spec/fixtures/check_responses/officer_details.xml +65 -0
- data/spec/fixtures/check_responses/officer_search.xml +90 -0
- data/spec/fixtures/{checks → check_schemas}/chbase.xsd +0 -0
- data/spec/fixtures/{checks → check_schemas}/company_appointments.xsd +0 -0
- data/spec/fixtures/{checks → check_schemas}/company_details.xsd +0 -0
- data/spec/fixtures/{checks → check_schemas}/document.xsd +0 -0
- data/spec/fixtures/{checks → check_schemas}/document_info.xsd +0 -0
- data/spec/fixtures/{checks → check_schemas}/filing_history.xsd +0 -0
- data/spec/fixtures/{checks → check_schemas}/mortgages.xsd +0 -0
- data/spec/fixtures/{checks → check_schemas}/name_search.xsd +0 -0
- data/spec/fixtures/{checks → check_schemas}/number_search.xsd +0 -0
- data/spec/fixtures/{checks → check_schemas}/officer_details.xsd +0 -0
- data/spec/fixtures/{checks → check_schemas}/officer_search.xsd +0 -0
- data/spec/fixtures/response.xml +56 -0
- data/spec/request_spec.rb +24 -3
- data/spec/shared_examples.rb +20 -3
- data/spec/validations_spec.rb +157 -0
- metadata +55 -24
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: companies-house-gateway
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grey Baker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -122,9 +122,14 @@ files:
|
|
122
122
|
- lib/companies_house_gateway/client.rb
|
123
123
|
- lib/companies_house_gateway/config.rb
|
124
124
|
- lib/companies_house_gateway/constants.rb
|
125
|
+
- lib/companies_house_gateway/errors/api_error.rb
|
125
126
|
- lib/companies_house_gateway/errors/companies_house_gateway_error.rb
|
127
|
+
- lib/companies_house_gateway/errors/invalid_request_error.rb
|
128
|
+
- lib/companies_house_gateway/errors/invalid_response_error.rb
|
129
|
+
- lib/companies_house_gateway/middleware/check_response.rb
|
126
130
|
- lib/companies_house_gateway/request.rb
|
127
131
|
- lib/companies_house_gateway/util.rb
|
132
|
+
- lib/companies_house_gateway/validations.rb
|
128
133
|
- lib/companies_house_gateway/version.rb
|
129
134
|
- spec/checks/company_appointments_spec.rb
|
130
135
|
- spec/checks/company_details_spec.rb
|
@@ -138,21 +143,34 @@ files:
|
|
138
143
|
- spec/checks/officer_search_spec.rb
|
139
144
|
- spec/client_spec.rb
|
140
145
|
- spec/companies_house_gateway_spec.rb
|
141
|
-
- spec/fixtures/
|
142
|
-
- spec/fixtures/
|
143
|
-
- spec/fixtures/
|
144
|
-
- spec/fixtures/
|
145
|
-
- spec/fixtures/
|
146
|
-
- spec/fixtures/
|
147
|
-
- spec/fixtures/
|
148
|
-
- spec/fixtures/
|
149
|
-
- spec/fixtures/
|
150
|
-
- spec/fixtures/
|
151
|
-
- spec/fixtures/
|
146
|
+
- spec/fixtures/bad_response.xml
|
147
|
+
- spec/fixtures/check_responses/company_appointments.xml
|
148
|
+
- spec/fixtures/check_responses/company_details.xml
|
149
|
+
- spec/fixtures/check_responses/document.xml
|
150
|
+
- spec/fixtures/check_responses/document_info.xml
|
151
|
+
- spec/fixtures/check_responses/filing_history.xml
|
152
|
+
- spec/fixtures/check_responses/mortgages.xml
|
153
|
+
- spec/fixtures/check_responses/name_search.xml
|
154
|
+
- spec/fixtures/check_responses/number_search.xml
|
155
|
+
- spec/fixtures/check_responses/officer_details.xml
|
156
|
+
- spec/fixtures/check_responses/officer_search.xml
|
157
|
+
- spec/fixtures/check_schemas/chbase.xsd
|
158
|
+
- spec/fixtures/check_schemas/company_appointments.xsd
|
159
|
+
- spec/fixtures/check_schemas/company_details.xsd
|
160
|
+
- spec/fixtures/check_schemas/document.xsd
|
161
|
+
- spec/fixtures/check_schemas/document_info.xsd
|
162
|
+
- spec/fixtures/check_schemas/filing_history.xsd
|
163
|
+
- spec/fixtures/check_schemas/mortgages.xsd
|
164
|
+
- spec/fixtures/check_schemas/name_search.xsd
|
165
|
+
- spec/fixtures/check_schemas/number_search.xsd
|
166
|
+
- spec/fixtures/check_schemas/officer_details.xsd
|
167
|
+
- spec/fixtures/check_schemas/officer_search.xsd
|
152
168
|
- spec/fixtures/request.xsd
|
169
|
+
- spec/fixtures/response.xml
|
153
170
|
- spec/request_spec.rb
|
154
171
|
- spec/shared_examples.rb
|
155
172
|
- spec/spec_helper.rb
|
173
|
+
- spec/validations_spec.rb
|
156
174
|
homepage: https://github.com/gocardless/companies-house-gateway-ruby
|
157
175
|
licenses: []
|
158
176
|
metadata: {}
|
@@ -189,18 +207,31 @@ test_files:
|
|
189
207
|
- spec/checks/officer_search_spec.rb
|
190
208
|
- spec/client_spec.rb
|
191
209
|
- spec/companies_house_gateway_spec.rb
|
192
|
-
- spec/fixtures/
|
193
|
-
- spec/fixtures/
|
194
|
-
- spec/fixtures/
|
195
|
-
- spec/fixtures/
|
196
|
-
- spec/fixtures/
|
197
|
-
- spec/fixtures/
|
198
|
-
- spec/fixtures/
|
199
|
-
- spec/fixtures/
|
200
|
-
- spec/fixtures/
|
201
|
-
- spec/fixtures/
|
202
|
-
- spec/fixtures/
|
210
|
+
- spec/fixtures/bad_response.xml
|
211
|
+
- spec/fixtures/check_responses/company_appointments.xml
|
212
|
+
- spec/fixtures/check_responses/company_details.xml
|
213
|
+
- spec/fixtures/check_responses/document.xml
|
214
|
+
- spec/fixtures/check_responses/document_info.xml
|
215
|
+
- spec/fixtures/check_responses/filing_history.xml
|
216
|
+
- spec/fixtures/check_responses/mortgages.xml
|
217
|
+
- spec/fixtures/check_responses/name_search.xml
|
218
|
+
- spec/fixtures/check_responses/number_search.xml
|
219
|
+
- spec/fixtures/check_responses/officer_details.xml
|
220
|
+
- spec/fixtures/check_responses/officer_search.xml
|
221
|
+
- spec/fixtures/check_schemas/chbase.xsd
|
222
|
+
- spec/fixtures/check_schemas/company_appointments.xsd
|
223
|
+
- spec/fixtures/check_schemas/company_details.xsd
|
224
|
+
- spec/fixtures/check_schemas/document.xsd
|
225
|
+
- spec/fixtures/check_schemas/document_info.xsd
|
226
|
+
- spec/fixtures/check_schemas/filing_history.xsd
|
227
|
+
- spec/fixtures/check_schemas/mortgages.xsd
|
228
|
+
- spec/fixtures/check_schemas/name_search.xsd
|
229
|
+
- spec/fixtures/check_schemas/number_search.xsd
|
230
|
+
- spec/fixtures/check_schemas/officer_details.xsd
|
231
|
+
- spec/fixtures/check_schemas/officer_search.xsd
|
203
232
|
- spec/fixtures/request.xsd
|
233
|
+
- spec/fixtures/response.xml
|
204
234
|
- spec/request_spec.rb
|
205
235
|
- spec/shared_examples.rb
|
206
236
|
- spec/spec_helper.rb
|
237
|
+
- spec/validations_spec.rb
|