brreg_grunndata 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: 4ea46e3cbb4cb488e8fa34b33cc7318d09fc7838
4
- data.tar.gz: d565a394fbd09068cdc994e9fc80d6142de51d43
3
+ metadata.gz: ba9648fb746b8215e09be64007face17f81a9feb
4
+ data.tar.gz: 2c98f2ea4e49b81a1c9c09ee1ae4181dd759b105
5
5
  SHA512:
6
- metadata.gz: 5e994fb218c774d416234a80f81909d8920f37992a5f8f3075f4c61c2cf71625ac33bb3498b67b206faeab1a64b7fa117ac67ef291cde00cb6ce83022a5c8a45
7
- data.tar.gz: aff02a4e7c68f6a9eec54ab89fea33d42c039a7bc3a317c93d0966802cba34d8e80cc83e6d35fbca748eb6057cf1c342da76a5f96fd2080a15cbf3ec76a70c37
6
+ metadata.gz: d4ba43368f70634eff7e17be7f41ddb36a983322c6f1dd78a2c009328d1927534800f79ce49e2b5953d5e1584a151e34cd4625fbf08be56b4ed6a9a8c30e0212
7
+ data.tar.gz: 3c550fdaef0d49f3d034e5f6cf369b362ec03e2e3f5f8ff070f7820ba4d1112b0856c7edeb794a47c7ca12d9ae44d34143a0aeba97f028236b035fb46be5fcf9
data/CHANGELOG.md CHANGED
@@ -1,7 +1,14 @@
1
- ## v.0.1.1 (to be released)
1
+ ## v.0.1.3 (to be released)
2
2
 
3
- * Added `hent_saerlige_opplysninger` to the service layer.
4
- * Added client spec for `hent_saerlige_opplysninger`.
3
+
4
+ ## v.0.1.2
5
+
6
+ * FIXED: Returned address from service now includes all parts of the street.
7
+
8
+ ## v.0.1.1
9
+
10
+ * ADDED: `hent_saerlige_opplysninger` to the service layer.
11
+ * ADDED: client spec for `hent_saerlige_opplysninger`.
5
12
 
6
13
  ## v.0.1.0
7
14
 
@@ -5,13 +5,24 @@ require_relative 'base'
5
5
  module BrregGrunndata
6
6
  module Types
7
7
  class Address < Base
8
- attribute :street, Types::String
8
+ attribute :street_parts, Types::Array.member(Types::String).default([])
9
9
  attribute :postal_code, Types::String
10
10
  attribute :postal_area, Types::String
11
11
  attribute :municipality_number, Types::String
12
12
  attribute :municipality, Types::String
13
13
  attribute :country_code, Types::String
14
14
  attribute :country, Types::String
15
+
16
+ # Returns this address' street
17
+ #
18
+ # Brreg returns street as three parts. You find them in #street_parts.
19
+ # If you just one a string representing the street this is your method.
20
+ # It joins the parts by given separator defaulting to ', '
21
+ #
22
+ # @return String
23
+ def street(separator = ', ')
24
+ street_parts.join separator
25
+ end
15
26
  end
16
27
  end
17
28
  end
@@ -80,7 +80,7 @@ module BrregGrunndata
80
80
  return nil if h.nil?
81
81
 
82
82
  Address.new(
83
- street: h[:adresse1],
83
+ street_parts: [h[:adresse1], h[:adresse2], h[:adresse3]].compact,
84
84
  postal_code: h[:postnr],
85
85
  postal_area: h[:poststed],
86
86
  municipality_number: h[:kommunenummer],
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BrregGrunndata
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brreg_grunndata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thorbjørn Hermansen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-07 00:00:00.000000000 Z
11
+ date: 2016-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon