et_fake_ccd 0.1.25 → 0.1.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/et_fake_ccd/command/create_case_command.rb +8 -1
- 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: c6f2fd89e2499a1468f03a04dcaed58328476419cf8289a21a7d7db33d45460c
|
4
|
+
data.tar.gz: 6da56fd3b19c379f043e5a9e513dac764b30d86d222327a2fe519513dce70165
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40a43f31402d58598ce9913a52cf5ae78706645e7f8d018f553a23a5519f1124e7654373c4860c38ed63df9c40d40787d251da553e710f5c3af7f60eab0c8c12
|
7
|
+
data.tar.gz: ceda02b9369c5e69a47cc70c7f0460156e3128263ddaf093a31fffc545d200256fc4b476d4d38053b06d790d27105c782fe7d1cdca1468ce735124c7c0b2d151
|
data/Gemfile.lock
CHANGED
@@ -23,8 +23,15 @@ module EtFakeCcd
|
|
23
23
|
data['data']['ethosCaseReference'] = next_case_reference if data.dig('data', 'ethosCaseReference').nil? || data.dig('data', 'ethosCaseReference') == ''
|
24
24
|
end
|
25
25
|
|
26
|
+
def sequence_for_office(office_code)
|
27
|
+
@sequences ||= {}
|
28
|
+
@sequences[office_code] ||= 0
|
29
|
+
@sequences[office_code] += 1
|
30
|
+
end
|
31
|
+
|
26
32
|
def next_case_reference
|
27
|
-
|
33
|
+
office = data.dig('data', 'feeGroupReference')[0,2].to_i
|
34
|
+
"#{office}#{sequence_for_office(office).to_s.rjust(5, '0')}/#{Time.now.year}"
|
28
35
|
end
|
29
36
|
|
30
37
|
def validate_data
|
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.26
|
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-09-
|
11
|
+
date: 2019-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: roda
|