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 +2 -0
- data/companies-house.gemspec +2 -2
- data/lib/companies_house.rb +2 -2
- data/spec/lib/companies_house_spec.rb +3 -2
- metadata +4 -4
data/CHANGELOG
CHANGED
data/companies-house.gemspec
CHANGED
@@ -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.
|
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-
|
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"]
|
data/lib/companies_house.rb
CHANGED
@@ -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.
|
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
|
-
|
109
|
-
|
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:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
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-
|
18
|
+
date: 2010-12-18 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|