killbill-payment-test 1.8.5 → 1.8.6
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 +4 -4
- data/VERSION +1 -1
- data/lib/payment_test/api.rb +12 -1
- data/lib/payment_test/api_control.rb +10 -0
- data/pom.xml +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e4c0ff6df4848d65580922985ba4e1710d8b7fdd
|
|
4
|
+
data.tar.gz: 9842f1034a25ec066a792a00e34f22ac3e467469
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 781ac862b06b305a7b05a5bf1dfb5b69c922b9b7be1f2ad95c5683a524c6907888dc831436aacb0c8a05a8f3213dde49c965e2091b630776f656e1258890e707
|
|
7
|
+
data.tar.gz: fa30481e23230091c0c39df2eb8254e5fc1749f2963e10ffcfd2f492638f59f24ca9a5c45c6537546d031ae818d762decc70498c6e711aa23e24a052ed94b22e
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.8.
|
|
1
|
+
1.8.6
|
data/lib/payment_test/api.rb
CHANGED
|
@@ -51,7 +51,18 @@ module PaymentTest
|
|
|
51
51
|
test_prop.value == 'BEATRIX'
|
|
52
52
|
@api_beatrix.send method, *args
|
|
53
53
|
else
|
|
54
|
-
|
|
54
|
+
# Check if we need to throw
|
|
55
|
+
@api_control.throw_exception_if_required(properties)
|
|
56
|
+
|
|
57
|
+
# Check if we should return nil
|
|
58
|
+
if @api_control.should_return_nil(properties)
|
|
59
|
+
return nil
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Check if we need to sleep
|
|
63
|
+
@api_control.sleep_if_required(properties)
|
|
64
|
+
|
|
65
|
+
# Finally make the call
|
|
55
66
|
@api_control.send method, *args
|
|
56
67
|
end
|
|
57
68
|
end
|
|
@@ -96,6 +96,16 @@ module PaymentTest
|
|
|
96
96
|
# Noop
|
|
97
97
|
end
|
|
98
98
|
|
|
99
|
+
def throw_exception_if_required(properties)
|
|
100
|
+
exception = PluginPropertyUtils::get_property_or_nil(properties, 'THROW_EXCEPTION')
|
|
101
|
+
if exception
|
|
102
|
+
raise RuntimeError.new("throwing cause #{exception}")
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def should_return_nil(properties)
|
|
107
|
+
PluginPropertyUtils::get_property_or_nil(properties, 'RETURN_NIL')
|
|
108
|
+
end
|
|
99
109
|
|
|
100
110
|
def sleep_if_required(properties)
|
|
101
111
|
sleep_prop = PluginPropertyUtils::get_property_or_nil(properties, 'SLEEP_TIME_SEC')
|
data/pom.xml
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<groupId>org.kill-bill.billing.plugin.ruby</groupId>
|
|
28
28
|
<artifactId>payment-test-plugin</artifactId>
|
|
29
29
|
<packaging>pom</packaging>
|
|
30
|
-
<version>1.8.
|
|
30
|
+
<version>1.8.6</version>
|
|
31
31
|
<name>payment-test-plugin</name>
|
|
32
32
|
<description></description>
|
|
33
33
|
<scm>
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: killbill-payment-test
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.8.
|
|
4
|
+
version: 1.8.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kill Bill core team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-07-
|
|
11
|
+
date: 2014-07-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: killbill
|