rspreedly 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -27,6 +27,8 @@ module RSpreedly
27
27
  raise(RSpreedly::Error::BadRequest.new, message)
28
28
  when 404
29
29
  raise(RSpreedly::Error::NotFound.new, message)
30
+ when 504
31
+ raise(RSpreedly::Error::GatewayTimeout.new, message)
30
32
  end
31
33
 
32
34
  response
@@ -1,7 +1,10 @@
1
1
  module RSpreedly
2
2
  module PaymentMethod
3
3
  class CreditCard < Base
4
- attr_accessor :number, :verification_value, :month, :year, :first_name, :last_name, :card_type
4
+ attr_accessor :number, :verification_value, :month,
5
+ :year, :first_name, :last_name, :card_type,
6
+ :address1, :address2, :city, :state, :zip, :country,
7
+ :phone_number
5
8
  end
6
9
  end
7
10
  end
data/rspreedly.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rspreedly}
5
- s.version = "0.1.1"
5
+ s.version = "0.1.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Richard Livsey"]
9
- s.date = %q{2009-10-30}
9
+ s.date = %q{2009-11-03}
10
10
  s.email = %q{richard@livsey.org}
11
11
  s.extra_rdoc_files = [
12
12
  "LICENSE",
data/spec/base_spec.rb CHANGED
@@ -2,11 +2,12 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
  describe RSpreedly::Base do
3
3
 
4
4
  describe "#api_request" do
5
- it "should raise AccessDenied if a 401 is receiver" do
5
+ it "should raise AccessDenied if a 401 is received" do
6
6
  stub_http_with_code(401)
7
7
  lambda{
8
8
  RSpreedly::Base.api_request(:put, '/')
9
9
  }.should raise_error(RSpreedly::Error::AccessDenied)
10
10
  end
11
+
11
12
  end
12
13
  end
data/spec/invoice_spec.rb CHANGED
@@ -112,6 +112,13 @@ describe RSpreedly::Invoice do
112
112
  }.should raise_error(RSpreedly::Error::NotFound)
113
113
  end
114
114
 
115
+ it "should raise GatewayTimeout if the payment gateway times out" do
116
+ stub_http_with_code(504)
117
+ lambda{
118
+ @invoice.pay(@payment)
119
+ }.should raise_error(RSpreedly::Error::GatewayTimeout)
120
+ end
121
+
115
122
  it "should raise BadRequest if the payment method is invalid" do
116
123
  stub_http_with_fixture("payment_invalid.xml", 422)
117
124
  lambda{
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspreedly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Livsey
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-30 00:00:00 +01:00
12
+ date: 2009-11-03 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15