samurai 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc ADDED
@@ -0,0 +1,8 @@
1
+ export RUBYOPT="rubygems"
2
+ export RUBYLIB="."
3
+ rvm ruby-1.9.2-p180@samurai-client-ruby
4
+
5
+ # Install bundler if it doesn't already exist
6
+ # if ! command -v bundle > /dev/null ; then
7
+ # gem install bundler
8
+ # fi
data/Gemfile.lock ADDED
@@ -0,0 +1,53 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ samurai (0.2.3)
5
+ activeresource (>= 2.2.2)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ activemodel (3.0.9)
11
+ activesupport (= 3.0.9)
12
+ builder (~> 2.1.2)
13
+ i18n (~> 0.5.0)
14
+ activeresource (3.0.9)
15
+ activemodel (= 3.0.9)
16
+ activesupport (= 3.0.9)
17
+ activesupport (3.0.9)
18
+ archive-tar-minitar (0.5.2)
19
+ builder (2.1.2)
20
+ columnize (0.3.4)
21
+ diff-lcs (1.1.2)
22
+ fakeweb (1.3.0)
23
+ i18n (0.5.0)
24
+ linecache19 (0.5.12)
25
+ ruby_core_source (>= 0.1.4)
26
+ rspec (2.6.0)
27
+ rspec-core (~> 2.6.0)
28
+ rspec-expectations (~> 2.6.0)
29
+ rspec-mocks (~> 2.6.0)
30
+ rspec-core (2.6.4)
31
+ rspec-expectations (2.6.0)
32
+ diff-lcs (~> 1.1.2)
33
+ rspec-mocks (2.6.0)
34
+ ruby-debug-base19 (0.11.25)
35
+ columnize (>= 0.3.1)
36
+ linecache19 (>= 0.5.11)
37
+ ruby_core_source (>= 0.1.4)
38
+ ruby-debug19 (0.11.6)
39
+ columnize (>= 0.3.1)
40
+ linecache19 (>= 0.5.11)
41
+ ruby-debug-base19 (>= 0.11.19)
42
+ ruby_core_source (0.1.5)
43
+ archive-tar-minitar (>= 0.5.2)
44
+
45
+ PLATFORMS
46
+ ruby
47
+
48
+ DEPENDENCIES
49
+ bundler (>= 1.0.0)
50
+ fakeweb
51
+ rspec (>= 2.6.0)
52
+ ruby-debug19
53
+ samurai!
data/README.markdown CHANGED
@@ -1,10 +1,9 @@
1
1
  Samurai
2
2
  =======
3
3
 
4
- The Samurai merchant gem give you a nice set of ruby object to play with
5
- instead of hacking the Samurai API yourself. You'll need a merchant account
6
- with samurai.feefighters.com and your credentials and you'll need your
7
- application to track a few identifying tokens with your.
4
+ If you are an online merchant and using samurai.feefighers.com, this gem will
5
+ make your life easy. Integrate with the samuari.feefighters.com portal and
6
+ process transactions.
8
7
 
9
8
 
10
9
  Installation
@@ -37,14 +36,14 @@ it. Typically this belongs in your environment.rb file or it's own initializer.
37
36
  Samurai.options = {
38
37
  :merchant_key => 'your_merchant_key',
39
38
  :merchant_password => 'your_merchant_password',
40
- :gateway_token => 'your_default_gateway_token'
39
+ :processor_token => 'your_default_processor_token'
41
40
  }
42
41
  end
43
42
 
44
- The :gateway_token param is optional. If you set it,
45
- `Samurai::Gateway.the_gateway` will return the gateway with this token. You
46
- can always call `Samurai::Gateway.find('an_arbitrary_gateway_token')` to
47
- retrieve any of your gateways.
43
+ The :processor_token param is optional. If you set it,
44
+ `Samurai::Processor.the_processor` will return the processor with this token. You
45
+ can always call `Samurai::Processor.find('an_arbitrary_processor_token')` to
46
+ retrieve any of your processors.
48
47
 
49
48
 
50
49
  Payment Methods
@@ -58,7 +57,7 @@ in Samurai.
58
57
  To let your customers create a Payment Method, place a credit card
59
58
  entry form on your site like the one below.
60
59
 
61
- <form action="https://api.ubergateway.com/v1/payment_methods" method="POST">
60
+ <form action="https://samurai.feefighters.com/v1/payment_methods" method="POST">
62
61
  <fieldset>
63
62
  <input name="redirect_url" type="hidden" value="http://yourdomain.com/anywhere" />
64
63
  <input name="merchant_key" type="hidden" value="[Your Merchant Key]" />
@@ -166,18 +165,18 @@ transaction.
166
165
  ### Purchases and Authorizations
167
166
 
168
167
  When you want to start to process a new purchase or authorization on a payment
169
- method, Samurai needs to know which of your gateways you want to use. You can
170
- initiate a purchase (if your gateway supports it) or an authorization against
171
- a gateway by:
168
+ method, Samurai needs to know which of your processors you want to use. You can
169
+ initiate a purchase (if your processor supports it) or an authorization against
170
+ a processor by:
172
171
 
173
- gateway = Samurai::Gateway.the_gateway # if you set Samurai.options[:gateway_token]
174
- gateway = Samurai::Gateway.find('a_gateway_token') # if you have multiple gateways
175
- purchase = gateway.purchase(payment_method_token, amount, options)
172
+ processor = Samurai::Processor.the_processor # if you set Samurai.options[:processor_token]
173
+ processor = Samurai::Processor.find('a_processor_token') # if you have multiple processors
174
+ purchase = processor.purchase(payment_method_token, amount, options)
176
175
  purchase_reference_id = purchase.reference_id # save this value, you can find the transaction with it later
177
176
 
178
177
  An authorization is created the same way:
179
178
 
180
- authorization = gateway.authorize(payment_method_token, amount, options)
179
+ authorization = processor.authorize(payment_method_token, amount, options)
181
180
  authorization_reference_id = authorization.reference_id # save this value, you can find the transaction with it later
182
181
 
183
182
  You can specify options for either transaction type. Options is a hash that may contain:
@@ -185,7 +184,7 @@ You can specify options for either transaction type. Options is a hash that may
185
184
  * descriptor: a string description of the charge
186
185
  * billing_reference: a string reference for the transaction
187
186
  * customer_reference: a string that identifies the customer to your application
188
- * custom: a custom value that Samurai will store but not forward to the gateway
187
+ * custom: a custom value that Samurai will store but not forward to the processor
189
188
 
190
189
  ### Capturing an Authorization
191
190
 
data/lib/samurai.rb CHANGED
@@ -18,8 +18,8 @@ module Samurai
18
18
  @@options[:merchant_password]
19
19
  end
20
20
 
21
- def self.gateway_token # ::nodoc::
22
- @@options[:gateway_token]
21
+ def self.processor_token # ::nodoc::
22
+ @@options[:processor_token]
23
23
  end
24
24
 
25
25
  def self.options
@@ -35,7 +35,7 @@ end
35
35
 
36
36
  require 'samurai/cacheable_by_token'
37
37
  require 'samurai/base'
38
- require 'samurai/gateway'
38
+ require 'samurai/processor'
39
39
  require 'samurai/payment_method'
40
40
  require 'samurai/transaction'
41
41
  require 'samurai/message'
data/lib/samurai/base.rb CHANGED
@@ -5,7 +5,7 @@ rescue LoadError
5
5
  end
6
6
  class Samurai::Base < ActiveResource::Base
7
7
 
8
- def self.setup_site! # ::nodoc::
8
+ def self.setup_site! # :nodoc:
9
9
  self.site = Samurai.site
10
10
  self.user = Samurai.merchant_key
11
11
  self.password = Samurai.merchant_password
@@ -4,7 +4,7 @@ module Samurai::CacheableByToken
4
4
  # Different caching strategies can be employed to keep the data around longer:
5
5
  # * class variables
6
6
  # * Rails.cache
7
- # * memecached
7
+ # * memcached
8
8
  # * redis cache
9
9
  def self.included(klass)
10
10
  klass.send :cattr_accessor, :cache
@@ -1,30 +1,30 @@
1
- class Samurai::Gateway < Samurai::Base
1
+ class Samurai::Processor < Samurai::Base
2
2
 
3
- # Returns the default gateway specified by Samurai.gateway_token if you passed it into Samurai.setup_site.
4
- def self.the_gateway
5
- Samurai::Gateway.new(:id => Samurai.gateway_token)
3
+ # Returns the default processor specified by Samurai.processor_token if you passed it into Samurai.setup_site.
4
+ def self.the_processor
5
+ Samurai::Processor.new(:id => Samurai.processor_token)
6
6
  end
7
7
 
8
- # Convienince method that calls the purchase method on the defalt gateway.
8
+ # Convenience method that calls the purchase method on the default processor.
9
9
  def self.purchase(*args)
10
- the_gateway.purchase(*args)
10
+ the_processor.purchase(*args)
11
11
  end
12
12
 
13
- # Convienince method that calls the authorize method on the defalt gateway.
13
+ # Convenience method that calls the authorize method on the default processor.
14
14
  def self.authorize(*args)
15
- the_gateway.authorize(*args)
15
+ the_processor.authorize(*args)
16
16
  end
17
17
 
18
- # Convienience method to authorize and capture a payment_method for a particular amount in one transaction.
18
+ # Convenience method to authorize and capture a payment_method for a particular amount in one transaction.
19
19
  # Parameters:
20
20
  # +payment_method_token+:: token identifying the payment method to authorize
21
21
  # +amount+:: amount to authorize
22
22
  # options:: an optional has of additional values to pass in accepted values are:
23
23
  # *+descriptor+:: descriptor for the transaction
24
- # *+custom+:: custom data, this data does not get passed to the gateway, it is stored within samurai.feefighters.com only
25
- # *+customer_reference+:: an identifier for the customer, this will appear in the gateway if supported
26
- # *+billing_reference::+ an indentifier for the purchase, this will appear in the gateway if supported
27
- # Returns a Samurai::Transaction containing the gateway's response.
24
+ # *+custom+:: custom data, this data does not get passed to the processor, it is stored within samurai.feefighters.com only
25
+ # *+customer_reference+:: an identifier for the customer, this will appear in the processor if supported
26
+ # *+billing_reference::+ an identifier for the purchase, this will appear in the processor if supported
27
+ # Returns a Samurai::Transaction containing the processor's response.
28
28
  def purchase(payment_method_token, amount, options = {})
29
29
  execute(:purchase, options.merge(:payment_method_token => payment_method_token, :amount => amount))
30
30
  end
@@ -35,10 +35,10 @@ class Samurai::Gateway < Samurai::Base
35
35
  # +amount+:: amount to authorize
36
36
  # options:: an optional has of additional values to pass in accepted values are:
37
37
  # *+descriptor+:: descriptor for the transaction
38
- # *+custom+:: custom data, this data does not get passed to the gateway, it is stored within samurai.feefighters.com only
39
- # *+customer_reference+:: an identifier for the customer, this will appear in the gateway if supported
40
- # *+billing_reference::+ an indentifier for the purchase, this will appear in the gateway if supported
41
- # Returns a Samurai::Transaction containing the gateway's response.
38
+ # *+custom+:: custom data, this data does not get passed to the processor, it is stored within samurai.feefighters.com only
39
+ # *+customer_reference+:: an identifier for the customer, this will appear in the processor if supported
40
+ # *+billing_reference::+ an identifier for the purchase, this will appear in the processor if supported
41
+ # Returns a Samurai::Transaction containing the processor's response.
42
42
  def authorize(payment_method_token, amount, options = {})
43
43
  execute(:authorize, options.merge(:payment_method_token => payment_method_token, :amount => amount))
44
44
  end
@@ -9,13 +9,13 @@ class Samurai::Transaction < Samurai::Base
9
9
  alias_method :token, :id
10
10
 
11
11
  # Captures an authorization. Optionally specify an +amount+ to do a partial capture of the initial
12
- # authorization. The default is to capture the full amount of the authroization.
12
+ # authorization. The default is to capture the full amount of the authorization.
13
13
  def capture(amount = nil, options = {})
14
14
  execute(:capture, {:amount => amount || self.amount}.reverse_merge(options))
15
15
  end
16
16
 
17
17
  # Void this transaction. If the transaction has not yet been captured and settled it can be voided to
18
- # prevent any funds from transfering.
18
+ # prevent any funds from transferring.
19
19
  def void(options = {})
20
20
  execute(:void, options)
21
21
  end
@@ -35,7 +35,7 @@ class Samurai::Transaction < Samurai::Base
35
35
  Samurai::Transaction.new.load_attributes_from_response(resp)
36
36
  end
37
37
 
38
- # Builds an xml payload that represents the transaction data to submit to samuari.feefighters.com
38
+ # Builds an xml payload that represents the transaction data to submit to samurai.feefighters.com
39
39
  def self.transaction_payload(options = {})
40
40
  {
41
41
  :amount => options[:amount],
@@ -1,3 +1,3 @@
1
1
  module Samurai
2
- VERSION = "0.2.2".freeze
2
+ VERSION = "0.2.3".freeze
3
3
  end
data/samurai.gemspec CHANGED
@@ -3,22 +3,27 @@ require File.expand_path("../lib/samurai/version", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "samurai"
6
- s.version = Samurai::VERSION
6
+ s.version = Samurai::VERSION.dup
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Graeme Rouse", "Derek Zak"]
9
9
  s.email = ["graeme@ubergateway.com", "derek@ubergateway.com"]
10
10
  s.homepage = "http://rubygems.org/gems/samurai"
11
11
  s.summary = "Integration gem for samurai.feefighters.com"
12
- s.description = "If you are an online merchant and using samurai.feefighers.com, this gem will make your life easy. Integrate with the samuari.feefighters.com portal and process transaction."
12
+ s.description = "If you are an online merchant and using samurai.feefighters.com, this gem will make your life easy. Integrate with the samurai.feefighters.com portal and process transaction."
13
13
 
14
14
  s.required_rubygems_version = ">= 1.3.5"
15
15
  # s.rubyforge_project = "samurai"
16
16
 
17
- s.add_dependency "activerecord", ">= 2.2.2"
17
+ s.add_dependency "activeresource", ">= 2.2.2"
18
18
 
19
19
  s.add_development_dependency "bundler", ">= 1.0.0"
20
20
  s.add_development_dependency "rspec", ">= 2.6.0"
21
21
  s.add_development_dependency 'fakeweb'
22
+ if RUBY_VERSION =~ /^1\.9/
23
+ s.add_development_dependency 'ruby-debug19'
24
+ else
25
+ s.add_development_dependency 'ruby-debug'
26
+ end
22
27
 
23
28
  s.files = `git ls-files`.split("\n")
24
29
  s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
@@ -4,11 +4,11 @@ describe "processing authorizations" do
4
4
 
5
5
  before :each do
6
6
  register_transaction_response(:type => 'authorize')
7
- @authorization = Samurai::Gateway.authorize(PAYMENT_METHOD_TOKEN, @@seed)
7
+ @authorization = Samurai::Processor.authorize(PAYMENT_METHOD_TOKEN, @@seed)
8
8
  end
9
9
 
10
10
  it "should create a new authorization transaction" do
11
- @authorization.gateway_response.success.should be_true
11
+ @authorization.processor_response.success.should be_true
12
12
  end
13
13
 
14
14
  it "should find the authorization" do
@@ -20,27 +20,27 @@ describe "processing authorizations" do
20
20
  it "should successfully capture" do
21
21
  register_transaction_response(:method => :post, :path => "transactions/#{@authorization.id}/capture", :type => 'capture')
22
22
  capture = @authorization.capture(@@seed)
23
- capture.gateway_response.success.should be_true
23
+ capture.processor_response.success.should be_true
24
24
  end
25
25
 
26
26
  it "should capture an authorization without specifying an amount" do
27
27
  register_transaction_response(:method => :post, :path => "transactions/#{@authorization.id}/capture", :type => 'capture', :amount => @@seed)
28
28
  capture = @authorization.capture
29
29
  capture.amount.intern.should be_equal "#{@@seed}".intern
30
- capture.gateway_response.success.should be_true
30
+ capture.processor_response.success.should be_true
31
31
  end
32
32
 
33
33
  it "should partially capture an authorization" do
34
34
  register_transaction_response(:method => :post, :path => "transactions/#{@authorization.id}/capture", :type => 'capture', :amount => @@seed - 1.0)
35
35
  capture = @authorization.capture(@@seed - 1.0)
36
36
  capture.amount.intern.should be_equal "#{@@seed - 1.0}".intern
37
- capture.gateway_response.success.should be_true
37
+ capture.processor_response.success.should be_true
38
38
  end
39
39
 
40
40
  it "should void an authorization" do
41
41
  register_transaction_response(:method => :post, :path => "transactions/#{@authorization.id}/void", :type => 'void', :amount => @@seed)
42
42
  void = @authorization.void
43
- void.gateway_response.success.should be_true
43
+ void.processor_response.success.should be_true
44
44
  end
45
45
 
46
46
  it "should credit an authorization for the full amount by default" do
@@ -48,7 +48,7 @@ describe "processing authorizations" do
48
48
  credit = @authorization.credit
49
49
  credit.amount.intern.should be_equal "#{@@seed}".intern
50
50
  pending "the response is not successful since the authorization hasn't settled" do
51
- credit.gateway_response.success.should be_true
51
+ credit.processor_response.success.should be_true
52
52
  end
53
53
  end
54
54
 
@@ -57,7 +57,7 @@ describe "processing authorizations" do
57
57
  credit = @authorization.credit(@@seed - 1.0)
58
58
  credit.amount.intern.should be_equal "#{@@seed - 1.0}".intern
59
59
  pending "the response is not successful since the authorization hasn't settled" do
60
- credit.gateway_response.success.should be_true
60
+ credit.processor_response.success.should be_true
61
61
  end
62
62
  end
63
63
  end
@@ -1,37 +1,37 @@
1
1
  require 'test/spec_helper'
2
2
 
3
- describe "Gateway actions" do
3
+ describe "Processor actions" do
4
4
 
5
- it "should return an empty gateway" do
6
- gateway = Samurai::Gateway.the_gateway
7
- gateway.should_not be_nil
5
+ it "should return an empty processor" do
6
+ processor = Samurai::Processor.the_processor
7
+ processor.should_not be_nil
8
8
  end
9
9
 
10
10
  it "should create a new purchase" do
11
11
  register_transaction_response(:type => 'purchase')
12
12
 
13
- purchase = Samurai::Gateway.purchase(PAYMENT_METHOD_TOKEN, @@seed)
14
- purchase.gateway_response.success.should be_true
13
+ purchase = Samurai::Processor.purchase(PAYMENT_METHOD_TOKEN, @@seed)
14
+ purchase.processor_response.success.should be_true
15
15
  # FakeWeb.last_request
16
16
  end
17
17
 
18
18
  it "should create a new purchase with tracking data" do
19
19
  register_transaction_response(:type => 'purchase')
20
20
 
21
- purchase = Samurai::Gateway.purchase(PAYMENT_METHOD_TOKEN, @@seed, {
21
+ purchase = Samurai::Processor.purchase(PAYMENT_METHOD_TOKEN, @@seed, {
22
22
  :descriptor => "A test purchase",
23
23
  :custom => "some optional custom data",
24
24
  :billing_reference => "ABC123",
25
25
  :customer_reference => "Customer (123)"
26
26
  })
27
- purchase.gateway_response.success.should be_true
27
+ purchase.processor_response.success.should be_true
28
28
  # FakeWeb.last_request
29
29
  end
30
30
 
31
31
  it "should create a non-new authorization" do
32
32
  register_transaction_response(:type => 'authorize')
33
- authorization = Samurai::Gateway.authorize(PAYMENT_METHOD_TOKEN, @@seed)
34
- authorization.gateway_response.success.should be_true
33
+ authorization = Samurai::Processor.authorize(PAYMENT_METHOD_TOKEN, @@seed)
34
+ authorization.processor_response.success.should be_true
35
35
  end
36
36
 
37
37
  end
@@ -4,30 +4,30 @@ describe "processing purchases" do
4
4
 
5
5
  before :each do
6
6
  register_transaction_response(:type => 'purchase')
7
- @purchase = Samurai::Gateway.purchase(PAYMENT_METHOD_TOKEN, @@seed)
7
+ @purchase = Samurai::Processor.purchase(PAYMENT_METHOD_TOKEN, @@seed)
8
8
  end
9
9
 
10
10
  it "should process successfully" do
11
- @purchase.gateway_response.success.should be_true
11
+ @purchase.processor_response.success.should be_true
12
12
  end
13
13
 
14
14
  it "should be able to void a recent purchase" do
15
15
  register_transaction_response(:method => :post, :path => "transactions/#{@purchase.id}/void", :type => 'void', :success => 'false')
16
16
  void = @purchase.void
17
- void.gateway_response.success.should be_true
17
+ void.processor_response.success.should be_true
18
18
  end
19
19
 
20
20
  it "should not be able to credit a recent purchase" do
21
21
  register_transaction_response(:method => :post, :path => "transactions/#{@purchase.id}/credit", :type => 'void', :success => 'false')
22
22
  credit = @purchase.credit
23
- credit.gateway_response.success.should be_false
23
+ credit.processor_response.success.should be_false
24
24
  end
25
25
 
26
26
  it "should be able to credit a settled purchase" do
27
27
  pending "currently we cannot force settle a purchase, so can't test this properly" do
28
28
  register_transaction_response(:method => :post, :path => "transactions/#{@purchase.id}/credit", :type => 'void', :success => 'false')
29
29
  credit = @purchase.credit
30
- credit.gateway_response.success.should be_true
30
+ credit.processor_response.success.should be_true
31
31
  end
32
32
  end
33
33
  end
data/test/spec_helper.rb CHANGED
@@ -25,7 +25,7 @@ Samurai.options = {
25
25
  :site => SITE,
26
26
  :merchant_key => ENV['merchant_key'] || 'e62c5a006cdd9908234193bc',
27
27
  :merchant_password => ENV['merchant_password'] || '18e87d97b3a44b56fe07497e4812f14555db69df9e6ca16f',
28
- :gateway_token => ENV['gateway_token'] || 'af762c3499f77c5f181650a7'
28
+ :processor_token => ENV['processor_token'] || 'af762c3499f77c5f181650a7'
29
29
  }
30
30
 
31
31
  def register_transaction_response(options)
@@ -35,7 +35,7 @@ def register_transaction_response(options)
35
35
 
36
36
  method = options[:method] && options[:method].to_sym || :post
37
37
  type = options[:type]
38
- path = options[:path] || "gateways/af762c3499f77c5f181650a7/#{type}"
38
+ path = options[:path] || "processors/af762c3499f77c5f181650a7/#{type}"
39
39
  payment_method_token = options[:payment_method_token] || PAYMENT_METHOD_TOKEN
40
40
  amount = options[:amount] || 15.00
41
41
  success = options[:success].blank? ? true : options[:success]
@@ -47,19 +47,19 @@ def register_transaction_response(options)
47
47
  <reference_id>3dcFjTC7LDjIjTY3nkKjBVZ8qkZ</reference_id>
48
48
  <transaction_token>53VFyQKYBmN9vKfA9mHCTs79L9a</transaction_token>
49
49
  <created_at type="datetime">2011-04-22T17:57:56Z</created_at>
50
- <descriptor>Custom descriptor here if your gateway supports it.</descriptor>
50
+ <descriptor>Custom descriptor here if your processor supports it.</descriptor>
51
51
  <custom>Any value you like.</custom>
52
52
  <transaction_type>#{type}</transaction_type>
53
53
  <amount>#{amount}</amount>
54
54
  <currency_code>USD</currency_code>
55
- <gateway_token>af762c3499f77c5f181650a7</gateway_token>
56
- <gateway_response>
55
+ <processor_token>af762c3499f77c5f181650a7</processor_token>
56
+ <processor_response>
57
57
  <success type="boolean">#{success}</success>
58
58
  <messages type="array">
59
- <message class="error" context="gateway.avs" key="country_not_supported" />
59
+ <message class="error" context="processor.avs" key="country_not_supported" />
60
60
  <message class="error" context="input.cvv" key="too_short" />
61
61
  </messages>
62
- </gateway_response>
62
+ </processor_response>
63
63
  <payment_method>
64
64
  <payment_method_token>#{payment_method_token}</payment_method_token>
65
65
  <created_at type="datetime">2011-02-12T20:20:46Z</created_at>
metadata CHANGED
@@ -1,149 +1,125 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: samurai
3
- version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 2
9
- - 2
10
- version: 0.2.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.3
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Graeme Rouse
14
9
  - Derek Zak
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2011-07-20 00:00:00 -07:00
13
+ date: 2011-08-04 00:00:00.000000000 -05:00
20
14
  default_executable:
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
23
- name: activerecord
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: activeresource
18
+ requirement: &70154627048120 !ruby/object:Gem::Requirement
26
19
  none: false
27
- requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 3
31
- segments:
32
- - 2
33
- - 2
34
- - 2
20
+ requirements:
21
+ - - ! '>='
22
+ - !ruby/object:Gem::Version
35
23
  version: 2.2.2
36
24
  type: :runtime
37
- version_requirements: *id001
38
- - !ruby/object:Gem::Dependency
39
- name: bundler
40
25
  prerelease: false
41
- requirement: &id002 !ruby/object:Gem::Requirement
26
+ version_requirements: *70154627048120
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: &70154627047660 !ruby/object:Gem::Requirement
42
30
  none: false
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- hash: 23
47
- segments:
48
- - 1
49
- - 0
50
- - 0
31
+ requirements:
32
+ - - ! '>='
33
+ - !ruby/object:Gem::Version
51
34
  version: 1.0.0
52
35
  type: :development
53
- version_requirements: *id002
54
- - !ruby/object:Gem::Dependency
55
- name: rspec
56
36
  prerelease: false
57
- requirement: &id003 !ruby/object:Gem::Requirement
37
+ version_requirements: *70154627047660
38
+ - !ruby/object:Gem::Dependency
39
+ name: rspec
40
+ requirement: &70154627047200 !ruby/object:Gem::Requirement
58
41
  none: false
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- hash: 23
63
- segments:
64
- - 2
65
- - 6
66
- - 0
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
67
45
  version: 2.6.0
68
46
  type: :development
69
- version_requirements: *id003
70
- - !ruby/object:Gem::Dependency
47
+ prerelease: false
48
+ version_requirements: *70154627047200
49
+ - !ruby/object:Gem::Dependency
71
50
  name: fakeweb
51
+ requirement: &70154627046820 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ! '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ type: :development
72
58
  prerelease: false
73
- requirement: &id004 !ruby/object:Gem::Requirement
59
+ version_requirements: *70154627046820
60
+ - !ruby/object:Gem::Dependency
61
+ name: ruby-debug19
62
+ requirement: &70154627046320 !ruby/object:Gem::Requirement
74
63
  none: false
75
- requirements:
76
- - - ">="
77
- - !ruby/object:Gem::Version
78
- hash: 3
79
- segments:
80
- - 0
81
- version: "0"
64
+ requirements:
65
+ - - ! '>='
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
82
68
  type: :development
83
- version_requirements: *id004
84
- description: If you are an online merchant and using samurai.feefighers.com, this gem will make your life easy. Integrate with the samuari.feefighters.com portal and process transaction.
85
- email:
69
+ prerelease: false
70
+ version_requirements: *70154627046320
71
+ description: If you are an online merchant and using samurai.feefighters.com, this
72
+ gem will make your life easy. Integrate with the samurai.feefighters.com portal
73
+ and process transaction.
74
+ email:
86
75
  - graeme@ubergateway.com
87
76
  - derek@ubergateway.com
88
77
  executables: []
89
-
90
78
  extensions: []
91
-
92
79
  extra_rdoc_files: []
93
-
94
- files:
80
+ files:
95
81
  - .gitignore
82
+ - .rvmrc
96
83
  - Gemfile
84
+ - Gemfile.lock
97
85
  - README.markdown
98
86
  - Rakefile
99
87
  - lib/samurai.rb
100
88
  - lib/samurai/base.rb
101
89
  - lib/samurai/cacheable_by_token.rb
102
- - lib/samurai/gateway.rb
103
90
  - lib/samurai/message.rb
104
91
  - lib/samurai/payment_method.rb
92
+ - lib/samurai/processor.rb
105
93
  - lib/samurai/transaction.rb
106
94
  - lib/samurai/version.rb
107
95
  - samurai.gemspec
108
96
  - test/spec/authorization_spec.rb
109
- - test/spec/gateway_spec.rb
97
+ - test/spec/processor_spec.rb
110
98
  - test/spec/purchase_spec.rb
111
99
  - test/spec_helper.rb
112
100
  has_rdoc: true
113
101
  homepage: http://rubygems.org/gems/samurai
114
102
  licenses: []
115
-
116
103
  post_install_message:
117
104
  rdoc_options: []
118
-
119
- require_paths:
105
+ require_paths:
120
106
  - lib
121
- required_ruby_version: !ruby/object:Gem::Requirement
107
+ required_ruby_version: !ruby/object:Gem::Requirement
122
108
  none: false
123
- requirements:
124
- - - ">="
125
- - !ruby/object:Gem::Version
126
- hash: 3
127
- segments:
128
- - 0
129
- version: "0"
130
- required_rubygems_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ! '>='
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
131
114
  none: false
132
- requirements:
133
- - - ">="
134
- - !ruby/object:Gem::Version
135
- hash: 17
136
- segments:
137
- - 1
138
- - 3
139
- - 5
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
140
118
  version: 1.3.5
141
119
  requirements: []
142
-
143
120
  rubyforge_project:
144
- rubygems_version: 1.3.7
121
+ rubygems_version: 1.6.2
145
122
  signing_key:
146
123
  specification_version: 3
147
124
  summary: Integration gem for samurai.feefighters.com
148
125
  test_files: []
149
-