companies-house-rest 0.1.2 → 0.1.3

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: dbb8d4a36799069defbd9f3780cdacb28d7c063c
4
- data.tar.gz: 136fef2b3f98e9b5eb31f71e0255b4e68f86f300
3
+ metadata.gz: 5e65c6b0dc6a852028c762b9321fda74d1b1ad97
4
+ data.tar.gz: e07022f3a98a5e906975d0f300158345a3163570
5
5
  SHA512:
6
- metadata.gz: f1d9e4f856d027e7125c12b1a9d82a84689c61d1f9f3c07d52635b8d8ac1c78603cfc5c7efa2286a45055ea977a4db3f7943f2a7bb55badda297a2bf629d6810
7
- data.tar.gz: 307932848e29ebab49d2f88a3c7de393846f102ab12b286dd5bae00d0e2dc6dfd6176b0b3383db9895f6a365399656f0fb8a202afc88333d3a48b0e1055d0bf3
6
+ metadata.gz: 8f3901911201a184ded7db0e560135a281e3befe4cca48f4bccbc08d8842eec0200bade212524c98eb6f876e8eb82a02db18038d94a94a096537c6503d23e4cf
7
+ data.tar.gz: ed781a6ac56a719dc667ea3e3c22c686cb2ef2019c5259e714cc1aa5a482d46c7f5ac580b940b1ab8acbfd90b7913074aedb2a3a9ae9c78c30eb3be85e93d803
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # CompaniesHouse::Client
2
2
 
3
+ [![CircleCI](https://circleci.com/gh/gocardless/companies-house-rest.svg?style=svg)](https://circleci.com/gh/gocardless/companies-house-rest)
4
+
3
5
  This Gem implements an API client for the Companies House REST API. It can be
4
6
  used to look up information about companies registered in the United Kingdom.
5
7
  As of July 2016, this API is described by Companies House as a "beta service."
@@ -130,7 +132,7 @@ errors involving network connections (e.g. `Errno::ECONNRESET`).
130
132
  This gem is configured for development using a `bundler` workflow.
131
133
  Tests are written using RSpec, and Rubocop is used to provide linting.
132
134
  Bug reports and pull requests are welcome on this project's
133
- [GitHub repository](https://github.com/gocardless/companies-house-ruby).
135
+ [GitHub repository](https://github.com/gocardless/companies-house-rest).
134
136
 
135
137
  To get started:
136
138
 
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
 
13
13
  spec.summary = %q{Look up UK company registration information}
14
14
  spec.description = %q{Client for the Companies House REST API. Provides company profiles and officer lists.}
15
- spec.homepage = "https://github.com/gocardless/companies-house-ruby"
15
+ spec.homepage = "https://github.com/gocardless/companies-house-rest"
16
16
 
17
17
  spec.files = `git ls-files -z lib/ *.gemspec LICENSE README.md`.split("\x0")
18
18
  spec.bindir = "exe"
@@ -38,8 +38,9 @@ module CompaniesHouse
38
38
 
39
39
  loop do
40
40
  page = request(id, '/officers', start_index: offset)
41
- total = page['total_results']
42
41
  new_items = page['items']
42
+ total = page['total_results'] || new_items.count
43
+
43
44
  items += new_items
44
45
  offset += new_items.count
45
46
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CompaniesHouse
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: companies-house-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless Engineering
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-29 00:00:00.000000000 Z
11
+ date: 2016-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -98,7 +98,7 @@ files:
98
98
  - lib/companies_house/not_found_error.rb
99
99
  - lib/companies_house/rate_limit_error.rb
100
100
  - lib/companies_house/version.rb
101
- homepage: https://github.com/gocardless/companies-house-ruby
101
+ homepage: https://github.com/gocardless/companies-house-rest
102
102
  licenses:
103
103
  - MIT
104
104
  metadata: {}