pin_up 0.6.4 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/pin_up.gemspec +2 -2
- data/spec/errors_spec.rb +4 -4
- data/spec/spec_helper.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38a45a08e7f95c006b87f54a8dfc86aa4818c008
|
4
|
+
data.tar.gz: 1ebca209d7f4614eab4c4db7b4a4e189bf54ea5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82b565cea06f3f81636a7c118c590a472927aceb1feeeeddf7e52131c4a90826f797ba4cd5c8e4e61ab1b594e82c2677ba81d5b93330985cfc6b6c863f6edf05
|
7
|
+
data.tar.gz: 26485aef5877ec62ca096d426a4cd155c7f2948592d61ed9f6b8f39e45e9e80e35c7378955a81f279899d528a8474a194a9eb7b660aec2f0bddcbd8abc1afe26
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.7.0
|
data/pin_up.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: pin_up 0.
|
5
|
+
# stub: pin_up 0.7.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "pin_up"
|
9
|
-
s.version = "0.
|
9
|
+
s.version = "0.7.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.authors = ["Daniel Nitsikopoulos"]
|
data/spec/errors_spec.rb
CHANGED
@@ -11,7 +11,7 @@ describe "Errors", :vcr, class: Pin::PinError do
|
|
11
11
|
|
12
12
|
it "should raise a 422 error when trying to update missing a param" do
|
13
13
|
options = {email: "dNitza@gmail.com", card: {address_line1: "12345 Fake Street", expiry_month: "05", expiry_year: "2014", cvc: "123", name: "Daniel Nitsikopoulos", address_city: "Melbourne", address_postcode: "1234", address_state: "VIC", address_country: "Australia"}}
|
14
|
-
expect{Pin::Customer.update('cus_sRtAD2Am-goZoLg1K-HVpA', options)}.to raise_error(Pin::InvalidResource, "card_number_invalid: Card number
|
14
|
+
expect{Pin::Customer.update('cus_sRtAD2Am-goZoLg1K-HVpA', options)}.to raise_error(Pin::InvalidResource, "card_number_invalid: Card number can't be blank")
|
15
15
|
end
|
16
16
|
|
17
17
|
it "should raise a 422 error when trying to make a payment with an expired card" do
|
@@ -27,14 +27,14 @@ describe "Errors", :vcr, class: Pin::PinError do
|
|
27
27
|
address_state: "WA",
|
28
28
|
address_country: "Australia",
|
29
29
|
}}
|
30
|
-
expect{Pin::Charges.create(options)}.to raise_error(Pin::InvalidResource, "
|
30
|
+
expect{Pin::Charges.create(options)}.to raise_error(Pin::InvalidResource, "card_expiry_month_invalid: Card expiry month is expiredcard_expiry_year_invalid: Card expiry year is expired")
|
31
31
|
end
|
32
32
|
|
33
33
|
it "should raise a 400 error when trying to make a payment and a valid card gets declined" do
|
34
34
|
options = {email: "dNitza@gmail.com", description: "A new charge from testing Pin gem", amount: "400", currency: "AUD", ip_address: "127.0.0.1", card: {
|
35
35
|
number: "5560000000000001",
|
36
36
|
expiry_month: "05",
|
37
|
-
expiry_year: "
|
37
|
+
expiry_year: "2018",
|
38
38
|
cvc: "123",
|
39
39
|
name: "Roland Robot",
|
40
40
|
address_line1: "42 Sevenoaks St",
|
@@ -59,7 +59,7 @@ describe "Errors", :vcr, class: Pin::PinError do
|
|
59
59
|
address_state: "WA",
|
60
60
|
address_country: "Australia",
|
61
61
|
}}
|
62
|
-
expect{Pin::Charges.create(options)}.to raise_error(Pin::InvalidResource, "card_number_invalid: Card number is not a valid
|
62
|
+
expect{Pin::Charges.create(options)}.to raise_error(Pin::InvalidResource, "card_number_invalid: Card number is not a valid Pin Payments test card number. See https://pin.net.au/docs/api/test-cards")
|
63
63
|
end
|
64
64
|
|
65
65
|
it "Should raise a ResourceNotFound error when can't find customer" do
|
data/spec/spec_helper.rb
CHANGED
@@ -11,7 +11,7 @@ require "net/https"
|
|
11
11
|
require "uri"
|
12
12
|
|
13
13
|
## Uncomment to load in a .yml with your pin key
|
14
|
-
|
14
|
+
ENV.update YAML.load(File.read(File.expand_path("../test_data.yml", __FILE__)))
|
15
15
|
|
16
16
|
# require pin_up gem
|
17
17
|
require 'pin_up'
|