et_fake_ccd 0.1.18 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/lib/et_fake_ccd/service/data_store_app.rb +34 -0
- data/lib/et_fake_ccd/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64bc7fef33a7daa95d38f2fd2131c0039be9467f90495770dd83682be7d59091
|
4
|
+
data.tar.gz: fd9d6c03388e599a819be1cd7ad72c15358ad8c5f211160d7a0d0058819ce2d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d2b9553c0173346bef1c6fa9b719b8904f267c26d5028e9646ed96c025104e91842610ad396097d66e89fe90e914bad7c8a17506aad6bfeec2048243edf1483
|
7
|
+
data.tar.gz: 6de94b5a0a72559d42a84128f6695f528a49d0de39750309700c47e1b71f24c289da52daca57fc7e3dfed471901089c5ded83dd97f6def0b4c65df444cd0c00c
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
et_fake_ccd (0.1.
|
4
|
+
et_fake_ccd (0.1.19)
|
5
5
|
activemodel (~> 5.2, >= 5.2.3)
|
6
6
|
puma (~> 3.12)
|
7
7
|
roda (~> 3.21)
|
@@ -19,18 +19,18 @@ GEM
|
|
19
19
|
i18n (>= 0.7, < 2)
|
20
20
|
minitest (~> 5.1)
|
21
21
|
tzinfo (~> 1.1)
|
22
|
-
addressable (2.
|
23
|
-
public_suffix (>= 2.0.2, <
|
22
|
+
addressable (2.7.0)
|
23
|
+
public_suffix (>= 2.0.2, < 5.0)
|
24
24
|
concurrent-ruby (1.1.5)
|
25
25
|
diff-lcs (1.3)
|
26
26
|
i18n (1.6.0)
|
27
27
|
concurrent-ruby (~> 1.0)
|
28
28
|
minitest (5.11.3)
|
29
|
-
public_suffix (
|
29
|
+
public_suffix (4.0.1)
|
30
30
|
puma (3.12.1)
|
31
31
|
rack (2.0.7)
|
32
32
|
rake (10.5.0)
|
33
|
-
roda (3.
|
33
|
+
roda (3.23.0)
|
34
34
|
rack
|
35
35
|
rotp (5.1.0)
|
36
36
|
addressable (~> 2.5)
|
@@ -27,6 +27,15 @@ module EtFakeCcd
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
30
|
+
r.is "caseworkers", String, "jurisdictions", String, "case-types", String, "event-triggers", "uploadDocument", "token" do |uid, jid, ctid|
|
31
|
+
r.get do
|
32
|
+
if EtFakeCcd::AuthService.validate_service_token(r.headers['ServiceAuthorization'].gsub(/\ABearer /, '')) && EtFakeCcd::AuthService.validate_user_token(r.headers['Authorization'].gsub(/\ABearer /, ''))
|
33
|
+
initiate_upload_document(uid, jid, ctid)
|
34
|
+
else
|
35
|
+
r.halt 403, forbidden_error_for(r)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
30
39
|
r.is "caseworkers", String, "jurisdictions", String, "case-types", String, "cases" do |uid, jid, ctid|
|
31
40
|
r.post do
|
32
41
|
if !EtFakeCcd::AuthService.validate_service_token(r.headers['ServiceAuthorization'].gsub(/\ABearer /, '')) || !EtFakeCcd::AuthService.validate_user_token(r.headers['Authorization'].gsub(/\ABearer /, ''))
|
@@ -114,6 +123,31 @@ module EtFakeCcd
|
|
114
123
|
JSON.generate(j)
|
115
124
|
end
|
116
125
|
|
126
|
+
def initiate_upload_document(uid, jid, ctid)
|
127
|
+
j = {
|
128
|
+
"token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJvZDRwZ3NhbDQwcTdndHI0Y2F1bmVmZGU5aSIsInN1YiI6IjIyIiwiaWF0IjoxNTYxOTY2NzM1LCJldmVudC1pZCI6ImluaXRpYXRlQ2FzZSIsImNhc2UtdHlwZS1pZCI6IkVtcFRyaWJfTVZQXzEuMF9NYW5jIiwianVyaXNkaWN0aW9uLWlkIjoiRU1QTE9ZTUVOVCIsImNhc2UtdmVyc2lvbiI6ImJmMjFhOWU4ZmJjNWEzODQ2ZmIwNWI0ZmEwODU5ZTA5MTdiMjIwMmYifQ.u-OfexKFu52uvSgTNVHJ5kUQ9KTZGClRIRnGXRPSmGY",
|
129
|
+
"case_details": {
|
130
|
+
"id": nil,
|
131
|
+
"jurisdiction": jid,
|
132
|
+
"state": nil,
|
133
|
+
"case_type_id": ctid,
|
134
|
+
"created_date": nil,
|
135
|
+
"last_modified": nil,
|
136
|
+
"security_classification": nil,
|
137
|
+
"case_data": {},
|
138
|
+
"data_classification": {},
|
139
|
+
"after_submit_callback_response": nil,
|
140
|
+
"callback_response_status_code": nil,
|
141
|
+
"callback_response_status": nil,
|
142
|
+
"delete_draft_response_status_code": nil,
|
143
|
+
"delete_draft_response_status": nil,
|
144
|
+
"security_classifications": {}
|
145
|
+
},
|
146
|
+
"event_id": "uploadDocument"
|
147
|
+
}
|
148
|
+
JSON.generate(j)
|
149
|
+
end
|
150
|
+
|
117
151
|
def case_created_response(id, uid, jid, ctid)
|
118
152
|
j = case_hash(ctid, id, jid)
|
119
153
|
JSON.generate(j)
|
data/lib/et_fake_ccd/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: et_fake_ccd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gary Taylor
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: roda
|