stripe-ruby-mock 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/Gemfile +5 -0
  4. data/README.md +1 -1
  5. data/lib/stripe_mock/api/errors.rb +2 -1
  6. data/lib/stripe_mock/api/instance.rb +10 -0
  7. data/lib/stripe_mock/api/webhooks.rb +3 -0
  8. data/lib/stripe_mock/data.rb +203 -21
  9. data/lib/stripe_mock/instance.rb +14 -3
  10. data/lib/stripe_mock/request_handlers/accounts.rb +7 -0
  11. data/lib/stripe_mock/request_handlers/charges.rb +29 -21
  12. data/lib/stripe_mock/request_handlers/country_spec.rb +22 -0
  13. data/lib/stripe_mock/request_handlers/customers.rb +3 -3
  14. data/lib/stripe_mock/request_handlers/helpers/subscription_helpers.rb +5 -2
  15. data/lib/stripe_mock/request_handlers/helpers/token_helpers.rb +2 -1
  16. data/lib/stripe_mock/request_handlers/recipients.rb +12 -0
  17. data/lib/stripe_mock/request_handlers/refunds.rb +88 -0
  18. data/lib/stripe_mock/request_handlers/subscriptions.rb +48 -23
  19. data/lib/stripe_mock/request_handlers/validators/param_validators.rb +5 -0
  20. data/lib/stripe_mock/test_strategies/base.rb +7 -4
  21. data/lib/stripe_mock/version.rb +1 -1
  22. data/lib/stripe_mock/webhook_fixtures/account.external_account.created.json +27 -0
  23. data/lib/stripe_mock/webhook_fixtures/account.external_account.deleted.json +27 -0
  24. data/lib/stripe_mock/webhook_fixtures/account.external_account.updated.json +27 -0
  25. data/lib/stripe_mock.rb +2 -0
  26. data/spec/api/instance_spec.rb +30 -0
  27. data/spec/list_spec.rb +11 -7
  28. data/spec/server_spec.rb +1 -1
  29. data/spec/shared_stripe_examples/account_examples.rb +11 -0
  30. data/spec/shared_stripe_examples/card_examples.rb +13 -2
  31. data/spec/shared_stripe_examples/card_token_examples.rb +1 -0
  32. data/spec/shared_stripe_examples/charge_examples.rb +90 -14
  33. data/spec/shared_stripe_examples/country_specs_examples.rb +18 -0
  34. data/spec/shared_stripe_examples/customer_examples.rb +38 -0
  35. data/spec/shared_stripe_examples/error_mock_examples.rb +12 -2
  36. data/spec/shared_stripe_examples/plan_examples.rb +19 -0
  37. data/spec/shared_stripe_examples/recipient_examples.rb +7 -1
  38. data/spec/shared_stripe_examples/refund_examples.rb +447 -84
  39. data/spec/shared_stripe_examples/subscription_examples.rb +28 -0
  40. data/spec/support/stripe_examples.rb +1 -0
  41. data/stripe-ruby-mock.gemspec +3 -3
  42. metadata +24 -21
metadata CHANGED
@@ -1,49 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe-ruby-mock
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gilbert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-24 00:00:00.000000000 Z
11
+ date: 2017-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: stripe
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
18
- - !ruby/object:Gem::Version
19
- version: 1.31.0
20
- - - <=
17
+ - - ~>
21
18
  - !ruby/object:Gem::Version
22
- version: '1.43'
19
+ version: '1.31'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - '>='
28
- - !ruby/object:Gem::Version
29
- version: 1.31.0
30
- - - <=
24
+ - - ~>
31
25
  - !ruby/object:Gem::Version
32
- version: '1.43'
26
+ version: '1.31'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: multi_json
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
- - - '>='
31
+ - - ~>
38
32
  - !ruby/object:Gem::Version
39
- version: 1.0.0
33
+ version: '1.0'
40
34
  type: :runtime
41
35
  prerelease: false
42
36
  version_requirements: !ruby/object:Gem::Requirement
43
37
  requirements:
44
- - - '>='
38
+ - - ~>
45
39
  - !ruby/object:Gem::Version
46
- version: 1.0.0
40
+ version: '1.0'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: dante
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -90,16 +84,16 @@ dependencies:
90
84
  name: thin
91
85
  requirement: !ruby/object:Gem::Requirement
92
86
  requirements:
93
- - - '>='
87
+ - - ~>
94
88
  - !ruby/object:Gem::Version
95
- version: '0'
89
+ version: 1.6.4
96
90
  type: :development
97
91
  prerelease: false
98
92
  version_requirements: !ruby/object:Gem::Requirement
99
93
  requirements:
100
- - - '>='
94
+ - - ~>
101
95
  - !ruby/object:Gem::Version
102
- version: '0'
96
+ version: 1.6.4
103
97
  description: A drop-in library to test stripe without hitting their servers
104
98
  email: gilbertbgarza@gmail.com
105
99
  executables:
@@ -143,6 +137,7 @@ files:
143
137
  - lib/stripe_mock/request_handlers/balance_transactions.rb
144
138
  - lib/stripe_mock/request_handlers/cards.rb
145
139
  - lib/stripe_mock/request_handlers/charges.rb
140
+ - lib/stripe_mock/request_handlers/country_spec.rb
146
141
  - lib/stripe_mock/request_handlers/coupons.rb
147
142
  - lib/stripe_mock/request_handlers/customers.rb
148
143
  - lib/stripe_mock/request_handlers/disputes.rb
@@ -158,6 +153,7 @@ files:
158
153
  - lib/stripe_mock/request_handlers/orders.rb
159
154
  - lib/stripe_mock/request_handlers/plans.rb
160
155
  - lib/stripe_mock/request_handlers/recipients.rb
156
+ - lib/stripe_mock/request_handlers/refunds.rb
161
157
  - lib/stripe_mock/request_handlers/sources.rb
162
158
  - lib/stripe_mock/request_handlers/subscriptions.rb
163
159
  - lib/stripe_mock/request_handlers/tokens.rb
@@ -170,6 +166,9 @@ files:
170
166
  - lib/stripe_mock/util.rb
171
167
  - lib/stripe_mock/version.rb
172
168
  - lib/stripe_mock/webhook_fixtures/account.application.deauthorized.json
169
+ - lib/stripe_mock/webhook_fixtures/account.external_account.created.json
170
+ - lib/stripe_mock/webhook_fixtures/account.external_account.deleted.json
171
+ - lib/stripe_mock/webhook_fixtures/account.external_account.updated.json
173
172
  - lib/stripe_mock/webhook_fixtures/account.updated.json
174
173
  - lib/stripe_mock/webhook_fixtures/balance.available.json
175
174
  - lib/stripe_mock/webhook_fixtures/charge.dispute.closed.json
@@ -209,6 +208,7 @@ files:
209
208
  - lib/stripe_mock/webhook_fixtures/transfer.updated.json
210
209
  - lib/trollop.rb
211
210
  - spec/_dummy/webhooks/dummy.event.json
211
+ - spec/api/instance_spec.rb
212
212
  - spec/fixtures/create_refund.yml
213
213
  - spec/fixtures/stripe_webhooks/account.updated.json
214
214
  - spec/fixtures/stripe_webhooks/custom.account.updated.json
@@ -226,6 +226,7 @@ files:
226
226
  - spec/shared_stripe_examples/card_examples.rb
227
227
  - spec/shared_stripe_examples/card_token_examples.rb
228
228
  - spec/shared_stripe_examples/charge_examples.rb
229
+ - spec/shared_stripe_examples/country_specs_examples.rb
229
230
  - spec/shared_stripe_examples/coupon_examples.rb
230
231
  - spec/shared_stripe_examples/customer_examples.rb
231
232
  - spec/shared_stripe_examples/dispute_examples.rb
@@ -265,12 +266,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
265
266
  version: '0'
266
267
  requirements: []
267
268
  rubyforge_project:
268
- rubygems_version: 2.4.6
269
+ rubygems_version: 2.0.14.1
269
270
  signing_key:
270
271
  specification_version: 4
271
272
  summary: TDD with stripe
272
273
  test_files:
273
274
  - spec/_dummy/webhooks/dummy.event.json
275
+ - spec/api/instance_spec.rb
274
276
  - spec/fixtures/create_refund.yml
275
277
  - spec/fixtures/stripe_webhooks/account.updated.json
276
278
  - spec/fixtures/stripe_webhooks/custom.account.updated.json
@@ -288,6 +290,7 @@ test_files:
288
290
  - spec/shared_stripe_examples/card_examples.rb
289
291
  - spec/shared_stripe_examples/card_token_examples.rb
290
292
  - spec/shared_stripe_examples/charge_examples.rb
293
+ - spec/shared_stripe_examples/country_specs_examples.rb
291
294
  - spec/shared_stripe_examples/coupon_examples.rb
292
295
  - spec/shared_stripe_examples/customer_examples.rb
293
296
  - spec/shared_stripe_examples/dispute_examples.rb