open-companies-house 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -3,7 +3,16 @@ Open Companies House
3
3
 
4
4
  Simple ruby wrapper around Companies House Open API
5
5
 
6
- Usage:
6
+ Installation
7
+ ============
8
+
9
+ In your Gemfile
10
+
11
+ ```ruby
12
+ gem "open-companies-house", "~> 0.2.0", require: 'companies_house'
13
+ ```
14
+
15
+ Usage
7
16
  =====
8
17
 
9
18
  ```ruby
@@ -7,7 +7,6 @@ module CompaniesHouse
7
7
  # Don't call this directly. Instead, use CompaniesHouse.lookup "01234567"
8
8
  def initialize(registration_number)
9
9
  @registration_number = validate(registration_number)
10
- @attributes = {}
11
10
  end
12
11
 
13
12
  def perform
@@ -2,6 +2,8 @@ module CompaniesHouse
2
2
 
3
3
  class Response
4
4
 
5
+ attr_reader :attributes
6
+
5
7
  def initialize(response)
6
8
  check_for_errors(response)
7
9
  parse_response(response)
@@ -1,3 +1,3 @@
1
1
  module CompaniesHouse
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
@@ -18,6 +18,10 @@ describe CompaniesHouse::Response do
18
18
  @response["CompanyName"].should == "GOCARDLESS LTD"
19
19
  end
20
20
 
21
+ it "makes raw attributes available as well" do
22
+ @response.attributes["CompanyName"].should == "GOCARDLESS LTD"
23
+ end
24
+
21
25
  it "makes SIC code available as a convenience method" do
22
26
  @response.sic_code.should == "62090"
23
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open-companies-house
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: