geocerts 0.0.11 → 0.0.12

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.11
1
+ 0.0.12
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{geocerts}
8
- s.version = "0.0.11"
8
+ s.version = "0.0.12"
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."]
@@ -50,6 +50,7 @@ Gem::Specification.new do |s|
50
50
  "lib/geo_certs/order/renewal_information.rb",
51
51
  "lib/geo_certs/parsers/order_parser.rb",
52
52
  "lib/geo_certs/product.rb",
53
+ "lib/geocerts.rb",
53
54
  "test/config/initializers/_remote_tests.rb",
54
55
  "test/config/initializers/fakeweb.rb",
55
56
  "test/config/initializers/geocerts.rb",
@@ -30,7 +30,8 @@ module GeoCerts
30
30
 
31
31
  def self.api # :nodoc:
32
32
  @api = API.new({
33
- :version => 1
33
+ :version => 1,
34
+ :host => host
34
35
  }, {
35
36
  :credentials => [partner_id, api_token]
36
37
  })
@@ -17,7 +17,7 @@ module GeoCerts
17
17
 
18
18
  class API < Relax::Service # :nodoc:
19
19
 
20
- ENDPOINT = "https://#{GeoCerts.host}/:version"
20
+ ENDPOINT = "https://:host/:version"
21
21
 
22
22
  include Endpoints::Orders
23
23
  include Endpoints::Certificates
@@ -0,0 +1 @@
1
+ require 'geo_certs'
@@ -377,8 +377,8 @@ class GeoCerts::OrderTest < Test::Unit::TestCase
377
377
  end
378
378
 
379
379
  should 'not raise errors with a full organization given' do
380
- exclusively_mocked_request :post, %r{https://.*api-test.geocerts.com/1/orders.xml.*}i, :response => Responses::Order::Order do
381
- order = GeoCerts::Order.new({:organization => {:address => '123 SSL Ave.', :address_2 => 'Suite D', :address_3 => 'tesat', :city => 'Atlanta', :country => 'US', :name => 'Microsoft Inc', :phone => '800-555-1212', :postal_code => '12345', :state => 'Georgia'}}.reverse_merge(Factory.attributes_for(:order)))
380
+ exclusively_mocked_request :post, %r{/orders.xml}, :response => Responses::Order::Order do
381
+ order = GeoCerts::Order.new(Factory.attributes_for(:order).merge({:organization => {:address => '123 SSL Ave.', :address_2 => 'Suite D', :address_3 => 'tesat', :city => 'Atlanta', :country => 'US', :name => 'Microsoft Inc', :phone => '800-555-1212', :postal_code => '12345', :state => 'Georgia'}}))
382
382
  assert_nothing_raised(Exception) { order.save }
383
383
  end
384
384
  end
@@ -21,7 +21,7 @@ class Test::Unit::TestCase
21
21
  def managed_server_request(method, path, options = {}, &block)
22
22
  case path
23
23
  when String
24
- uri = URI.parse(GeoCerts::API::ENDPOINT.gsub(':version', '1') + path)
24
+ uri = URI.parse(GeoCerts::API::ENDPOINT.gsub(':host', GeoCerts.host).gsub(':version', '1') + path)
25
25
  uri.user = GeoCerts.partner_id
26
26
  uri.password = GeoCerts.api_token
27
27
  FakeWeb.register_uri(method, uri.to_s, options)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 11
9
- version: 0.0.11
8
+ - 12
9
+ version: 0.0.12
10
10
  platform: ruby
11
11
  authors:
12
12
  - GeoCerts, Inc.
@@ -130,6 +130,7 @@ files:
130
130
  - lib/geo_certs/order/renewal_information.rb
131
131
  - lib/geo_certs/parsers/order_parser.rb
132
132
  - lib/geo_certs/product.rb
133
+ - lib/geocerts.rb
133
134
  - test/config/initializers/_remote_tests.rb
134
135
  - test/config/initializers/fakeweb.rb
135
136
  - test/config/initializers/geocerts.rb