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 +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +3 -2
- data/lib/bbr/get_building_data_from_id.rb +1 -4
- data/lib/bbr/version.rb +1 -1
- data/lib/bbr.rb +6 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0b952dd23a4593e8211abea713f57043c68ee9e1
|
|
4
|
+
data.tar.gz: 90730c15a0c7f350f19aa8e49dc30f7e90f7a652
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc738b79f72bffdd1b46fe61123be3083cc4416bb54bdedb21d514d2189f1a14e6dbc6f1011427ea5e3111ebdb672ceaed7f8f1c15bff00ee64e39fd614bcca6
|
|
7
|
+
data.tar.gz: 2c02b86122de465ccfa58057945723458f9446297eb07f29aa310b4fd8cb06c3a6aef6e3da759d2380f3040aa4ddc20ae8f6e4c83702ac136f6959ce9cdc5176
|
data/CHANGELOG.md
CHANGED
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']
|
|
29
|
-
ENV['BBR_PASSWORD']
|
|
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
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>#{
|
|
53
|
-
<Password>#{
|
|
56
|
+
<Username>#{ BBR.username }</Username>
|
|
57
|
+
<Password>#{ BBR.password }</Password>
|
|
54
58
|
</UsernameToken>
|
|
55
59
|
</Security>
|
|
56
60
|
</soapenv:Header>
|