et_fake_ccd 1.0.5 → 1.1.1

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: 6e08f42381f699dd1162eb4918819f72ba0271c4ca3aedb5010aa4ac35f4af38
4
- data.tar.gz: 91148e9f12ab4a6342191541285c162140be9ffbfa51549a1dfef19d50bfe51f
3
+ metadata.gz: c217e3105acba99e220c201ffbfb626150a7817b5033319f02aa6292e6901eb5
4
+ data.tar.gz: f3a7ad0b2836fcab119dd1efe03652ab400315609908e01d19f47ced18954908
5
5
  SHA512:
6
- metadata.gz: f746897d1a9ab5fd1c606bb037a3ba696770fbea3c97851c72cceb3572bebe0420695eef3fc55b8f2d20e15aa89666ed45fd0f856e7ab81c948806343e03efb3
7
- data.tar.gz: 985d3be8c217a4a6fb0ceb03e122230bcf9643b5b2eef6774d5ac932db75a77ee94ca028db84752e7cf45b3ca609d290ffdb4bee610e1f4e2eb9f43916a4fc3c
6
+ metadata.gz: f365970e29725d5c82a5d5af6bbf01c8e896b582453fe465a7ced6e2c365c0cd0909dcc3a8f7c2ea6fbaf3bb17b393ef7736228babd2306a25982d5c7a0c5005
7
+ data.tar.gz: d1737766cbb6d8e9dc1468cff66bd7a95853755fea7b3492cd1f2ee96bc42b79484e119811a101e28c6b0ca015456272fca3e05e6e446b4223b5fdb203367c4a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- et_fake_ccd (1.0.5)
4
+ et_fake_ccd (1.1.1)
5
5
  activemodel (>= 5.2.3)
6
6
  iodine (~> 0.7)
7
7
  json-schema (~> 2.5)
@@ -13,28 +13,28 @@ PATH
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- activemodel (6.0.2.2)
17
- activesupport (= 6.0.2.2)
18
- activesupport (6.0.2.2)
16
+ activemodel (6.1.0)
17
+ activesupport (= 6.1.0)
18
+ activesupport (6.1.0)
19
19
  concurrent-ruby (~> 1.0, >= 1.0.2)
20
- i18n (>= 0.7, < 2)
21
- minitest (~> 5.1)
22
- tzinfo (~> 1.1)
23
- zeitwerk (~> 2.2)
20
+ i18n (>= 1.6, < 2)
21
+ minitest (>= 5.1)
22
+ tzinfo (~> 2.0)
23
+ zeitwerk (~> 2.3)
24
24
  addressable (2.7.0)
25
25
  public_suffix (>= 2.0.2, < 5.0)
26
- concurrent-ruby (1.1.6)
26
+ concurrent-ruby (1.1.7)
27
27
  diff-lcs (1.3)
28
- i18n (1.8.2)
28
+ i18n (1.8.7)
29
29
  concurrent-ruby (~> 1.0)
30
- iodine (0.7.38)
30
+ iodine (0.7.43)
31
31
  json-schema (2.8.1)
32
32
  addressable (>= 2.4)
33
- minitest (5.14.0)
34
- public_suffix (4.0.4)
35
- rack (2.2.2)
33
+ minitest (5.14.2)
34
+ public_suffix (4.0.6)
35
+ rack (2.2.3)
36
36
  rake (13.0.1)
37
- roda (3.30.0)
37
+ roda (3.39.0)
38
38
  rack
39
39
  rotp (5.1.0)
40
40
  addressable (~> 2.5)
@@ -52,11 +52,10 @@ GEM
52
52
  rspec-support (~> 3.9.0)
53
53
  rspec-support (3.9.2)
54
54
  thor (1.0.1)
55
- thread_safe (0.3.6)
56
55
  tilt (2.0.10)
57
- tzinfo (1.2.7)
58
- thread_safe (~> 0.1)
59
- zeitwerk (2.3.0)
56
+ tzinfo (2.0.4)
57
+ concurrent-ruby (~> 1.0)
58
+ zeitwerk (2.4.2)
60
59
 
61
60
  PLATFORMS
62
61
  ruby
@@ -1,7 +1,7 @@
1
1
  require 'active_model'
2
2
  module EtFakeCcd
3
3
  module Command
4
- class CreateBulkActionCaseCommand
4
+ class CreateMultipleCaseCommand
5
5
  include ActiveModel::Model
6
6
  include ActiveModel::Attributes
7
7
 
@@ -1,7 +1,7 @@
1
1
  require 'et_fake_ccd/command/lease_command'
2
2
  require 'et_fake_ccd/command/login_user_command'
3
3
  require 'et_fake_ccd/command/create_case_command'
4
- require 'et_fake_ccd/command/create_bulk_action_case_command'
4
+ require 'et_fake_ccd/command/create_multiple_case_command'
5
5
  require 'et_fake_ccd/command/upload_document_command'
6
6
  require 'et_fake_ccd/command/upload_documents_to_case_command'
7
7
  require 'et_fake_ccd/command/start_multiple_command'
@@ -1,4 +1,5 @@
1
1
  require 'singleton'
2
+ require 'fileutils'
2
3
  module EtFakeCcd
3
4
  class Config
4
5
  include Singleton
@@ -31,6 +31,7 @@ module EtFakeCcd
31
31
  end
32
32
 
33
33
  def office_code_for(case_type_id)
34
+ case_type_id = case_type_id.gsub(/_Dev\z/, '')
34
35
  office_code = OFFICE_CODE_LOOKUP[case_type_id]
35
36
  raise "Case type id #{case_type_id} has no office lookup defined in the fake ccd server" if office_code.nil?
36
37
 
@@ -19,7 +19,7 @@ module EtFakeCcd
19
19
  end
20
20
  end
21
21
  end
22
- r.is "caseworkers", String, "jurisdictions", String, "case-types", String, "event-triggers", "createBulkAction", "token" do |uid, jid, ctid|
22
+ r.is "caseworkers", String, "jurisdictions", String, "case-types", String, "event-triggers", "createMultiple", "token" do |uid, jid, ctid|
23
23
  r.get do
24
24
  if EtFakeCcd::AuthService.validate_service_token(r.headers['ServiceAuthorization'].gsub(/\ABearer /, '')) && EtFakeCcd::AuthService.validate_user_token(r.headers['Authorization'].gsub(/\ABearer /, ''))
25
25
  initiate_bulk_case(uid, jid, ctid)
@@ -69,7 +69,7 @@ module EtFakeCcd
69
69
 
70
70
  command = case json.dig('event', 'id')
71
71
  when 'initiateCase' then ::EtFakeCcd::Command::CreateCaseCommand.from_json json
72
- when 'createBulkAction' then ::EtFakeCcd::Command::CreateBulkActionCaseCommand.from_json json
72
+ when 'createMultiple' then ::EtFakeCcd::Command::CreateMultipleCaseCommand.from_json json
73
73
  else
74
74
  r.halt 400, unknown_event_error_for(r)
75
75
  end
@@ -202,7 +202,7 @@ module EtFakeCcd
202
202
  "delete_draft_response_status": nil,
203
203
  "security_classifications": {}
204
204
  },
205
- "event_id": "createBulkAction"
205
+ "event_id": "createMultiple"
206
206
  }
207
207
  JSON.generate(j)
208
208
  end
@@ -9,7 +9,7 @@ module EtFakeCcd
9
9
  plugin :request_headers
10
10
  plugin :halt
11
11
  route do |r|
12
- r.is "startMultiple" do
12
+ r.is "generateCaseRefNumbers" do
13
13
  r.post do
14
14
  unless EtFakeCcd::AuthService.validate_service_token(r.headers['ServiceAuthorization'].gsub(/\ABearer /, '')) && EtFakeCcd::AuthService.validate_user_token(r.headers['Authorization'].gsub(/\ABearer /, ''))
15
15
  r.halt 403, forbidden_error_for(r)
@@ -35,9 +35,11 @@ module EtFakeCcd
35
35
 
36
36
  def start_multiple_response(response)
37
37
  j = {
38
- "caseRefNumberCount": response.case_reference_count,
39
- "startCaseRefNumber": response.start_reference,
40
- "multipleRefNumber": response.multiple_reference
38
+ "data": {
39
+ "caseRefNumberCount": response.case_reference_count,
40
+ "startCaseRefNumber": response.start_reference,
41
+ "multipleRefNumber": response.multiple_reference
42
+ }
41
43
  }
42
44
  JSON.generate(j)
43
45
  end
@@ -1,3 +1,3 @@
1
1
  module EtFakeCcd
2
- VERSION = "1.0.5"
2
+ VERSION = "1.1.1"
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.0.5
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary Taylor
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-13 00:00:00.000000000 Z
11
+ date: 2021-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roda
@@ -180,8 +180,8 @@ files:
180
180
  - lib/et_fake_ccd/auth_service.rb
181
181
  - lib/et_fake_ccd/cli.rb
182
182
  - lib/et_fake_ccd/cli/root.rb
183
- - lib/et_fake_ccd/command/create_bulk_action_case_command.rb
184
183
  - lib/et_fake_ccd/command/create_case_command.rb
184
+ - lib/et_fake_ccd/command/create_multiple_case_command.rb
185
185
  - lib/et_fake_ccd/command/lease_command.rb
186
186
  - lib/et_fake_ccd/command/login_user_command.rb
187
187
  - lib/et_fake_ccd/command/start_multiple_command.rb
@@ -226,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
226
  version: '0'
227
227
  requirements: []
228
228
  rubyforge_project:
229
- rubygems_version: 2.7.7
229
+ rubygems_version: 2.7.6
230
230
  signing_key:
231
231
  specification_version: 4
232
232
  summary: Fake CCD server for employment tribunals