killbill-payment-test 4.1.0 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/payment_test/application.rb +7 -1
- data/lib/payment_test/state.rb +13 -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: 3cc70313aeca0488dfcd2baebbdfc93f8a7dc10c
|
4
|
+
data.tar.gz: bee06cf3e18926a86fcd80869614601b313e7f74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b0ef6383f982beec8af57dba4cd5cbce8e20672cf01343b33ffae8d76aefeee56959fbc3001bf064476dc7df155cbd3696bf255e279a119bd7f86e357dca85f
|
7
|
+
data.tar.gz: 9efbca1dd98ad972c01a30fe450db3de2ec31bb47f7799a0baf278bf8a83386ca9cc40658e62964704c87234eadc03004e769558cedc1752fe3da29a31fe0277
|
@@ -14,9 +14,15 @@ helpers do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
|
17
|
+
get '/plugins/killbill-payment-test/status', :provides => 'json' do
|
18
|
+
current_state = state.status
|
19
|
+
# Extract non nil value -- basically the one that are set
|
20
|
+
result = current_state.select {|key, value| value}
|
21
|
+
result.to_json
|
22
|
+
end
|
17
23
|
|
18
|
-
post '/plugins/killbill-payment-test/configure', :provides => 'json' do
|
19
24
|
|
25
|
+
post '/plugins/killbill-payment-test/configure', :provides => 'json' do
|
20
26
|
|
21
27
|
begin
|
22
28
|
data = JSON.parse request.body.read
|
data/lib/payment_test/state.rb
CHANGED
@@ -51,6 +51,18 @@ module PaymentTest
|
|
51
51
|
log_current_state
|
52
52
|
end
|
53
53
|
|
54
|
+
def status
|
55
|
+
{
|
56
|
+
:always_return_plugin_status_error => @always_return_plugin_status_error,
|
57
|
+
:always_return_plugin_status_pending => @always_return_plugin_status_pending,
|
58
|
+
:always_return_plugin_status_canceled => @always_return_plugin_status_canceled,
|
59
|
+
:always_throw => @always_throw,
|
60
|
+
:always_return_nil => @always_return_nil,
|
61
|
+
:sleep_time_sec => @sleep_time_sec,
|
62
|
+
:methods => @methods
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
54
66
|
def reset_configuration
|
55
67
|
@always_return_plugin_status_error = false
|
56
68
|
@always_return_plugin_status_pending = false
|
@@ -103,7 +115,7 @@ module PaymentTest
|
|
103
115
|
private
|
104
116
|
|
105
117
|
def configure_methods(methods=nil)
|
106
|
-
@methods = methods.split(",")
|
118
|
+
@methods = methods.split(",") unless methods.nil?
|
107
119
|
end
|
108
120
|
|
109
121
|
def is_for_method(method)
|
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: 4.
|
4
|
+
version: 4.2.0
|
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: 2017-06
|
11
|
+
date: 2017-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|