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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb0dd9999cc3d3dc74d84f7f0c612fafe45db3ab
4
- data.tar.gz: e50c6b8cc4f2bfd9b7f3d4491cf4efbf53a4683f
3
+ metadata.gz: 3b0578524f9bf21f4f994979fb9677c08813ebd9
4
+ data.tar.gz: 2802c91ea2ca7d03b58a4dcacceb57c09fab34ad
5
5
  SHA512:
6
- metadata.gz: f599f77b6251d9d4eb19f79f644a95bace9316f0b383b9b566087777c6c0244e0b09db25e16edfac9f4c1c5ab6b4886e025517434d62d7ca11c49c8dcda5d027
7
- data.tar.gz: 4fe76762f6aec970f48467701a48ea7a3c952ad5cd68d577ce0900d025a7c5909273547eba4d55e48972a1aa1dc182682afbf46f82f13abac9ac0c1ae430c2ac
6
+ metadata.gz: 949143ca9303ed891aa30b69a5c444c4a03f416945f95bb5fa35cc7d7720cde80ca1271b6c6608c25f93ad93060fc05ec56713b937e2b8e99d2cc2e332d2f0e1
7
+ data.tar.gz: e7172ac898e01205ee7e9d02ec8dc5c6de921d850b09028308873b8ea08ae478d317cfe12afbf1653fb5ed2c6fcc89f9c8fd1254d5e2e13f2085029d4a37cb58
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ vendor/bundle
@@ -1,10 +1,11 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - 2.1.2
3
+ - 2.1.9
4
+ - 2.2.5
5
5
  - jruby-head
6
6
  - jruby-1.7
7
- - rbx-2.2.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 # cryptic gemspec problem in f444c68
16
- - rvm: rbx-2.2.7
16
+ - rvm: jruby-head # bundle command is not resolved on travis in this time
@@ -1,5 +1,5 @@
1
1
  class WebPay
2
2
  module Mock
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
@@ -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
 
@@ -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', '~> 1.18.0'
21
+ spec.add_dependency 'webmock', '~> 2.0'
22
22
 
23
- spec.add_development_dependency "bundler", "~> 1.3"
24
- spec.add_development_dependency "rake"
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.2.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: 2015-01-28 00:00:00.000000000 Z
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: 1.18.0
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: 1.18.0
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.3'
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.3'
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.2.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