nne_client 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -60,6 +60,10 @@ module NNEClient
60
60
  extended_attributes :email, :homepage, :founded_year,
61
61
  :number_of_employees, :tdf_name, :status_text
62
62
 
63
+ def house_no
64
+ fetch_extended_attributes.fetch(:kvh, {}).fetch(:house_no, nil)
65
+ end
66
+
63
67
  # List of additional_names
64
68
  def additional_names
65
69
  result = Fetch.new(tdc_id, 'fetchCompanyAdditionalNames').result_set.to_hash
@@ -159,13 +163,13 @@ module NNEClient
159
163
  end
160
164
 
161
165
  def extended_attributes
162
- @extended_attributes ||= fetch_extended_attributes.reject{ |k,v|
166
+ @extended_attributes ||= fetch_extended_attributes[:company].reject{ |k,v|
163
167
  v.kind_of?(Hash)
164
168
  }
165
169
  end
166
170
 
167
171
  def fetch_extended_attributes
168
- Fetch.new(tdc_id, 'fetchCompany').result_set.to_hash[:company]
172
+ Fetch.new(tdc_id, 'fetchCompany').result_set.to_hash
169
173
  end
170
174
  end
171
175
  end
@@ -1,3 +1,3 @@
1
1
  module NNEClient
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/spec/result_spec.rb CHANGED
@@ -96,6 +96,7 @@ describe NNEClient::Result do
96
96
  its(:number_of_employees) { should == '0' }
97
97
  its(:tdf_name) { should == 'Jacob Atzen' }
98
98
  its(:status_text) { should == 'Selskabet er i normal drift.' }
99
+ its(:house_no) { should == '47' }
99
100
  end
100
101
 
101
102
  context "without an access key" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nne_client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jacob Atzen
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-06-25 00:00:00 Z
18
+ date: 2012-10-10 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: savon