egov_utils 1.5.0.alpha15 → 1.5.0.alpha16
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42577786177c1af8817f136fe3f860c925d2cd91540f49e17dc11b2fe3635397
|
4
|
+
data.tar.gz: fbb299d6905f40c3102c22cb28403ff3c5c0ffd032fb1de7934d30de40c3bf92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 966c54f84cf6b291350dc61a80369541fef8dc322346d2c4fffef384a07cfd37ae74a30165ab626e8d538168927f50ec79cbfb29656c7f964dd7f21c575f037a
|
7
|
+
data.tar.gz: d315fe2d9a406873884bf5a3d88970b843653bf9fa5ce6254851f79fe83947e2b73b95a3bb76700d928d95606079823b92242d26ae7faea646294128e8ccd892
|
@@ -40,9 +40,18 @@ module EgovUtils
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
+
def invalid_record_code
|
44
|
+
return @invalid_record_code if defined?(@invalid_record_code)
|
45
|
+
|
46
|
+
@invalid_record_code =
|
47
|
+
if response_body.xpath('//NarozeniSvet').text.present?
|
48
|
+
'not_found'
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
43
52
|
def handle_response!
|
44
|
-
if internal_error_code
|
45
|
-
errors.add(:base, internal_error_code)
|
53
|
+
if internal_error_code || invalid_record_code
|
54
|
+
errors.add(:base, internal_error_code || invalid_record_code)
|
46
55
|
return
|
47
56
|
end
|
48
57
|
|
@@ -50,7 +59,7 @@ module EgovUtils
|
|
50
59
|
firstname: response_body.xpath('//Jmeno').text.capitalize,
|
51
60
|
lastname: response_body.xpath('//Prijmeni').text.capitalize,
|
52
61
|
birth_date: response_body.xpath('//DatumNarozeni').text,
|
53
|
-
birth_place: response_body.xpath('//Lokalita/Nazev').text,
|
62
|
+
birth_place: response_body.xpath('//Lokalita/Nazev').text.presence,
|
54
63
|
remote_id: response_body.xpath('//GlobalniAifo').text
|
55
64
|
)
|
56
65
|
end
|
data/lib/egov_utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: egov_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.0.
|
4
|
+
version: 1.5.0.alpha16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondřej Ezr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -941,7 +941,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
941
941
|
- !ruby/object:Gem::Version
|
942
942
|
version: '0'
|
943
943
|
requirements: []
|
944
|
-
rubygems_version: 3.5.
|
944
|
+
rubygems_version: 3.5.22
|
945
945
|
signing_key:
|
946
946
|
specification_version: 4
|
947
947
|
summary: The eGoverment utilities is set of functionalities to support basic eGoverment
|