egov_utils 1.5.0.alpha13 → 1.5.0.alpha15

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: e6cb927e59075f7edb5c8d95dc9d8f8a4013f718027c6e96a9c1ce09cd2b5cf9
4
- data.tar.gz: 5f43a78e3d93d0315a5f9fbf4377312e4443c0f17a6be10728d5078e6fff14f9
3
+ metadata.gz: 15decb855085e1518023c890a8a343280b58192d4905cb9e1d34111d2ee77210
4
+ data.tar.gz: c5e5a7c0776a6c9d8e6d8e1a77b4feb0b08c0abb8fec132863555854a2364bd3
5
5
  SHA512:
6
- metadata.gz: 25c8bb2281b20f5795ee228d09b259cce0a12ec5de2fb464917a455f2417a2516ae5778ec95ec391d2931f6268f9182f2893e42bc0b50492959de3fcfb9face3
7
- data.tar.gz: 977382a8cb09988bb23dde63860fd088eedb063ee6561abc40e420851a427a4c9d8ed4577d45e07e466b63f189e6ed70e2fb53fbc9f06aa29953023437fd4d25
6
+ metadata.gz: 63cc51cbdafcfc670664645fe4cc8c561da44d0ee78506d3940dc9b1c7d5c24c81d9e72d91f97db6765947279f0c63dca1e945d9b2e23dfb725ef19006638f0d
7
+ data.tar.gz: 42102169cc95fb945187fac0990107399d078fffd5ebfcd60be1417dc03c3f02d0a560e33a5b0981521c1067c2977633e27d8bfe979a1aedbf4f50b18dfa3738
@@ -8,7 +8,7 @@ module EgovUtils
8
8
  string :person_type
9
9
 
10
10
  def execute
11
- strategy_class.run!(remote_id: remote_id)
11
+ strategy_class.run!(remote_id:)
12
12
  end
13
13
 
14
14
  private
@@ -20,6 +20,22 @@ module EgovUtils
20
20
  )
21
21
  end
22
22
 
23
+ def district
24
+ @district ||= begin
25
+ district =
26
+ EgovUtils::Address.towns.find do
27
+ _1.id == response_body.xpath('//ObecKod').text
28
+ end.district_name
29
+
30
+ EgovUtils::Address.districts.find { _1.name == district }
31
+ end
32
+ end
33
+
34
+ def region
35
+ @region ||=
36
+ EgovUtils::Address.regions.find { _1.id == district.region_id }
37
+ end
38
+
23
39
  def body
24
40
  Nokogiri::XML::Builder.new do |xml|
25
41
  xml['e256'].RosCtiIco2(
@@ -7,7 +7,7 @@ module EgovUtils
7
7
 
8
8
  def handle_response!
9
9
  {
10
- name: response_body.xpath('//OsobaNazev').text.capitalize,
10
+ name: response_body.xpath('//NazevOsoby').text.capitalize,
11
11
  ico: remote_id
12
12
  }
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module EgovUtils
2
- VERSION = '1.5.0.alpha13'
2
+ VERSION = '1.5.0.alpha15'
3
3
  end
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.alpha13
4
+ version: 1.5.0.alpha15
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-10-03 00:00:00.000000000 Z
11
+ date: 2024-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails