bbr 1.0.1 → 1.0.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: 4023b8bfb4be6f892661bc08ee0d15fb4d2330a3
4
- data.tar.gz: 3efe413809e087bc977139fee4119d54acd80984
3
+ metadata.gz: 5206e2906defefb4036a52d112acfc7af7fde7bf
4
+ data.tar.gz: 52427a4d6e6dd5ffa52fc47cac29db4e2a3c5901
5
5
  SHA512:
6
- metadata.gz: 1962f9827441b0c75ad907f4ee7f42ef36d5d6247f4eae4e398b61c69f4a8af000c4db121120544e810757d2ac0b343cd1818459b3e5cdaae6d060de6daaf590
7
- data.tar.gz: a8825265d7b8926599dd5d5fde7922fdecf7c80415d275769df10267d8442647928a160b62d2b7285be1a31b3b5458a9ad2f2b354beca411dc7859a29f0b1ad9
6
+ metadata.gz: 8e9b06cff2c82f4dc63ce097019e1f79a495c74b4f636a3aab0383302e9be418c202ecc2d626689db381211bcbac2e959522683caa27f90d5c9be2bea155f17c
7
+ data.tar.gz: 19b4eabca26002133e609dab5810975185cfb81507cb500ea1a51cdfd178683266883056fbfd234499396e67052928cb224ac05df9a370199fc4ecf001890dc9
data/CHANGELOG.md CHANGED
@@ -5,3 +5,7 @@
5
5
  ## v1.0.1
6
6
 
7
7
  * remove output formatting
8
+
9
+ ## v.1.0.2
10
+
11
+ * change response format
@@ -22,15 +22,26 @@ module BBR
22
22
  def self.formatted_response(response=nil)
23
23
  if response.present? && !response.at_xpath("//Fault").try(:content).present?
24
24
  {
25
- building_area: response.at_xpath("//BebyggetAreal").try(:content),
26
- building_age: (Time.now.year - response.at_xpath("//Opfoerselsaar").try(:content).to_i).to_i,
27
- roof_type: response.at_xpath("//Tagdaekningsmateriale/Value").try(:content),
28
- heating: response.at_xpath("//Varmeinstallation/Value").try(:content),
29
- heating_source: response.at_xpath("//Opvarmningsmiddel/Value").try(:content),
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)
25
+ building: {
26
+ age: (Time.now.year - response.at_xpath("//Opfoerselsaar").try(:content).to_i).to_i,
27
+ area: response.at_xpath("//BebyggetAreal").try(:content),
28
+ roof: {
29
+ type: response.at_xpath("//Tagdaekningsmateriale/Value").try(:content),
30
+ material: response.at_xpath("//Tagdaekningsmateriale/Value").try(:content),
31
+ area: response.at_xpath("//UdnyttetTagetageareal").try(:content)
32
+
33
+ },
34
+ heating: {
35
+ installation: response.at_xpath("//Varmeinstallation/Value").try(:content),
36
+ means: response.at_xpath("//Opvarmningsmiddel/Value").try(:content)
37
+ },
38
+ outer_wall: {
39
+ material: response.at_xpath("//Ydervaegsmateriale/Value").try(:content),
40
+ },
41
+ floor: {
42
+ numbers: response.at_xpath("//AntalEtager").try(:content)
43
+ }
44
+ }
34
45
  }
35
46
  else
36
47
  Hash.new
data/lib/bbr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bbr
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/lib/bbr.rb CHANGED
@@ -5,7 +5,6 @@ require 'nokogiri'
5
5
  require 'bbr/get_id_from_address'
6
6
  require 'bbr/get_building_data_from_id'
7
7
 
8
-
9
8
  module BBR
10
9
  def self.building_data_from_address(address)
11
10
  building_data_from_bbr_id(bbr_id_from_address(address))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bbr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesper Sørensen & Nicolai Seerup
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-07 00:00:00.000000000 Z
11
+ date: 2015-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler