et_fake_ccd 1.1.6 → 1.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +35 -26
- data/et_fake_ccd.gemspec +3 -1
- data/lib/et_fake_ccd/root_app.rb +1 -0
- data/lib/et_fake_ccd/service/data_store_app.rb +17 -0
- data/lib/et_fake_ccd/version.rb +1 -1
- metadata +21 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6b76b52626389f3c3c2464fc36fcb8b904050170d9f05b0c542d134529c0320
|
4
|
+
data.tar.gz: e25bb026fe7f1a46ee375d347b3e5a343b811a814a28c3ec80e8d7a28be93e53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85dcd2c3d8a28f8eb4f68e4b4377d6d058c2bb214aa02ebf65e2d4a3ddad72aeeb7c8756750cf8b9bad2cd98291fd122655341000b96ac5009db5c2dd5941a79
|
7
|
+
data.tar.gz: 4c948532068fb056693bcecb237d38a7915d149bb5c312791016c13880b1f70be711f56ca66e3e236b538122f1e3d380f75c757c58d6512548e5ae83ffc9217a
|
data/Gemfile.lock
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
et_fake_ccd (1.1.
|
5
|
-
activemodel (
|
4
|
+
et_fake_ccd (1.1.11)
|
5
|
+
activemodel (~> 6.1)
|
6
6
|
iodine (~> 0.7)
|
7
7
|
json-schema (~> 2.5)
|
8
8
|
roda (~> 3.21)
|
9
|
+
roda-enhanced_logger (~> 0.4.0)
|
9
10
|
rotp (~> 6.2)
|
10
11
|
thor (~> 1.0)
|
11
12
|
tilt (~> 2.0, >= 2.0.9)
|
@@ -13,48 +14,56 @@ PATH
|
|
13
14
|
GEM
|
14
15
|
remote: https://rubygems.org/
|
15
16
|
specs:
|
16
|
-
activemodel (6.1.
|
17
|
-
activesupport (= 6.1.
|
18
|
-
activesupport (6.1.
|
17
|
+
activemodel (6.1.4.4)
|
18
|
+
activesupport (= 6.1.4.4)
|
19
|
+
activesupport (6.1.4.4)
|
19
20
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
20
21
|
i18n (>= 1.6, < 2)
|
21
22
|
minitest (>= 5.1)
|
22
23
|
tzinfo (~> 2.0)
|
23
24
|
zeitwerk (~> 2.3)
|
24
|
-
addressable (2.
|
25
|
+
addressable (2.8.0)
|
25
26
|
public_suffix (>= 2.0.2, < 5.0)
|
26
|
-
concurrent-ruby (1.1.
|
27
|
-
diff-lcs (1.
|
28
|
-
i18n (1.8.
|
27
|
+
concurrent-ruby (1.1.9)
|
28
|
+
diff-lcs (1.4.4)
|
29
|
+
i18n (1.8.11)
|
29
30
|
concurrent-ruby (~> 1.0)
|
30
|
-
iodine (0.7.
|
31
|
+
iodine (0.7.45)
|
31
32
|
json-schema (2.8.1)
|
32
33
|
addressable (>= 2.4)
|
33
|
-
minitest (5.
|
34
|
+
minitest (5.15.0)
|
35
|
+
pastel (0.8.0)
|
36
|
+
tty-color (~> 0.5)
|
34
37
|
public_suffix (4.0.6)
|
35
38
|
rack (2.2.3)
|
36
|
-
rake (13.0.
|
37
|
-
roda (3.
|
39
|
+
rake (13.0.6)
|
40
|
+
roda (3.51.0)
|
38
41
|
rack
|
42
|
+
roda-enhanced_logger (0.4.0)
|
43
|
+
roda (>= 3.19.0)
|
44
|
+
tty-logger (>= 0.3, < 1.0)
|
39
45
|
rotp (6.2.0)
|
40
|
-
rspec (3.
|
41
|
-
rspec-core (~> 3.
|
42
|
-
rspec-expectations (~> 3.
|
43
|
-
rspec-mocks (~> 3.
|
44
|
-
rspec-core (3.
|
45
|
-
rspec-support (~> 3.
|
46
|
-
rspec-expectations (3.
|
46
|
+
rspec (3.10.0)
|
47
|
+
rspec-core (~> 3.10.0)
|
48
|
+
rspec-expectations (~> 3.10.0)
|
49
|
+
rspec-mocks (~> 3.10.0)
|
50
|
+
rspec-core (3.10.1)
|
51
|
+
rspec-support (~> 3.10.0)
|
52
|
+
rspec-expectations (3.10.1)
|
47
53
|
diff-lcs (>= 1.2.0, < 2.0)
|
48
|
-
rspec-support (~> 3.
|
49
|
-
rspec-mocks (3.
|
54
|
+
rspec-support (~> 3.10.0)
|
55
|
+
rspec-mocks (3.10.2)
|
50
56
|
diff-lcs (>= 1.2.0, < 2.0)
|
51
|
-
rspec-support (~> 3.
|
52
|
-
rspec-support (3.
|
53
|
-
thor (1.1
|
57
|
+
rspec-support (~> 3.10.0)
|
58
|
+
rspec-support (3.10.3)
|
59
|
+
thor (1.2.1)
|
54
60
|
tilt (2.0.10)
|
61
|
+
tty-color (0.6.0)
|
62
|
+
tty-logger (0.6.0)
|
63
|
+
pastel (~> 0.8)
|
55
64
|
tzinfo (2.0.4)
|
56
65
|
concurrent-ruby (~> 1.0)
|
57
|
-
zeitwerk (2.
|
66
|
+
zeitwerk (2.5.3)
|
58
67
|
|
59
68
|
PLATFORMS
|
60
69
|
ruby
|
data/et_fake_ccd.gemspec
CHANGED
@@ -24,8 +24,10 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
|
26
26
|
spec.add_dependency 'roda', '~> 3.21'
|
27
|
+
spec.add_dependency 'roda-enhanced_logger', '~> 0.4.0'
|
28
|
+
|
27
29
|
spec.add_dependency 'thor', '~> 1.0'
|
28
|
-
spec.add_dependency 'activemodel', '
|
30
|
+
spec.add_dependency 'activemodel', '~> 6.1'
|
29
31
|
spec.add_dependency 'rotp', '~> 6.2'
|
30
32
|
spec.add_dependency 'tilt', '~> 2.0', '>= 2.0.9'
|
31
33
|
spec.add_dependency 'iodine', '~> 0.7'
|
data/lib/et_fake_ccd/root_app.rb
CHANGED
@@ -67,6 +67,18 @@ 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
|
+
r.get do
|
72
|
+
with_forced_error_handling(r, stage: :data) do
|
73
|
+
if !EtFakeCcd::AuthService.validate_service_token(r.headers['ServiceAuthorization'].gsub(/\ABearer /, '')) || !EtFakeCcd::AuthService.validate_user_token(r.headers['Authorization'].gsub(/\ABearer /, ''))
|
74
|
+
r.halt 403, forbidden_error_for(r)
|
75
|
+
break
|
76
|
+
end
|
77
|
+
case_response(case_id, uid, jid, ctid)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
70
82
|
r.is "caseworkers", String, "jurisdictions", String, "case-types", String, "cases" do |uid, jid, ctid|
|
71
83
|
r.post do
|
72
84
|
with_forced_error_handling(r, stage: :data) do
|
@@ -255,6 +267,11 @@ module EtFakeCcd
|
|
255
267
|
JSON.generate(j)
|
256
268
|
end
|
257
269
|
|
270
|
+
def case_response(id, uid, jid, ctid)
|
271
|
+
j = case_hash(ctid, id, jid)
|
272
|
+
JSON.generate(j)
|
273
|
+
end
|
274
|
+
|
258
275
|
def case_hash(ctid, id, jid)
|
259
276
|
{
|
260
277
|
"id": id,
|
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: 1.1.
|
4
|
+
version: 1.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gary Taylor
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: roda
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.21'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: roda-enhanced_logger
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.4.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.4.0
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: thor
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -42,16 +56,16 @@ dependencies:
|
|
42
56
|
name: activemodel
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- - "
|
59
|
+
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
61
|
+
version: '6.1'
|
48
62
|
type: :runtime
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- - "
|
66
|
+
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
68
|
+
version: '6.1'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rotp
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -226,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
226
240
|
- !ruby/object:Gem::Version
|
227
241
|
version: '0'
|
228
242
|
requirements: []
|
229
|
-
rubygems_version: 3.1.
|
243
|
+
rubygems_version: 3.1.6
|
230
244
|
signing_key:
|
231
245
|
specification_version: 4
|
232
246
|
summary: Fake CCD server for employment tribunals
|