et_fake_ccd 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/et_fake_ccd/command/create_case_command.rb +15 -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: 5f169aa37e2b5cdca502d9f4c6b615a79c93b7e1ea903d6f7d0f93f86b7b2546
|
4
|
+
data.tar.gz: a2ff3b5f15af23d50a146616b2fcb8e2ba9a5c8cd476efa8f1fd551a30e8697d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8be5bceb14d92a5854caf5228f09a75568b6beecdd03609d20aef6db5515057ad62c5fe6b6a61f63842057ec358b4f3630b6c760854bcf2cf911c4cac6934b7
|
7
|
+
data.tar.gz: 52f29e02674038eddbc4a66f22dd42b359d7aeb2ea5940aa48ae0cde2a293a87078c674da6b11820e62473193ed1e97490218aa70b66855efbdeee93634b47c5
|
data/Gemfile.lock
CHANGED
@@ -34,6 +34,21 @@ module EtFakeCcd
|
|
34
34
|
data.dig('data', 'claimantType', 'claimant_mobile_number').tap do |phone|
|
35
35
|
errors.add :data, "Case data validation failed", field_error: { id: "claimantType.claimant_mobile_number", message: "The data entered is not valid for this type of field, please delete and re-enter using only valid data" } if phone.present? && phone.length > 14
|
36
36
|
end
|
37
|
+
data.dig('data', 'claimantIndType', 'claimant_gender').tap do |gender|
|
38
|
+
next if gender.nil?
|
39
|
+
valid_values = ['Male', 'Female', 'Not Known', 'Non-binary']
|
40
|
+
errors.add :data, "Case data validation failed", field_error: { id: 'claimantIndType.claimant_gender', message: "#{gender} is not a valid value" } unless valid_values.include?(gender)
|
41
|
+
end
|
42
|
+
data.dig('data', 'claimantIndType', 'claimant_title1').tap do |title|
|
43
|
+
next if title.nil?
|
44
|
+
valid_values = ['Mr', 'Mrs', 'Miss', 'Ms', 'Dr', 'Prof', 'Sir', 'Lord', 'Lady', 'Dame', 'Capt', 'Rev', 'Other']
|
45
|
+
errors.add :data, "Case data validation failed", field_error: { id: 'claimantIndType.claimant_title1', message: "#{title} is not a valid value" } unless valid_values.include?(title)
|
46
|
+
end
|
47
|
+
data.dig('data', 'claimantType', 'claimant_contact_preference').tap do |pref|
|
48
|
+
next if pref.nil?
|
49
|
+
valid_values = ['Email', 'Post']
|
50
|
+
errors.add :data, "Case data validation failed", field_error: { id: 'claimantType.claimant_contact_preference', message: "#{pref} is not a valid value" } unless valid_values.include?(pref)
|
51
|
+
end
|
37
52
|
end
|
38
53
|
end
|
39
54
|
end
|
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.12
|
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-07-
|
11
|
+
date: 2019-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: roda
|