ea-area_lookup 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be99b0c83704e166b6c0d61131c11695e35c1771
4
- data.tar.gz: 18d26c91a81a300752ea23403784222ce167aa48
3
+ metadata.gz: c99ab0de6a724c2523342a8a449fbb9339775d9d
4
+ data.tar.gz: 7116fcacb2bfdb3aefe0014a9529194c1378a749
5
5
  SHA512:
6
- metadata.gz: 0ef9beda87b4414e3439a36afb5cc052dabb0b067435ddbbc5731cbc5f7a9283677e06da30c9d06150de0511a0bd0fc3a2f8483626f24626f124fa4a13c6d8b6
7
- data.tar.gz: 039e95846368aba23844d98038022de068f88ba481f19976dee60d57ebd330054c3f9cc1dca8e4fe8fc830978a4623252c0d3adf88248dec8c9de002bcfdfc8c
6
+ metadata.gz: d2756f41e09bd6759e81287d85b915a82a4d79f81aced6c06d7c0d9ff4db316614ddd0e710b6c6c98df515e583ad6a222390a15b64b5c23235485046cb370f96
7
+ data.tar.gz: d085bc9adadd4f24ebd109c9a42fcc48d9bc553e7f63c7622c3f6e0fd92dbed21a24f9b3f953cb61279c9d440b5c0dc0687571d13dbfd4b6fd4a69cdfe03db9c
@@ -6,23 +6,22 @@ module EA
6
6
  module Finders
7
7
 
8
8
  def find_admin_area_by_coordinates(coords)
9
- validate_config!
10
- return nil unless coords && coords.valid?
11
- typename = "ea-wfs-area_public_face_inspire"
12
- xml = fetch_area_from_api(coords, typename)
13
- parse_xml(xml, typename)
9
+ find_area_by_coordinates(coords, "ea-wfs-area_public_face_inspire")
14
10
  end
15
11
 
16
12
  def find_water_management_area_by_coordinates(coords)
13
+ find_area_by_coordinates(coords, "ea-wfs-area_water_management_inspire")
14
+ end
15
+
16
+ private
17
+
18
+ def find_area_by_coordinates(coords, typename)
17
19
  validate_config!
18
- return nil unless coords && coords.valid?
19
- typename = "ea-wfs-area_water_management_inspire"
20
+ return unless coords && coords.valid?
20
21
  xml = fetch_area_from_api(coords, typename)
21
22
  parse_xml(xml, typename)
22
23
  end
23
24
 
24
- private
25
-
26
25
  DEFAULT_API_PARAMS = {
27
26
  SERVICE: "WFS",
28
27
  INTERFACE: "ENVIRONMENTWFS",
@@ -1,5 +1,5 @@
1
1
  module EA
2
2
  module AreaLookup
3
- VERSION = "0.2.0".freeze
3
+ VERSION = "0.2.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ea-area_lookup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Digital Services Team, EnvironmentAgency