govuk-registers-api-client 1.2.1 → 1.2.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
  SHA256:
3
- metadata.gz: a4feb9d437fcffd71e7508d09fea49b1196ecae5d10f3a270be9573a32ef5c7e
4
- data.tar.gz: d95d3693aa4c85b5e4567389fa382d1f87e278e5a339c5cf4b529dab00589318
3
+ metadata.gz: 7f7255531beb62757b687bca64cdb1feac0cf5690721d8d077ec1c9ed28efc29
4
+ data.tar.gz: 34102fd731138280dedfa840fec231e6c1e97c655fe8305abc61a0a60f272c57
5
5
  SHA512:
6
- metadata.gz: 10422900d95a4267920a90a9d43f59f65361c99beeecf12d220f21c99a044ba5b9259c2f148325e9623c66353783d0443776ec1dfd4843b73d2b124901151e82
7
- data.tar.gz: 6fdf51f7e6aa81ef0f6050c68bb0aec0dc503caa885b31c942e9aaab9e601533c0d65f1105a645afbc3f85a99f353c988f2190d36aa858707fd4d12bda2ffe64
6
+ metadata.gz: 9b86d0ac3f0eb441fdca95db5db5719d33c97bdaee45449b502f836b8f9c973a74f3880e60d31a2284fa48142b7282d5acbdd788435acb8f86496d88dc96b410
7
+ data.tar.gz: fd3685dc4850cf98236494a3fecf0574b15a2948bf9dec18ac957511fe33070000e40c3f4f5f26cdbffbadf44fa3b0467bb303f29ffdee25d9178123cf286739
data/.version CHANGED
@@ -1 +1 @@
1
- 1.2.1
1
+ 1.2.2
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: govuk-registers-api-client 1.2.1 ruby lib
2
+ # stub: govuk-registers-api-client 1.2.2 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "govuk-registers-api-client".freeze
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
 
23
23
  if s.respond_to? :specification_version then
24
24
  s.specification_version = 4
25
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.1') then
25
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.2') then
26
26
  s.add_runtime_dependency(%q<rest-client>.freeze, ["~> 2"])
27
27
  else
28
28
  s.add_dependency(%q<rest-client>.freeze, ["~> 2"])
@@ -138,6 +138,7 @@ module RegistersClient
138
138
 
139
139
  def update_data_from_rsf(rsf, user_entry_number, data_store)
140
140
  system_entry_number = @data_store.get_latest_entry_number(:system)
141
+ start_system_entry_number = system_entry_number
141
142
 
142
143
  rsf.each_line do |line|
143
144
  line.slice!("\n")
@@ -151,13 +152,15 @@ module RegistersClient
151
152
  user_entry_number += 1
152
153
 
153
154
  entry = RegistersClient::Entry.new(line, user_entry_number, params[1])
155
+ data_store.append_entry(entry)
154
156
  else
155
- system_entry_number += 1
157
+ if start_system_entry_number.zero?
158
+ system_entry_number += 1
156
159
 
157
- entry = RegistersClient::Entry.new(line, system_entry_number, params[1])
160
+ entry = RegistersClient::Entry.new(line, system_entry_number, params[1])
161
+ data_store.append_entry(entry)
162
+ end
158
163
  end
159
-
160
- data_store.append_entry(entry)
161
164
  elsif command == 'assert-root-hash'
162
165
  root_hash = line.split("\t")[1]
163
166
  data_store.set_root_hash(root_hash)
@@ -2,7 +2,7 @@ require 'register_client'
2
2
  require 'in_memory_data_store'
3
3
 
4
4
  module RegistersClient
5
- VERSION = '1.2.1'
5
+ VERSION = '1.2.2'
6
6
  class RegisterClientManager
7
7
  def initialize(config_options = {})
8
8
  @config_options = defaults.merge(config_options)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk-registers-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Registers Team (Government Digital Service)
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  version: '0'
79
79
  requirements: []
80
80
  rubyforge_project:
81
- rubygems_version: 2.7.6
81
+ rubygems_version: 2.7.7
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: Client library for GOV.UK Registers