bbr 1.0.2 → 1.0.3

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: 5206e2906defefb4036a52d112acfc7af7fde7bf
4
- data.tar.gz: 52427a4d6e6dd5ffa52fc47cac29db4e2a3c5901
3
+ metadata.gz: 0b952dd23a4593e8211abea713f57043c68ee9e1
4
+ data.tar.gz: 90730c15a0c7f350f19aa8e49dc30f7e90f7a652
5
5
  SHA512:
6
- metadata.gz: 8e9b06cff2c82f4dc63ce097019e1f79a495c74b4f636a3aab0383302e9be418c202ecc2d626689db381211bcbac2e959522683caa27f90d5c9be2bea155f17c
7
- data.tar.gz: 19b4eabca26002133e609dab5810975185cfb81507cb500ea1a51cdfd178683266883056fbfd234499396e67052928cb224ac05df9a370199fc4ecf001890dc9
6
+ metadata.gz: dc738b79f72bffdd1b46fe61123be3083cc4416bb54bdedb21d514d2189f1a14e6dbc6f1011427ea5e3111ebdb672ceaed7f8f1c15bff00ee64e39fd614bcca6
7
+ data.tar.gz: 2c02b86122de465ccfa58057945723458f9446297eb07f29aa310b4fd8cb06c3a6aef6e3da759d2380f3040aa4ddc20ae8f6e4c83702ac136f6959ce9cdc5176
data/CHANGELOG.md CHANGED
@@ -9,3 +9,8 @@
9
9
  ## v.1.0.2
10
10
 
11
11
  * change response format
12
+
13
+ ## v.1.0.3
14
+
15
+ * add attr accessors to BBR module
16
+ * change response structure
data/README.md CHANGED
@@ -24,9 +24,10 @@ Or install it yourself as:
24
24
  ## Usage
25
25
 
26
26
  ### ENVIRONMENT VARIABLES
27
+ in initializer
27
28
  ```ruby
28
- ENV['BBR_USERNAME']='xxxx'
29
- ENV['BBR_PASSWORD']='xxxx'
29
+ BBR.username = ENV['BBR_USERNAME']
30
+ BBR.password = ENV['BBR_PASSWORD']
30
31
  ```
31
32
  Contact Nicolai or Jesper for credentials if you are a member of the Abtion Team
32
33
 
@@ -25,8 +25,8 @@ module BBR
25
25
  building: {
26
26
  age: (Time.now.year - response.at_xpath("//Opfoerselsaar").try(:content).to_i).to_i,
27
27
  area: response.at_xpath("//BebyggetAreal").try(:content),
28
+ floors: response.at_xpath("//AntalEtager").try(:content),
28
29
  roof: {
29
- type: response.at_xpath("//Tagdaekningsmateriale/Value").try(:content),
30
30
  material: response.at_xpath("//Tagdaekningsmateriale/Value").try(:content),
31
31
  area: response.at_xpath("//UdnyttetTagetageareal").try(:content)
32
32
 
@@ -37,9 +37,6 @@ module BBR
37
37
  },
38
38
  outer_wall: {
39
39
  material: response.at_xpath("//Ydervaegsmateriale/Value").try(:content),
40
- },
41
- floor: {
42
- numbers: response.at_xpath("//AntalEtager").try(:content)
43
40
  }
44
41
  }
45
42
  }
data/lib/bbr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bbr
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
data/lib/bbr.rb CHANGED
@@ -6,6 +6,10 @@ require 'bbr/get_id_from_address'
6
6
  require 'bbr/get_building_data_from_id'
7
7
 
8
8
  module BBR
9
+ class << self
10
+ attr_accessor :username, :password
11
+ end
12
+
9
13
  def self.building_data_from_address(address)
10
14
  building_data_from_bbr_id(bbr_id_from_address(address))
11
15
  end
@@ -49,8 +53,8 @@ private
49
53
  <soapenv:Header>
50
54
  <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
51
55
  <UsernameToken>
52
- <Username>#{ ENV['BBR_USERNAME'] }</Username>
53
- <Password>#{ ENV['BBR_PASSWORD'] }</Password>
56
+ <Username>#{ BBR.username }</Username>
57
+ <Password>#{ BBR.password }</Password>
54
58
  </UsernameToken>
55
59
  </Security>
56
60
  </soapenv:Header>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bbr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesper Sørensen & Nicolai Seerup