atpay_tokens 2.1.0 → 2.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b287a2d69504b635b56368a27f7c2c9c2b6d6d4
4
- data.tar.gz: 294d9c0723c657eb277d246aa2a79f238ec7a4b4
3
+ metadata.gz: 36209ceb2f0855fd8ec653e4b0151581e56c5bb9
4
+ data.tar.gz: 5e58156410881136c202b92d1460cd3e1e629d2f
5
5
  SHA512:
6
- metadata.gz: 257ed967ee374de94b602d2d598d72bac190eb64c2d7612a0bf5b1eb8627ad8c1e5d0cd0229a21252d9e714cfb6e7c12aa01d4bc29efbb82748a5b8bbebcd3a8
7
- data.tar.gz: 633db21ac4d51830a0d10019fcb74937104b4151beb60a98e4f4d58268b500d66d6098073cfad2cbbb42b1e2e0fdcb64802f36bbc7b731a51a782fad11642af5
6
+ metadata.gz: 7f60e96f28ae5eaeab9177c0ed5922102a26e668a74759f2c3a9ca67ea3f51214bd2f33cf9a943e046ad1bfbde5e0969a60ba750708443f123e8dc7130c46df0
7
+ data.tar.gz: dc321d24027d70d2154f08f595d49cc19a4cd7a0274b838fe77fbc7ad09fe6c6bda9cd611c93358af8116b69213a8cde88805486c8b4e5832a609e99f6a2d531
data/README.md CHANGED
@@ -24,7 +24,7 @@ Add the 'atpay_tokens' gem to your Gemfile:
24
24
  ```ruby
25
25
  #Gemfile
26
26
 
27
- gem 'atpay_tokens', :github => "atpay/atpay-client"
27
+ gem 'atpay_tokens'
28
28
  ```
29
29
 
30
30
  ## Configuration
data/atpay_tokens.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'atpay_tokens'
3
- s.version = '2.1.0'
4
- s.date = '2013-08-12'
3
+ s.version = '2.1.1'
4
+ s.date = '2013-09-19'
5
5
  s.summary = "@Pay Token Generator"
6
6
  s.description = "Client interface for the @Pay API, key generation for performance optimization"
7
7
  s.authors = ["James Kassemi", "Glen Holcomb"]
@@ -159,7 +159,7 @@ module AtPay
159
159
  end
160
160
 
161
161
  def parse_amount!
162
- @amount = @payload.slice!(0, 4).unpack("g")[0]
162
+ @amount = @payload.slice!(0, 4).unpack("g")[0].round(2)
163
163
  end
164
164
 
165
165
  def parse_expiration!
@@ -146,5 +146,17 @@ describe AtPay::Tokenator do
146
146
  AtPay::Tokenator.find_by_checksum(token)
147
147
  end
148
148
  end
149
+
150
+ describe "Amounts" do
151
+ let(:site) { AtPay::Tokenator.new token(33.33, [:site_token, ip, headers], {card: 'OGQ3OWE0OWNhMFFTL4mMpQA='}), build_session }
152
+
153
+ it "should decode into an amount at 33.33" do
154
+ site.header
155
+ site.browser_data(Base64.decode64(public_key))
156
+ site.body(Base64.decode64(public_key))
157
+
158
+ site.amount.should eq(33.33)
159
+ end
160
+ end
149
161
  end
150
- end
162
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atpay_tokens
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Kassemi
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-12 00:00:00.000000000 Z
12
+ date: 2013-09-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi