bbr 1.0.0.beta → 1.0.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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/bbr/get_building_data_from_id.rb +4 -51
- data/lib/bbr/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4023b8bfb4be6f892661bc08ee0d15fb4d2330a3
|
|
4
|
+
data.tar.gz: 3efe413809e087bc977139fee4119d54acd80984
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1962f9827441b0c75ad907f4ee7f42ef36d5d6247f4eae4e398b61c69f4a8af000c4db121120544e810757d2ac0b343cd1818459b3e5cdaae6d060de6daaf590
|
|
7
|
+
data.tar.gz: a8825265d7b8926599dd5d5fde7922fdecf7c80415d275769df10267d8442647928a160b62d2b7285be1a31b3b5458a9ad2f2b354beca411dc7859a29f0b1ad9
|
data/CHANGELOG.md
CHANGED
|
@@ -25,63 +25,16 @@ module BBR
|
|
|
25
25
|
building_area: response.at_xpath("//BebyggetAreal").try(:content),
|
|
26
26
|
building_age: (Time.now.year - response.at_xpath("//Opfoerselsaar").try(:content).to_i).to_i,
|
|
27
27
|
roof_type: response.at_xpath("//Tagdaekningsmateriale/Value").try(:content),
|
|
28
|
-
roof_tilt: roof_tilt(response),
|
|
29
28
|
heating: response.at_xpath("//Varmeinstallation/Value").try(:content),
|
|
30
29
|
heating_source: response.at_xpath("//Opvarmningsmiddel/Value").try(:content),
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
outer_wall_material: response.at_xpath("//Ydervaegsmateriale/Value").try(:content),
|
|
31
|
+
floors: response.at_xpath("//AntalEtager").try(:content),
|
|
32
|
+
material: response.at_xpath("//Tagdaekningsmateriale/Value").try(:content),
|
|
33
|
+
roof_area: response.at_xpath("//UdnyttetTagetageareal").try(:content)
|
|
33
34
|
}
|
|
34
35
|
else
|
|
35
36
|
Hash.new
|
|
36
37
|
end
|
|
37
38
|
end
|
|
38
|
-
|
|
39
|
-
def self.roof_tilt(response)
|
|
40
|
-
floors = response.at_xpath("//AntalEtager").try :content
|
|
41
|
-
material = response.at_xpath("//Tagdaekningsmateriale/Value").try :content
|
|
42
|
-
roof_area = response.at_xpath("//UdnyttetTagetageareal").try :content
|
|
43
|
-
|
|
44
|
-
if floors
|
|
45
|
-
t = floors == 1 ? 2 : 3
|
|
46
|
-
if material == 'BuiltUp'
|
|
47
|
-
t = 1
|
|
48
|
-
elsif roof_area.to_i > 0
|
|
49
|
-
t = 3
|
|
50
|
-
end
|
|
51
|
-
t
|
|
52
|
-
else
|
|
53
|
-
2
|
|
54
|
-
end
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
def self.formatted_heating(response)
|
|
58
|
-
heating = response.at_xpath("//Varmeinstallation/Value").try :content
|
|
59
|
-
heating_source = response.at_xpath("//Opvarmningsmiddel/Value").try :content
|
|
60
|
-
|
|
61
|
-
case heating
|
|
62
|
-
when 'FjernvarmeBlokvarme'
|
|
63
|
-
'Fjernvarme'
|
|
64
|
-
when 'ElovneElpaneler'
|
|
65
|
-
'Elvarme'
|
|
66
|
-
when 'Varmepumpe'
|
|
67
|
-
'Varmepumpe'
|
|
68
|
-
when 'Gasradiator'
|
|
69
|
-
'Gas'
|
|
70
|
-
when 'CentralvarmeFraEgetAnlaegEtKammerFyr', 'CentralvarmeMedToFyringsenheder', 'Ovne'
|
|
71
|
-
case heating_source
|
|
72
|
-
when 'Elektricitet'
|
|
73
|
-
'Elvarme'
|
|
74
|
-
when 'Gasvaerksgas', 'Naturgas'
|
|
75
|
-
'Gas'
|
|
76
|
-
when 'FastBraendsel', 'Halm'
|
|
77
|
-
'Træpillefyr/Halmfyr'
|
|
78
|
-
else
|
|
79
|
-
'Oliefyr'
|
|
80
|
-
end
|
|
81
|
-
else
|
|
82
|
-
"#{ heating } / #{ heating_source }"
|
|
83
|
-
end
|
|
84
|
-
end
|
|
85
39
|
end
|
|
86
|
-
|
|
87
40
|
end
|
data/lib/bbr/version.rb
CHANGED
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.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jesper Sørensen & Nicolai Seerup
|
|
@@ -135,9 +135,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
135
135
|
version: '0'
|
|
136
136
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
requirements:
|
|
138
|
-
- - "
|
|
138
|
+
- - ">="
|
|
139
139
|
- !ruby/object:Gem::Version
|
|
140
|
-
version:
|
|
140
|
+
version: '0'
|
|
141
141
|
requirements: []
|
|
142
142
|
rubyforge_project:
|
|
143
143
|
rubygems_version: 2.4.3
|