companies-house 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.0.7. fixes bug preventing unique transaction ids being created when api called frequently
2
+
1
3
  v0.0.6. now raise CompaniesHouse::Exception if response XML contains error
2
4
 
3
5
  v0.0.5. now sic_codes.sic_texts always returns array
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{companies-house}
5
- s.version = "0.0.6"
5
+ s.version = "0.0.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Rob McKinnon"]
9
- s.date = %q{2010-10-22}
9
+ s.date = %q{2010-12-18}
10
10
  s.description = %q{Ruby API to UK Companies House XML Gateway.
11
11
  }
12
12
  s.email = ["rob ~@nospam@~ rubyforge.org"]
@@ -14,7 +14,7 @@ require File.dirname(__FILE__) + '/companies_house/exception'
14
14
  $KCODE = 'UTF8' unless RUBY_VERSION >= "1.9"
15
15
 
16
16
  module CompaniesHouse
17
- VERSION = "0.0.6" unless defined? CompaniesHouse::VERSION
17
+ VERSION = "0.0.7" unless defined? CompaniesHouse::VERSION
18
18
 
19
19
  class << self
20
20
 
@@ -65,7 +65,7 @@ module CompaniesHouse
65
65
 
66
66
  def create_transaction_id_and_digest
67
67
  # transaction_id = (Time.now + 2.minutes - 17.seconds).to_i
68
- transaction_id = Time.now.to_i
68
+ transaction_id = (Time.now.to_f * 100).to_i
69
69
  digest = Digest::MD5.hexdigest("#{sender_id}#{password}#{transaction_id}")
70
70
  return transaction_id, digest
71
71
  end
@@ -105,8 +105,9 @@ describe CompaniesHouse do
105
105
  @request_xml = '<request/>'
106
106
  @response_xml = '<response/>'
107
107
 
108
- @transaction_id = 123
109
- Time.stub!(:now).and_return(mock('time', :to_i => @transaction_id))
108
+ float_time = 123.45678
109
+ @transaction_id = 12345
110
+ Time.stub!(:now).and_return(mock('time', :to_f => float_time))
110
111
  @digest = 'digest'
111
112
  end
112
113
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: companies-house
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 6
10
- version: 0.0.6
9
+ - 7
10
+ version: 0.0.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rob McKinnon
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-22 00:00:00 +01:00
18
+ date: 2010-12-18 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency