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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3dd0f0101a16fc924301d9374f79579b7e426323
4
- data.tar.gz: 94beb0af3d84929338750441545b4294c4d45588
3
+ metadata.gz: e4c0ff6df4848d65580922985ba4e1710d8b7fdd
4
+ data.tar.gz: 9842f1034a25ec066a792a00e34f22ac3e467469
5
5
  SHA512:
6
- metadata.gz: 7c89ef3f1707be0df53f962fa8d2d600a42b3648fb7f5aff34dd419539f15d76442956c251bb4bdbf87a54bfa838a795f741e1e1ed6b384011889401a945de50
7
- data.tar.gz: 843f10490a329c0d055d6ea469cce41b70bf4c2a8a8e6a0607a062df04097a0e90993dc9f2cdac9c51015d7f7ab32b5022ee01d2cc55422ebc4e36e4e6d213e4
6
+ metadata.gz: 781ac862b06b305a7b05a5bf1dfb5b69c922b9b7be1f2ad95c5683a524c6907888dc831436aacb0c8a05a8f3213dde49c965e2091b630776f656e1258890e707
7
+ data.tar.gz: fa30481e23230091c0c39df2eb8254e5fc1749f2963e10ffcfd2f492638f59f24ca9a5c45c6537546d031ae818d762decc70498c6e711aa23e24a052ed94b22e
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.8.5
1
+ 1.8.6
@@ -51,7 +51,18 @@ module PaymentTest
51
51
  test_prop.value == 'BEATRIX'
52
52
  @api_beatrix.send method, *args
53
53
  else
54
- @api_control.sleep_if_required properties
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.5</version>
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.5
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-16 00:00:00.000000000 Z
11
+ date: 2014-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: killbill