et_fake_ccd 1.1.6 → 1.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43e9e9254fb5ee9245e25079ab42e8b8dca4c35974c7dbe14582207dcc51b98d
4
- data.tar.gz: 150d1449babea45b916cdce5e1faecaeebba183cf4c6f5f3e9c18e79a7f34b18
3
+ metadata.gz: cd57fcc3c5d480bd2f9d03f845f3725e9c66ecfb474cd45f35a3f71f17c127a4
4
+ data.tar.gz: 12d45f1ce7902d3e00aa9a72fa679399616cd6ccaf49d14ade8f304ee9a7668e
5
5
  SHA512:
6
- metadata.gz: 6b474400fcfe6785c34cf458b6e762b6f7cd25e00287a1c616c2bd8fe39db24a9ed3b5016cdecb9666fc7e45404aa03146d5a1f502c352f65d3e2ae8796a0693
7
- data.tar.gz: 066c6fd9b89e7f5c247bef0e3d936b7aad5d9d6e69f259c6967760f19900e8e6b9c72c6ce4f185166f68dc8ecc5be7c5222bcbb6ee2360e9443255fbd1351fa6
6
+ metadata.gz: e85fc5b46ad461ad35ff32931558e05cd9ff952646f82183fd115ba6649e665e84b70e6508fad1651f76a3d35b8dd7bec0c27db03936a7d3f15e3b9effc0cea9
7
+ data.tar.gz: ac163e07dbf8738d7fe1b1fe634a242f7313547a447e07a25b90c272fdae5ae64d5dc390cebc98c642933774225eab474ccd1205387a54eb6228973452aec60c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- et_fake_ccd (1.1.6)
4
+ et_fake_ccd (1.1.8)
5
5
  activemodel (>= 5.2.3)
6
6
  iodine (~> 0.7)
7
7
  json-schema (~> 2.5)
@@ -13,9 +13,9 @@ PATH
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- activemodel (6.1.3.1)
17
- activesupport (= 6.1.3.1)
18
- activesupport (6.1.3.1)
16
+ activemodel (6.1.3.2)
17
+ activesupport (= 6.1.3.2)
18
+ activesupport (6.1.3.2)
19
19
  concurrent-ruby (~> 1.0, >= 1.0.2)
20
20
  i18n (>= 1.6, < 2)
21
21
  minitest (>= 5.1)
@@ -34,7 +34,7 @@ GEM
34
34
  public_suffix (4.0.6)
35
35
  rack (2.2.3)
36
36
  rake (13.0.1)
37
- roda (3.43.1)
37
+ roda (3.44.0)
38
38
  rack
39
39
  rotp (6.2.0)
40
40
  rspec (3.9.0)
@@ -67,6 +67,16 @@ module EtFakeCcd
67
67
  end
68
68
  end
69
69
  end
70
+ r.is "caseworkers", String, "jurisdictions", String, "case-types", String, "cases", String do |uid, jid, ctid, case_id|
71
+ with_forced_error_handling(r, stage: :data) do
72
+ if !EtFakeCcd::AuthService.validate_service_token(r.headers['ServiceAuthorization'].gsub(/\ABearer /, '')) || !EtFakeCcd::AuthService.validate_user_token(r.headers['Authorization'].gsub(/\ABearer /, ''))
73
+ r.halt 403, forbidden_error_for(r)
74
+ break
75
+ end
76
+ case_response(case_id, uid, jid, ctid)
77
+ end
78
+
79
+ end
70
80
  r.is "caseworkers", String, "jurisdictions", String, "case-types", String, "cases" do |uid, jid, ctid|
71
81
  r.post do
72
82
  with_forced_error_handling(r, stage: :data) do
@@ -255,6 +265,11 @@ module EtFakeCcd
255
265
  JSON.generate(j)
256
266
  end
257
267
 
268
+ def case_response(id, uid, jid, ctid)
269
+ j = case_hash(ctid, id, jid)
270
+ JSON.generate(j)
271
+ end
272
+
258
273
  def case_hash(ctid, id, jid)
259
274
  {
260
275
  "id": id,
@@ -1,3 +1,3 @@
1
1
  module EtFakeCcd
2
- VERSION = "1.1.6"
2
+ VERSION = "1.1.8"
3
3
  end
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: 1.1.6
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary Taylor
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-30 00:00:00.000000000 Z
11
+ date: 2021-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roda