webpay-mock 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +5 -5
- data/lib/webpay/mock/version.rb +1 -1
- data/lib/webpay/mock/webmock_wrapper.rb +1 -1
- data/spec/webmock_wrapper_spec.rb +3 -3
- data/webpay-mock.gemspec +3 -3
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b0578524f9bf21f4f994979fb9677c08813ebd9
|
4
|
+
data.tar.gz: 2802c91ea2ca7d03b58a4dcacceb57c09fab34ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 949143ca9303ed891aa30b69a5c444c4a03f416945f95bb5fa35cc7d7720cde80ca1271b6c6608c25f93ad93060fc05ec56713b937e2b8e99d2cc2e332d2f0e1
|
7
|
+
data.tar.gz: e7172ac898e01205ee7e9d02ec8dc5c6de921d850b09028308873b8ea08ae478d317cfe12afbf1653fb5ed2c6fcc89f9c8fd1254d5e2e13f2085029d4a37cb58
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 1.9
|
4
|
-
- 2.
|
3
|
+
- 2.1.9
|
4
|
+
- 2.2.5
|
5
5
|
- jruby-head
|
6
6
|
- jruby-1.7
|
7
|
-
|
7
|
+
before_install:
|
8
|
+
- gem update bundler
|
8
9
|
script: "bundle exec rake"
|
9
10
|
notifications:
|
10
11
|
hipchat:
|
@@ -12,5 +13,4 @@ notifications:
|
|
12
13
|
secure: ykLsXlebzR9nnb+9ttpCySOg2hE4Ve699s2Owd7YahcZyVNxnG4q1P8Mps4jFlOgPNQ6JwkcB4A6QLavavtJlX7vXTDj1GD+zVAScjbtN/6ZV94S2eHA7hBUXHUwBmH0Cw5glrFoPEDBsQdOYbrOrJKwFNEhUTHdY0SRgEXv5Wo=
|
13
14
|
matrix:
|
14
15
|
allow_failures:
|
15
|
-
- rvm: jruby-head #
|
16
|
-
- rvm: rbx-2.2.7
|
16
|
+
- rvm: jruby-head # bundle command is not resolved on travis in this time
|
data/lib/webpay/mock/version.rb
CHANGED
@@ -123,7 +123,7 @@ module WebPay::Mock::WebMockWrapper
|
|
123
123
|
{ body: response.to_json }
|
124
124
|
end
|
125
125
|
|
126
|
-
stub_request(method, base_url + path).with(query: hash_including({})).with(params).to_return(spec)
|
126
|
+
stub_request(method, base_url + path).with(query: hash_including({})).with(body: params).to_return(spec)
|
127
127
|
|
128
128
|
JSON.parse(spec[:body])
|
129
129
|
end
|
@@ -56,7 +56,7 @@ describe WebPay::Mock::WebMockWrapper do
|
|
56
56
|
describe 'refund' do
|
57
57
|
let(:id) { 'ch_xxxxxxxxx' }
|
58
58
|
let(:data) { charge_from({amount: 5000}, id: id) }
|
59
|
-
let!(:refunded) { webpay_stub(:charges, :refund, params: { 'amount' => data['amount'] }, base: data) }
|
59
|
+
let!(:refunded) { webpay_stub(:charges, :refund, body: { params: { 'amount' => data['amount'] } }, base: data) }
|
60
60
|
specify { expect(webpay.charge.refund(id).refunded).to eq true }
|
61
61
|
end
|
62
62
|
|
@@ -121,7 +121,7 @@ describe WebPay::Mock::WebMockWrapper do
|
|
121
121
|
describe 'recursios' do
|
122
122
|
describe 'create' do
|
123
123
|
let(:params) { { amount: 1000, currency: 'jpy', customer: 'cus_xxxxxxxxx', period: 'month', description: 'test charge' } }
|
124
|
-
let!(:response) { webpay_stub(:recursion, :create, params: params) }
|
124
|
+
let!(:response) { webpay_stub(:recursion, :create, body: { params: params }) }
|
125
125
|
specify { expect(webpay.recursion.create({}).id).to eq response['id'] }
|
126
126
|
end
|
127
127
|
|
@@ -161,7 +161,7 @@ describe WebPay::Mock::WebMockWrapper do
|
|
161
161
|
:exp_year=>"2019",
|
162
162
|
:cvc=>"123",
|
163
163
|
:name=>"KIYOKI IPPYO"} }
|
164
|
-
let!(:response) { webpay_stub(:tokens, :create, params: card_params) }
|
164
|
+
let!(:response) { webpay_stub(:tokens, :create, body: { params: card_params }) }
|
165
165
|
specify { expect(webpay.token.create(card: card_params).id).to eq response['id'] }
|
166
166
|
end
|
167
167
|
|
data/webpay-mock.gemspec
CHANGED
@@ -18,10 +18,10 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency 'webmock', '~>
|
21
|
+
spec.add_dependency 'webmock', '~> 2.0'
|
22
22
|
|
23
|
-
spec.add_development_dependency
|
24
|
-
spec.add_development_dependency
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.12'
|
24
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
25
25
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
26
26
|
spec.add_development_dependency 'webpay', '~> 3.0'
|
27
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webpay-mock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- webpay
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-05-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: webmock
|
@@ -17,42 +17,42 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: '2.0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
27
|
+
version: '2.0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: bundler
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '1.
|
34
|
+
version: '1.12'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '1.
|
41
|
+
version: '1.12'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rake
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - "
|
46
|
+
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '0'
|
48
|
+
version: '10.0'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- - "
|
53
|
+
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '0'
|
55
|
+
version: '10.0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rspec
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
142
|
rubyforge_project:
|
143
|
-
rubygems_version: 2.
|
143
|
+
rubygems_version: 2.4.5
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: Dummy response generator and wrapper of webmock gem for WebPay
|