geocerts 0.0.21 → 0.0.22
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.22
|
data/geocerts.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{geocerts}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.22"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["GeoCerts, Inc."]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-05-03}
|
13
13
|
s.description = %q{A Ruby library for interfacing with the GeoCerts REST API}
|
14
14
|
s.email = %q{sslsupport@geocerts.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -21,6 +21,9 @@ module GeoCerts
|
|
21
21
|
element :state
|
22
22
|
element 'total-price', :as => :total_price, :type => Float
|
23
23
|
element 'flagged'
|
24
|
+
element 'approver-email', :as => :approver_email
|
25
|
+
element 'approver-notified-at', :as => :approver_notified_at, :type => DateTime
|
26
|
+
element 'approver-confirmed-at', :as => :approver_confirmed_at, :type => DateTime
|
24
27
|
|
25
28
|
element :product do
|
26
29
|
element :sku
|
data/lib/geo_certs/order.rb
CHANGED
@@ -8,7 +8,7 @@ Server: Mongrel 1.1.3
|
|
8
8
|
Status: 200 OK
|
9
9
|
Cache-Control: no-cache
|
10
10
|
Content-Type: application/xml; charset=utf-8
|
11
|
-
Content-Length:
|
11
|
+
Content-Length: 2325
|
12
12
|
Vary: Accept-Encoding
|
13
13
|
Connection: close
|
14
14
|
|
@@ -33,6 +33,9 @@ Connection: close
|
|
33
33
|
<product>
|
34
34
|
<sku>Q</sku>
|
35
35
|
</product>
|
36
|
+
<approver-email>test@example.co</approver-email>
|
37
|
+
<approver-notified-at type="datetime">2009-08-12T16:46:06-04:00</approver-notified-at>
|
38
|
+
<approver-confirmed-at type="datetime">2009-08-12T16:46:07-04:00</approver-confirmed-at>
|
36
39
|
</order>
|
37
40
|
<order>
|
38
41
|
<id type="integer">422816</id>
|
@@ -83,7 +86,7 @@ Server: Mongrel 1.1.3
|
|
83
86
|
Status: 200 OK
|
84
87
|
Cache-Control: no-cache
|
85
88
|
Content-Type: application/xml; charset=utf-8
|
86
|
-
Content-Length:
|
89
|
+
Content-Length: 916
|
87
90
|
Vary: Accept-Encoding
|
88
91
|
Connection: close
|
89
92
|
|
@@ -107,6 +110,9 @@ Connection: close
|
|
107
110
|
<product>
|
108
111
|
<sku>Q</sku>
|
109
112
|
</product>
|
113
|
+
<approver-email>test@example.co</approver-email>
|
114
|
+
<approver-notified-at type="datetime">2009-08-12T16:46:06-04:00</approver-notified-at>
|
115
|
+
<approver-confirmed-at type="datetime">2009-08-12T16:46:07-04:00</approver-confirmed-at>
|
110
116
|
</order>
|
111
117
|
|
|
112
118
|
|
@@ -166,7 +166,7 @@ class GeoCerts::CertificateTest < Test::Unit::TestCase
|
|
166
166
|
|
167
167
|
should 'return a GeoCerts::Certificate when successful' do
|
168
168
|
managed_server_request :get, "/orders/#{@order_id}/certificate.xml", :response => Responses::Certificate::Certificate do
|
169
|
-
managed_server_request :post, "/orders/422815/certificate/reissue.xml?
|
169
|
+
managed_server_request :post, "/orders/422815/certificate/reissue.xml?certificate[csr][body]=testbody", :response => Responses::Certificate::Certificate do
|
170
170
|
assert_kind_of(GeoCerts::Certificate, GeoCerts::Certificate.find(@order_id).reissue!(GeoCerts::CSR.new(:body => 'testbody')))
|
171
171
|
end
|
172
172
|
end
|
@@ -174,7 +174,7 @@ class GeoCerts::CertificateTest < Test::Unit::TestCase
|
|
174
174
|
|
175
175
|
should 'raise an error with no CSR body provided' do
|
176
176
|
managed_server_request :get, "/orders/#{@order_id}/certificate.xml", :response => Responses::Certificate::Certificate do
|
177
|
-
managed_server_request :post, "/orders/#{@order_id}/certificate/reissue.xml?
|
177
|
+
managed_server_request :post, "/orders/#{@order_id}/certificate/reissue.xml?certificate[csr][body]=", :response => Responses::Certificate::MissingCSRBody do
|
178
178
|
assert_responds_with_exception(GeoCerts::UnprocessableEntity, -90010) do
|
179
179
|
GeoCerts::Certificate.find(@order_id).reissue!(GeoCerts::CSR.new(:body => nil))
|
180
180
|
end
|
@@ -36,6 +36,9 @@ class GeoCerts::OrderTest < Test::Unit::TestCase
|
|
36
36
|
assert_equal('COMPLETED', order.state)
|
37
37
|
assert_equal(69.00, order.total_price)
|
38
38
|
assert_equal(false, order.flagged)
|
39
|
+
assert_equal('test@example.co', order.approver_email)
|
40
|
+
assert_equal(DateTime.parse('2009-08-12T16:46:07-04:00'), order.approver_confirmed_at)
|
41
|
+
assert_equal(DateTime.parse('2009-08-12T16:46:06-04:00'), order.approver_notified_at)
|
39
42
|
end
|
40
43
|
end
|
41
44
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 22
|
9
|
+
version: 0.0.22
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- GeoCerts, Inc.
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-05-03 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|