fdic 0.8.2 → 0.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5185ec734ba90c63c1a72a48fbd03d2c7bdac735
4
- data.tar.gz: edf5c92d263b6e366820c7b4f13d9a4630a8a2d7
3
+ metadata.gz: f71bbcbce059fd804c78ddefb1ab481347593b0d
4
+ data.tar.gz: 8863c48f3588056f4c7e24d2da3ccdd023c1f95d
5
5
  SHA512:
6
- metadata.gz: 2d69d77fc7d6ec53c8edd91b742c9cfbcbada1bec9dbccb17537fbb7611a96e17423ecde53886fabea228a86c93f159a78866987bd2e0ee96f47abc4a4a051ae
7
- data.tar.gz: ea2421795fc257cf8a499cc5fb5e1879a122be400ddbb0f08cd2f85369238cc541016ac17134df5d7940eed6df6f8371dc57a9a71bee01587e8b207faf21457f
6
+ metadata.gz: 50a153d100c123c2452846bf58d6fbe3700af91968d1b52fd73d48c466668fdcf961a2340d81c3d00ccdcd7ef52cddff6f1070b707fd42a33d0a8091df5ee3c8
7
+ data.tar.gz: 90e321565f41ccadcb38f9f11b13caa1e9cd3fd432cd523df77dff22cc8d47229c24f685dad7e00480fc8ebac769e49b22630f79fb9c942fa7e215cc2d1815b3
@@ -1,12 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fdic (0.8.2)
4
+ fdic (0.9.0)
5
5
  httparty (~> 0.13)
6
+ json-schema (~> 2.5.0)
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
9
10
  specs:
11
+ addressable (2.3.8)
10
12
  codeclimate-test-reporter (0.4.8)
11
13
  simplecov (>= 0.7.1, < 1.0.0)
12
14
  diff-lcs (1.2.5)
@@ -15,6 +17,8 @@ GEM
15
17
  json (~> 1.8)
16
18
  multi_xml (>= 0.5.2)
17
19
  json (1.8.3)
20
+ json-schema (2.5.1)
21
+ addressable (~> 2.3.7)
18
22
  multi_xml (0.5.5)
19
23
  rake (10.4.2)
20
24
  rspec (3.4.0)
data/Rakefile CHANGED
@@ -1,6 +1,9 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
+ require './lib/tasks/fdic_tasks'
3
4
 
4
5
  RSpec::Core::RakeTask.new(:spec)
5
6
 
6
7
  task :default => :spec
8
+ Bundler::GemHelper.install_tasks
9
+ FDIC::FDICTasks.new.install_tasks
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ["lib"]
21
21
 
22
22
  spec.add_runtime_dependency "httparty", "~> 0.13"
23
+ spec.add_runtime_dependency "json-schema", "~> 2.5.0"
23
24
  spec.add_development_dependency "bundler", "~> 1.10"
24
25
  spec.add_development_dependency "rake", "~> 10.0"
25
26
  spec.add_development_dependency "rspec", "~> 3.0"
@@ -1,4 +1,10 @@
1
1
  require 'httparty'
2
2
  require 'logger'
3
- require "fdic/version"
3
+ require 'fdic/version'
4
4
  require 'fdic/bank_find'
5
+ require 'tasks/fdic_tasks'
6
+
7
+ module FDIC
8
+ require "fdic/railtie" if defined?(Rails)
9
+ end
10
+
@@ -5,6 +5,7 @@ require 'fdic/bank_find/bank'
5
5
  require 'fdic/bank_find/institution'
6
6
  require 'fdic/bank_find/branch'
7
7
  require 'fdic/bank_find/history_event'
8
+ require 'fdic/bank_find/schema_validators'
8
9
 
9
10
  module FDIC
10
11
  module BankFind
@@ -40,6 +41,21 @@ module FDIC
40
41
  }
41
42
  end
42
43
 
44
+ def validate_schema!
45
+ FDIC::BankFind::SchemaValidators::InstitutionValidator.new.schema_valid!
46
+ FDIC::BankFind::SchemaValidators::BankValidator.new.schema_valid!
47
+ FDIC::BankFind::SchemaValidators::HistoryEventValidator.new.schema_valid!
48
+ FDIC::BankFind::SchemaValidators::BranchValidator.new.schema_valid!
49
+ true
50
+ end
51
+
52
+ def validate_schema?
53
+ FDIC::BankFind::SchemaValidators::InstitutionValidator.new.schema_valid? &&
54
+ FDIC::BankFind::SchemaValidators::BankValidator.new.schema_valid? &&
55
+ FDIC::BankFind::SchemaValidators::HistoryEventValidator.new.schema_valid? &&
56
+ FDIC::BankFind::SchemaValidators::BranchValidator.new.schema_valid?
57
+ end
58
+
43
59
  extend self
44
60
  end
45
61
  end
@@ -0,0 +1,11 @@
1
+ require 'fdic/bank_find/schema_validators/base_validator'
2
+ require 'fdic/bank_find/schema_validators/bank_validator'
3
+ require 'fdic/bank_find/schema_validators/institution_validator'
4
+ require 'fdic/bank_find/schema_validators/branch_validator'
5
+ require 'fdic/bank_find/schema_validators/history_event_validator'
6
+ module FDIC
7
+ module BankFind
8
+ module SchemaValidators
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,20 @@
1
+ module FDIC
2
+ module BankFind
3
+ module SchemaValidators
4
+ class BankValidator < BaseValidator
5
+ private
6
+ def schema
7
+ File.join(File.dirname(__FILE__), '../schemas/bank_response_schema.json')
8
+ end
9
+
10
+ def client_method
11
+ :find_bank
12
+ end
13
+
14
+ def client_method_arguments
15
+ 'thomaston savings bank'
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,24 @@
1
+ require 'json-schema'
2
+ module FDIC
3
+ module BankFind
4
+ module SchemaValidators
5
+ class BaseValidator
6
+ def schema_valid?
7
+ JSON::Validator.validate(schema, response)
8
+ end
9
+
10
+ def schema_valid!
11
+ JSON::Validator.validate!(schema, response)
12
+ #JSON::Validator.validate! will return true if it is successful, or raise if there is an error. Swallow true and return nil otherwise
13
+ nil
14
+ end
15
+
16
+ protected
17
+
18
+ def response
19
+ @response ||= Client.new.send(client_method, *client_method_arguments)
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,20 @@
1
+ module FDIC
2
+ module BankFind
3
+ module SchemaValidators
4
+ class BranchValidator < BaseValidator
5
+ private
6
+ def schema
7
+ File.join(File.dirname(__FILE__), '../schemas/branch_response_schema.json')
8
+ end
9
+
10
+ def client_method
11
+ :find_branches
12
+ end
13
+
14
+ def client_method_arguments
15
+ '18258'
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ module FDIC
2
+ module BankFind
3
+ module SchemaValidators
4
+ class HistoryEventValidator < BaseValidator
5
+ private
6
+ def schema
7
+ File.join(File.dirname(__FILE__), '../schemas/history_event_response_schema.json')
8
+ end
9
+
10
+ def client_method
11
+ :find_history_events
12
+ end
13
+
14
+ def client_method_arguments
15
+ ['thomaston savings bank', '18258']
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ module FDIC
2
+ module BankFind
3
+ module SchemaValidators
4
+ class InstitutionValidator < BaseValidator
5
+ private
6
+ def schema
7
+ File.join(File.dirname(__FILE__), '../schemas/institution_response_schema.json')
8
+ end
9
+
10
+ def client_method
11
+ :find_institution
12
+ end
13
+
14
+ def client_method_arguments
15
+ '18258'
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,89 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "description": "Generated from bank_response.json with shasum fde203dbf05cc371f4752a95847adf6cefeada6d",
4
+ "type": "object",
5
+ "required": [
6
+ "d"
7
+ ],
8
+ "properties": {
9
+ "d": {
10
+ "type": "object",
11
+ "required": [
12
+ "results",
13
+ "__count",
14
+ "__next"
15
+ ],
16
+ "properties": {
17
+ "results": {
18
+ "type": "array",
19
+ "uniqueItems": true,
20
+ "items": {
21
+ "type": "object",
22
+ "required": [
23
+ "__metadata",
24
+ "id",
25
+ "zip",
26
+ "certNumber",
27
+ "legalName",
28
+ "address",
29
+ "activeFlag",
30
+ "state",
31
+ "city"
32
+ ],
33
+ "properties": {
34
+ "__metadata": {
35
+ "type": "object",
36
+ "required": [
37
+ "uri",
38
+ "type"
39
+ ],
40
+ "properties": {
41
+ "uri": {
42
+ "type": "string"
43
+ },
44
+ "type": {
45
+ "type": "string"
46
+ }
47
+ }
48
+ },
49
+ "id": {
50
+ "type": "string"
51
+ },
52
+ "zip": {
53
+ "type": "string"
54
+ },
55
+ "certNumber": {
56
+ "type": "string"
57
+ },
58
+ "legalName": {
59
+ "type": "string"
60
+ },
61
+ "address": {
62
+ "type": "string"
63
+ },
64
+ "activeFlag": {
65
+ "type": "string"
66
+ },
67
+ "state": {
68
+ "type": "string"
69
+ },
70
+ "officeCount": {
71
+ },
72
+ "effectiveDate": {
73
+ },
74
+ "city": {
75
+ "type": "string"
76
+ }
77
+ }
78
+ }
79
+ },
80
+ "__count": {
81
+ "type": "string"
82
+ },
83
+ "__next": {
84
+ "type": "string"
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
@@ -0,0 +1,100 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-03/schema#",
3
+ "description": "Generated from branch_response.json with shasum fa779f9bbd4882f5d318d776aecca9ba0c8fac4b",
4
+ "type": "object",
5
+ "required": true,
6
+ "properties": {
7
+ "d": {
8
+ "type": "object",
9
+ "required": true,
10
+ "properties": {
11
+ "results": {
12
+ "type": "array",
13
+ "required": true,
14
+ "minItems": 1,
15
+ "uniqueItems": true,
16
+ "items": {
17
+ "type": "object",
18
+ "required": true,
19
+ "properties": {
20
+ "__metadata": {
21
+ "type": "object",
22
+ "required": true,
23
+ "properties": {
24
+ "uri": {
25
+ "type": "string",
26
+ "required": true
27
+ },
28
+ "type": {
29
+ "type": "string",
30
+ "required": true
31
+ }
32
+ }
33
+ },
34
+ "certNumber": {
35
+ "type": "string",
36
+ "required": true
37
+ },
38
+ "zip": {
39
+ "type": "string",
40
+ "required": true
41
+ },
42
+ "establishedDate": {
43
+ "type": "string",
44
+ "required": true
45
+ },
46
+ "branchNum": {
47
+ "type": ["string", "null"],
48
+ "required": false
49
+ },
50
+ "state": {
51
+ "type": "string",
52
+ "required": true
53
+ },
54
+ "city": {
55
+ "type": "string",
56
+ "required": true
57
+ },
58
+ "id": {
59
+ "type": "string",
60
+ "required": true
61
+ },
62
+ "fiUninum": {
63
+ "type": "string",
64
+ "required": true
65
+ },
66
+ "address": {
67
+ "type": "string",
68
+ "required": true
69
+ },
70
+ "county": {
71
+ "type": "string",
72
+ "required": true
73
+ },
74
+ "branchName": {
75
+ "type": "string",
76
+ "required": true
77
+ },
78
+ "acquiredDate": {
79
+ "type": ["string", "null"],
80
+ "required": false
81
+ },
82
+ "servTypeCd": {
83
+ "type": "string",
84
+ "required": true
85
+ }
86
+ }
87
+ }
88
+ },
89
+ "__count": {
90
+ "type": "string",
91
+ "required": true
92
+ },
93
+ "__next": {
94
+ "type": "string",
95
+ "required": true
96
+ }
97
+ }
98
+ }
99
+ }
100
+ }
@@ -0,0 +1,188 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-03/schema#",
3
+ "description": "Generated from history_event_response.json with shasum 35b1f7d6d91ef88b3fb8b9d06c23f6006906c32b",
4
+ "type": "object",
5
+ "required": true,
6
+ "properties": {
7
+ "d": {
8
+ "type": "object",
9
+ "required": true,
10
+ "properties": {
11
+ "results": {
12
+ "type": "array",
13
+ "required": true,
14
+ "minItems": 1,
15
+ "uniqueItems": true,
16
+ "items": {
17
+ "type": "object",
18
+ "required": true,
19
+ "properties": {
20
+ "__metadata": {
21
+ "type": "object",
22
+ "required": true,
23
+ "properties": {
24
+ "uri": {
25
+ "type": "string",
26
+ "required": true
27
+ },
28
+ "type": {
29
+ "type": "string",
30
+ "required": true
31
+ }
32
+ }
33
+ },
34
+ "certNumber": {
35
+ "type": "string",
36
+ "required": true
37
+ },
38
+ "orgDvstLegalName": {
39
+ "type": ["string","null"],
40
+ "required": true
41
+ },
42
+ "primaryRegulatoryAgencyCheck": {
43
+ "type": ["string","null"],
44
+ "required": true
45
+ },
46
+ "certClickable": {
47
+ "type": "string",
48
+ "required": true
49
+ },
50
+ "state": {
51
+ "type": "string",
52
+ "required": true
53
+ },
54
+ "acqCertClickable": {
55
+ "type": ["string","null"],
56
+ "required": true
57
+ },
58
+ "primaryRegulatoryAgency": {
59
+ "type": "string",
60
+ "required": true
61
+ },
62
+ "currentInsurance": {
63
+ "type": "string",
64
+ "required": true
65
+ },
66
+ "city": {
67
+ "type": "string",
68
+ "required": true
69
+ },
70
+ "id": {
71
+ "type": "string",
72
+ "required": true
73
+ },
74
+ "instClassCode": {
75
+ "type": "string",
76
+ "required": true
77
+ },
78
+ "instClassDescription": {
79
+ "type": "string",
80
+ "required": true
81
+ },
82
+ "currentInsuranceCheck": {
83
+ "type": ["string","null"],
84
+ "required": true
85
+ },
86
+ "orgDvstCertNum": {
87
+ "type": "string",
88
+ "required": true
89
+ },
90
+ "orgTypeDescrption": {
91
+ "type": "string",
92
+ "required": true
93
+ },
94
+ "changeDesc": {
95
+ "type": "string",
96
+ "required": true
97
+ },
98
+ "uniqDvstCert": {
99
+ "type": ["string","null"],
100
+ "required": true
101
+ },
102
+ "orgDvstCity": {
103
+ "type": ["string","null"],
104
+ "required": true
105
+ },
106
+ "orgAcqLegalName": {
107
+ "type": ["string","null"],
108
+ "required": true
109
+ },
110
+ "dvstCertClickable": {
111
+ "type": ["string","null"],
112
+ "required": true
113
+ },
114
+ "legalName": {
115
+ "type": "string",
116
+ "required": true
117
+ },
118
+ "changeCode": {
119
+ "type": "string",
120
+ "required": true
121
+ },
122
+ "check350HappenedOn211Day": {
123
+ "type": "boolean",
124
+ "required": false
125
+ },
126
+ "uniqCert": {
127
+ "type": "string",
128
+ "required": true
129
+ },
130
+ "orgAcqCertNum": {
131
+ "type": "string",
132
+ "required": true
133
+ },
134
+ "orgDvstState": {
135
+ "type": ["string","null"],
136
+ "required": true
137
+ },
138
+ "eventDescription": {
139
+ "type": "string",
140
+ "required": true
141
+ },
142
+ "movedLocationMessage": {
143
+ "type": ["string","null"],
144
+ "required": true
145
+ },
146
+ "orgAcqState": {
147
+ "type": ["string","null"],
148
+ "required": true
149
+ },
150
+ "trustPowerCheck": {
151
+ "type": ["string","null"],
152
+ "required": true
153
+ },
154
+ "orgEffDate": {
155
+ "type": "string",
156
+ "required": true
157
+ },
158
+ "prevLegalName": {
159
+ "type": "string",
160
+ "required": true
161
+ },
162
+ "orgAcqCity": {
163
+ "type": ["string","null"],
164
+ "required": true
165
+ },
166
+ "uniqAcqCert": {
167
+ "type": ["string","null"],
168
+ "required": true
169
+ },
170
+ "trustPower": {
171
+ "type": "string",
172
+ "required": true
173
+ }
174
+ }
175
+ }
176
+ },
177
+ "__count": {
178
+ "type": "string",
179
+ "required": true
180
+ },
181
+ "__next": {
182
+ "type": "string",
183
+ "required": true
184
+ }
185
+ }
186
+ }
187
+ }
188
+ }
@@ -0,0 +1,281 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-03/schema#",
3
+ "description": "Generated from institution_response.json with shasum 86f71da403d71d62b757406da1d687d0661dd0e3",
4
+ "type": "object",
5
+ "required": true,
6
+ "properties": {
7
+ "d": {
8
+ "type": "object",
9
+ "required": true,
10
+ "properties": {
11
+ "results": {
12
+ "type": "array",
13
+ "required": true,
14
+ "minItems": 1,
15
+ "uniqueItems": true,
16
+ "items": {
17
+ "type": "object",
18
+ "required": true,
19
+ "properties": {
20
+ "__metadata": {
21
+ "type": "object",
22
+ "required": true,
23
+ "properties": {
24
+ "uri": {
25
+ "type": "string",
26
+ "required": true
27
+ },
28
+ "type": {
29
+ "type": "string",
30
+ "required": true
31
+ }
32
+ }
33
+ },
34
+ "changeCodes": {
35
+ "type": "string",
36
+ "required": true
37
+ },
38
+ "establishedDate": {
39
+ "type": "string",
40
+ "required": true
41
+ },
42
+ "certNumber": {
43
+ "type": "string",
44
+ "required": true
45
+ },
46
+ "asOfDate": {
47
+ "type": "string",
48
+ "required": true
49
+ },
50
+ "acqName": {
51
+ "type": "string",
52
+ "required": true
53
+ },
54
+ "forOffCnt": {
55
+ "type": "string",
56
+ "required": true
57
+ },
58
+ "instFinLegalName": {
59
+ "type": "string",
60
+ "required": true
61
+ },
62
+ "insuredDate": {
63
+ "type": "string",
64
+ "required": true
65
+ },
66
+ "city": {
67
+ "type": "string",
68
+ "required": true
69
+ },
70
+ "acqCert": {
71
+ "type": "string",
72
+ "required": true
73
+ },
74
+ "instClassCode": {
75
+ "type": "string",
76
+ "required": true
77
+ },
78
+ "highRegulatoryHolder": {
79
+ "type": "string",
80
+ "required": true
81
+ },
82
+ "domOffCnt": {
83
+ "type": "string",
84
+ "required": true
85
+ },
86
+ "legalName": {
87
+ "type": "string",
88
+ "required": true
89
+ },
90
+ "ultCertState": {
91
+ "type": "string",
92
+ "required": true
93
+ },
94
+ "netIncome": {
95
+ "type": "string",
96
+ "required": true
97
+ },
98
+ "ultCertName": {
99
+ "type": "string",
100
+ "required": true
101
+ },
102
+ "ultCertNum": {
103
+ "type": "string",
104
+ "required": true
105
+ },
106
+ "totalDeposits": {
107
+ "type": "string",
108
+ "required": true
109
+ },
110
+ "status": {
111
+ "type": ["string", "null"]
112
+ },
113
+ "bankEquityCapital": {
114
+ "type": "string",
115
+ "required": true
116
+ },
117
+ "FACodeText": {
118
+ "type": "string",
119
+ "required": true
120
+ },
121
+ "fedReserveID": {
122
+ "type": "string",
123
+ "required": true
124
+ },
125
+ "insuredFrmDt": {
126
+ "type": "string",
127
+ "required": true
128
+ },
129
+ "returnOnEquity": {
130
+ "type": "string",
131
+ "required": true
132
+ },
133
+ "county": {
134
+ "type": "string",
135
+ "required": true
136
+ },
137
+ "domesticDeposits": {
138
+ "type": "string",
139
+ "required": true
140
+ },
141
+ "active": {
142
+ "type": "string",
143
+ "required": true
144
+ },
145
+ "ultCertCity": {
146
+ "type": "string",
147
+ "required": true
148
+ },
149
+ "charterNumber": {
150
+ "type": "string",
151
+ "required": true
152
+ },
153
+ "FACode": {
154
+ "type": "string",
155
+ "required": true
156
+ },
157
+ "insuredToDt": {
158
+ "type": "string",
159
+ "required": true
160
+ },
161
+ "state": {
162
+ "type": "string",
163
+ "required": true
164
+ },
165
+ "quarterlyReturnOnEquity": {
166
+ "type": "string",
167
+ "required": true
168
+ },
169
+ "preTaxReturnOnAssets": {
170
+ "type": "string",
171
+ "required": true
172
+ },
173
+ "id": {
174
+ "type": "string",
175
+ "required": true
176
+ },
177
+ "returnOnAssets": {
178
+ "type": "string",
179
+ "required": true
180
+ },
181
+ "inactive": {
182
+ "type": "string",
183
+ "required": true
184
+ },
185
+ "uniNum": {
186
+ "type": "string",
187
+ "required": true
188
+ },
189
+ "docketNumber": {
190
+ "type": "string",
191
+ "required": true
192
+ },
193
+ "webSite": {
194
+ "type": "string",
195
+ "required": true
196
+ },
197
+ "activeFlag": {
198
+ "type": "string",
199
+ "required": true
200
+ },
201
+ "reportDate": {
202
+ "type": "string",
203
+ "required": true
204
+ },
205
+ "changeDesc": {
206
+ "type": ["string", "null"]
207
+ },
208
+ "zip": {
209
+ "type": "string",
210
+ "required": true
211
+ },
212
+ "inActiveAsofDt": {
213
+ "type": "string",
214
+ "required": true
215
+ },
216
+ "changeCode": {
217
+ "type": "string",
218
+ "required": true
219
+ },
220
+ "othAreaOffCnt": {
221
+ "type": "string",
222
+ "required": true
223
+ },
224
+ "bankClassDesc": {
225
+ "type": "string",
226
+ "required": true
227
+ },
228
+ "ncuaID": {
229
+ "type": "string",
230
+ "required": true
231
+ },
232
+ "quarterlyNetIncome": {
233
+ "type": "string",
234
+ "required": true
235
+ },
236
+ "quarterlyPreTaxReturnOnAssets": {
237
+ "type": "string",
238
+ "required": true
239
+ },
240
+ "address": {
241
+ "type": "string",
242
+ "required": true
243
+ },
244
+ "totalAssets": {
245
+ "type": "string",
246
+ "required": true
247
+ },
248
+ "holdingCompany": {
249
+ "type": ["string", "null"]
250
+ },
251
+ "officeCount": {
252
+ "type": "string",
253
+ "required": true
254
+ },
255
+ "prevLegalName": {
256
+ "type": "string",
257
+ "required": true
258
+ },
259
+ "bankClass": {
260
+ "type": "string",
261
+ "required": true
262
+ },
263
+ "quarterlyReturnOnAssets": {
264
+ "type": "string",
265
+ "required": true
266
+ }
267
+ }
268
+ }
269
+ },
270
+ "__count": {
271
+ "type": "string",
272
+ "required": true
273
+ },
274
+ "__next": {
275
+ "type": "string",
276
+ "required": true
277
+ }
278
+ }
279
+ }
280
+ }
281
+ }
@@ -0,0 +1,9 @@
1
+ require 'fdic'
2
+ require 'rails'
3
+ module FDIC
4
+ class Railtie < Rails::Railtie
5
+ rake_tasks do
6
+ FDIC::FDICTasks.new.install_tasks
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module FDIC
2
- VERSION = "0.8.2"
2
+ VERSION = "0.9.0"
3
3
  end
@@ -0,0 +1,14 @@
1
+ require 'fdic'
2
+ module FDIC
3
+ class FDICTasks
4
+ include Rake::DSL if defined? Rake::DSL
5
+ def install_tasks
6
+ namespace :fdic do
7
+ desc "Verify Schema"
8
+ task(:validate_schema!) do
9
+ ::FDIC::BankFind.validate_schema!
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fdic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Reznick
@@ -25,6 +25,20 @@ dependencies:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0.13'
28
+ - !ruby/object:Gem::Dependency
29
+ name: json-schema
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: 2.5.0
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: 2.5.0
28
42
  - !ruby/object:Gem::Dependency
29
43
  name: bundler
30
44
  requirement: !ruby/object:Gem::Requirement
@@ -95,7 +109,19 @@ files:
95
109
  - lib/fdic/bank_find/history_event.rb
96
110
  - lib/fdic/bank_find/institution.rb
97
111
  - lib/fdic/bank_find/record.rb
112
+ - lib/fdic/bank_find/schema_validators.rb
113
+ - lib/fdic/bank_find/schema_validators/bank_validator.rb
114
+ - lib/fdic/bank_find/schema_validators/base_validator.rb
115
+ - lib/fdic/bank_find/schema_validators/branch_validator.rb
116
+ - lib/fdic/bank_find/schema_validators/history_event_validator.rb
117
+ - lib/fdic/bank_find/schema_validators/institution_validator.rb
118
+ - lib/fdic/bank_find/schemas/bank_response_schema.json
119
+ - lib/fdic/bank_find/schemas/branch_response_schema.json
120
+ - lib/fdic/bank_find/schemas/history_event_response_schema.json
121
+ - lib/fdic/bank_find/schemas/institution_response_schema.json
122
+ - lib/fdic/railtie.rb
98
123
  - lib/fdic/version.rb
124
+ - lib/tasks/fdic_tasks.rb
99
125
  homepage: https://github.com/ContinuityControl/fdic
100
126
  licenses:
101
127
  - MIT