stripe-ruby-mock 2.5.8 → 3.1.0.rc3

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.
Files changed (90) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -1
  3. data/.travis.yml +6 -9
  4. data/CHANGELOG.md +41 -0
  5. data/Gemfile +1 -0
  6. data/README.md +17 -11
  7. data/lib/stripe_mock.rb +8 -0
  8. data/lib/stripe_mock/api/client.rb +1 -1
  9. data/lib/stripe_mock/api/errors.rb +34 -28
  10. data/lib/stripe_mock/api/instance.rb +1 -1
  11. data/lib/stripe_mock/api/webhooks.rb +5 -0
  12. data/lib/stripe_mock/client.rb +2 -1
  13. data/lib/stripe_mock/data.rb +285 -16
  14. data/lib/stripe_mock/data/list.rb +42 -9
  15. data/lib/stripe_mock/instance.rb +18 -4
  16. data/lib/stripe_mock/request_handlers/account_links.rb +15 -0
  17. data/lib/stripe_mock/request_handlers/balance_transactions.rb +2 -2
  18. data/lib/stripe_mock/request_handlers/charges.rb +6 -4
  19. data/lib/stripe_mock/request_handlers/checkout.rb +15 -0
  20. data/lib/stripe_mock/request_handlers/checkout_session.rb +22 -0
  21. data/lib/stripe_mock/request_handlers/customers.rb +35 -18
  22. data/lib/stripe_mock/request_handlers/ephemeral_key.rb +1 -1
  23. data/lib/stripe_mock/request_handlers/express_login_links.rb +15 -0
  24. data/lib/stripe_mock/request_handlers/helpers/coupon_helpers.rb +5 -0
  25. data/lib/stripe_mock/request_handlers/helpers/subscription_helpers.rb +12 -7
  26. data/lib/stripe_mock/request_handlers/helpers/token_helpers.rb +1 -1
  27. data/lib/stripe_mock/request_handlers/invoices.rb +10 -4
  28. data/lib/stripe_mock/request_handlers/payment_intents.rb +182 -0
  29. data/lib/stripe_mock/request_handlers/payment_methods.rb +120 -0
  30. data/lib/stripe_mock/request_handlers/plans.rb +1 -1
  31. data/lib/stripe_mock/request_handlers/prices.rb +44 -0
  32. data/lib/stripe_mock/request_handlers/products.rb +1 -0
  33. data/lib/stripe_mock/request_handlers/setup_intents.rb +93 -0
  34. data/lib/stripe_mock/request_handlers/sources.rb +12 -6
  35. data/lib/stripe_mock/request_handlers/subscriptions.rb +45 -22
  36. data/lib/stripe_mock/request_handlers/tokens.rb +6 -4
  37. data/lib/stripe_mock/request_handlers/validators/param_validators.rb +123 -9
  38. data/lib/stripe_mock/server.rb +2 -2
  39. data/lib/stripe_mock/test_strategies/base.rb +67 -8
  40. data/lib/stripe_mock/test_strategies/live.rb +23 -12
  41. data/lib/stripe_mock/test_strategies/mock.rb +6 -2
  42. data/lib/stripe_mock/version.rb +1 -1
  43. data/lib/stripe_mock/webhook_fixtures/balance.available.json +6 -0
  44. data/lib/stripe_mock/webhook_fixtures/charge.failed.json +166 -38
  45. data/lib/stripe_mock/webhook_fixtures/customer.created.json +1 -0
  46. data/lib/stripe_mock/webhook_fixtures/customer.updated.json +1 -0
  47. data/lib/stripe_mock/webhook_fixtures/payment_intent.payment_failed.json +186 -0
  48. data/lib/stripe_mock/webhook_fixtures/payment_intent.succeeded.json +164 -0
  49. data/lib/stripe_mock/webhook_fixtures/product.created.json +34 -0
  50. data/lib/stripe_mock/webhook_fixtures/product.deleted.json +34 -0
  51. data/lib/stripe_mock/webhook_fixtures/product.updated.json +38 -0
  52. data/spec/instance_spec.rb +10 -12
  53. data/spec/list_spec.rb +38 -0
  54. data/spec/server_spec.rb +6 -3
  55. data/spec/shared_stripe_examples/account_examples.rb +1 -1
  56. data/spec/shared_stripe_examples/account_link_examples.rb +16 -0
  57. data/spec/shared_stripe_examples/balance_examples.rb +6 -0
  58. data/spec/shared_stripe_examples/balance_transaction_examples.rb +3 -3
  59. data/spec/shared_stripe_examples/bank_examples.rb +3 -3
  60. data/spec/shared_stripe_examples/card_examples.rb +4 -4
  61. data/spec/shared_stripe_examples/card_token_examples.rb +17 -21
  62. data/spec/shared_stripe_examples/charge_examples.rb +9 -22
  63. data/spec/shared_stripe_examples/checkout_examples.rb +47 -0
  64. data/spec/shared_stripe_examples/coupon_examples.rb +1 -1
  65. data/spec/shared_stripe_examples/customer_examples.rb +93 -53
  66. data/spec/shared_stripe_examples/dispute_examples.rb +2 -2
  67. data/spec/shared_stripe_examples/error_mock_examples.rb +8 -7
  68. data/spec/shared_stripe_examples/express_login_link_examples.rb +12 -0
  69. data/spec/shared_stripe_examples/external_account_examples.rb +3 -3
  70. data/spec/shared_stripe_examples/invoice_examples.rb +41 -39
  71. data/spec/shared_stripe_examples/invoice_item_examples.rb +1 -1
  72. data/spec/shared_stripe_examples/payment_intent_examples.rb +147 -0
  73. data/spec/shared_stripe_examples/payment_method_examples.rb +449 -0
  74. data/spec/shared_stripe_examples/payout_examples.rb +2 -2
  75. data/spec/shared_stripe_examples/plan_examples.rb +135 -92
  76. data/spec/shared_stripe_examples/price_examples.rb +183 -0
  77. data/spec/shared_stripe_examples/product_examples.rb +147 -0
  78. data/spec/shared_stripe_examples/refund_examples.rb +25 -21
  79. data/spec/shared_stripe_examples/setup_intent_examples.rb +68 -0
  80. data/spec/shared_stripe_examples/subscription_examples.rb +430 -318
  81. data/spec/shared_stripe_examples/subscription_items_examples.rb +3 -2
  82. data/spec/shared_stripe_examples/transfer_examples.rb +6 -6
  83. data/spec/shared_stripe_examples/webhook_event_examples.rb +11 -11
  84. data/spec/spec_helper.rb +7 -4
  85. data/spec/stripe_mock_spec.rb +4 -4
  86. data/spec/support/shared_contexts/stripe_validator_spec.rb +8 -0
  87. data/spec/support/stripe_examples.rb +9 -1
  88. data/stripe-ruby-mock.gemspec +8 -3
  89. metadata +72 -34
  90. data/spec/shared_stripe_examples/product_example.rb +0 -65
@@ -2,8 +2,9 @@ require 'spec_helper'
2
2
 
3
3
  shared_examples 'Subscription Items API' do
4
4
  let(:stripe_helper) { StripeMock.create_test_helper }
5
- let(:plan) { stripe_helper.create_plan }
6
- let(:plan2) { stripe_helper.create_plan(amount: 100, id: 'one_more_1_plan') }
5
+ let(:product) { stripe_helper.create_product(name: 'Silver Product') }
6
+ let(:plan) { stripe_helper.create_plan(product: product.id, id: 'silver_plan') }
7
+ let(:plan2) { stripe_helper.create_plan(amount: 100, id: 'one_more_1_plan', product: product.id) }
7
8
  let(:customer) { Stripe::Customer.create(source: stripe_helper.generate_card_token) }
8
9
  let(:subscription) { Stripe::Subscription.create(customer: customer.id, items: [{ plan: plan.id }]) }
9
10
 
@@ -40,22 +40,22 @@ shared_examples 'Transfer API' do
40
40
  end
41
41
 
42
42
  it "without params retrieves all tripe transfers" do
43
- expect(Stripe::Transfer.all.count).to eq(3)
43
+ expect(Stripe::Transfer.list.count).to eq(3)
44
44
  end
45
45
 
46
46
  it "accepts a limit param" do
47
- expect(Stripe::Transfer.all(limit: 2).count).to eq(2)
47
+ expect(Stripe::Transfer.list(limit: 2).count).to eq(2)
48
48
  end
49
49
 
50
50
  it "filters the search to a specific destination" do
51
51
  d2 = Stripe::Account.create(type: "custom", email: "#{SecureRandom.uuid}@example.com", business_name: "MyCo")
52
52
  Stripe::Transfer.create(amount: "100", currency: "usd", destination: d2.id)
53
53
 
54
- expect(Stripe::Transfer.all(destination: d2.id).count).to eq(1)
54
+ expect(Stripe::Transfer.list(destination: d2.id).count).to eq(1)
55
55
  end
56
56
 
57
57
  it "disallows unknown parameters" do
58
- expect { Stripe::Transfer.all(recipient: "foo") }.to raise_error {|e|
58
+ expect { Stripe::Transfer.list(recipient: "foo") }.to raise_error {|e|
59
59
  expect(e).to be_a Stripe::InvalidRequestError
60
60
  expect(e.param).to eq("recipient")
61
61
  expect(e.message).to eq("Received unknown parameter: recipient")
@@ -104,7 +104,7 @@ shared_examples 'Transfer API' do
104
104
  end
105
105
 
106
106
  it "when amount is not integer", live: true do
107
- dest = Stripe::Account.create(type: "custom", email: "#{SecureRandom.uuid}@example.com", business_name: "Alex Smith")
107
+ dest = Stripe::Account.create(type: "custom", email: "#{SecureRandom.uuid}@example.com", requested_capabilities: ['card_payments', 'platform_payments'])
108
108
  expect { Stripe::Transfer.create(amount: '400.2',
109
109
  currency: 'usd',
110
110
  destination: dest.id,
@@ -116,7 +116,7 @@ shared_examples 'Transfer API' do
116
116
  end
117
117
 
118
118
  it "when amount is negative", live: true do
119
- dest = Stripe::Account.create(type: "custom", email: "#{SecureRandom.uuid}@example.com", business_name: "Alex Smith")
119
+ dest = Stripe::Account.create(type: "custom", email: "#{SecureRandom.uuid}@example.com", requested_capabilities: ['card_payments', 'platform_payments'])
120
120
  expect { Stripe::Transfer.create(amount: '-400',
121
121
  currency: 'usd',
122
122
  destination: dest.id,
@@ -168,7 +168,7 @@ shared_examples 'Webhook Events API' do
168
168
  expect(invoice_item_created_event).to be_a(Stripe::Event)
169
169
  expect(invoice_item_created_event).to_not be_nil
170
170
 
171
- events = Stripe::Event.all
171
+ events = Stripe::Event.list
172
172
 
173
173
  expect(events.count).to eq(5)
174
174
  expect(events.map &:id).to include(customer_created_event.id, plan_created_event.id, coupon_created_event.id, invoice_created_event.id, invoice_item_created_event.id)
@@ -196,7 +196,7 @@ shared_examples 'Webhook Events API' do
196
196
  expect(invoice_item_created_event).to be_a(Stripe::Event)
197
197
  expect(invoice_item_created_event).to_not be_nil
198
198
 
199
- events = Stripe::Event.all(limit: 3)
199
+ events = Stripe::Event.list(limit: 3)
200
200
 
201
201
  expect(events.count).to eq(3)
202
202
  expect(events.map &:id).to include(invoice_item_created_event.id, invoice_created_event.id, coupon_created_event.id)
@@ -204,9 +204,9 @@ shared_examples 'Webhook Events API' do
204
204
  end
205
205
 
206
206
  end
207
-
208
- describe 'Subscription events' do
209
- it "Checks for billing items in customer.subscription.created" do
207
+
208
+ describe 'Subscription events' do
209
+ it "Checks for billing items in customer.subscription.created" do
210
210
  subscription_created_event = StripeMock.mock_webhook_event('customer.subscription.created')
211
211
  expect(subscription_created_event).to be_a(Stripe::Event)
212
212
  expect(subscription_created_event.id).to_not be_nil
@@ -216,7 +216,7 @@ shared_examples 'Webhook Events API' do
216
216
  expect(subscription_created_event.data.object.items.data.first.id).to eq('si_00000000000000')
217
217
  end
218
218
 
219
- it "Checks for billing items in customer.subscription.deleted" do
219
+ it "Checks for billing items in customer.subscription.deleted" do
220
220
  subscription_deleted_event = StripeMock.mock_webhook_event('customer.subscription.deleted')
221
221
  expect(subscription_deleted_event).to be_a(Stripe::Event)
222
222
  expect(subscription_deleted_event.id).to_not be_nil
@@ -225,8 +225,8 @@ shared_examples 'Webhook Events API' do
225
225
  expect(subscription_deleted_event.data.object.items.data.first).to respond_to(:plan)
226
226
  expect(subscription_deleted_event.data.object.items.data.first.id).to eq('si_00000000000000')
227
227
  end
228
-
229
- it "Checks for billing items in customer.subscription.updated" do
228
+
229
+ it "Checks for billing items in customer.subscription.updated" do
230
230
  subscription_updated_event = StripeMock.mock_webhook_event('customer.subscription.updated')
231
231
  expect(subscription_updated_event).to be_a(Stripe::Event)
232
232
  expect(subscription_updated_event.id).to_not be_nil
@@ -235,8 +235,8 @@ shared_examples 'Webhook Events API' do
235
235
  expect(subscription_updated_event.data.object.items.data.first).to respond_to(:plan)
236
236
  expect(subscription_updated_event.data.object.items.data.first.id).to eq('si_00000000000000')
237
237
  end
238
-
239
- it "Checks for billing items in customer.subscription.trial_will_end" do
238
+
239
+ it "Checks for billing items in customer.subscription.trial_will_end" do
240
240
  subscription_trial_will_end_event = StripeMock.mock_webhook_event('customer.subscription.trial_will_end')
241
241
  expect(subscription_trial_will_end_event).to be_a(Stripe::Event)
242
242
  expect(subscription_trial_will_end_event.id).to_not be_nil
@@ -247,7 +247,7 @@ shared_examples 'Webhook Events API' do
247
247
  end
248
248
  end
249
249
 
250
- describe 'Invoices events' do
250
+ describe 'Invoices events' do
251
251
  it "Checks for billing items in invoice.payment_succeeded" do
252
252
  invoice_payment_succeeded = StripeMock.mock_webhook_event('invoice.payment_succeeded')
253
253
  expect(invoice_payment_succeeded).to be_a(Stripe::Event)
data/spec/spec_helper.rb CHANGED
@@ -5,6 +5,9 @@ require 'rspec'
5
5
  require 'stripe'
6
6
  require 'stripe_mock'
7
7
  require 'stripe_mock/server'
8
+ require 'dotenv'
9
+
10
+ Dotenv.load('.env')
8
11
 
9
12
  # Requires supporting ruby files with custom matchers and macros, etc,
10
13
  # in spec/support/ and its subdirectories.
@@ -30,10 +33,10 @@ RSpec.configure do |c|
30
33
  if ENV['IS_TRAVIS']
31
34
  puts "Travis ruby version: #{RUBY_VERSION}"
32
35
  api_key = case RUBY_VERSION
33
- when '2.0.0' then ENV['STRIPE_TEST_SECRET_KEY_A']
34
- when '2.1.10' then ENV['STRIPE_TEST_SECRET_KEY_B']
35
- when '2.2.7' then ENV['STRIPE_TEST_SECRET_KEY_C']
36
- when '2.3.4' then ENV['STRIPE_TEST_SECRET_KEY_D']
36
+ when '2.4.6' then ENV['STRIPE_TEST_SECRET_KEY_A']
37
+ when '2.5.5' then ENV['STRIPE_TEST_SECRET_KEY_B']
38
+ when '2.6.3' then ENV['STRIPE_TEST_SECRET_KEY_C']
39
+ when '2.7.0' then ENV['STRIPE_TEST_SECRET_KEY_D']
37
40
  end
38
41
  else
39
42
  api_key = ENV['STRIPE_TEST_SECRET_KEY']
@@ -18,14 +18,14 @@ describe StripeMock do
18
18
  StripeMock.start
19
19
  Stripe::StripeClient.active_client.execute_request(:xtest, '/', api_key: 'abcde') # no error
20
20
  StripeMock.stop
21
- expect { Stripe::StripeClient.active_client.execute_request(:x, '/', api_key: 'abcde') }.to raise_error ArgumentError
21
+ expect { Stripe::StripeClient.active_client.execute_request(:x, '/', api_key: 'abcde') }.to raise_error Stripe::APIError
22
22
  end
23
23
 
24
24
  it "reverts overriding stripe's execute_request method in other threads" do
25
25
  StripeMock.start
26
26
  Thread.new { Stripe::StripeClient.active_client.execute_request(:xtest, '/', api_key: 'abcde') }.join # no error
27
27
  StripeMock.stop
28
- expect { Thread.new { Stripe::StripeClient.active_client.execute_request(:x, '/', api_key: 'abcde') }.join }.to raise_error ArgumentError
28
+ expect { Thread.new { Stripe::StripeClient.active_client.execute_request(:x, '/', api_key: 'abcde') }.join }.to raise_error Stripe::APIError
29
29
  end
30
30
 
31
31
  it "does not persist data between mock sessions" do
@@ -35,8 +35,8 @@ describe StripeMock do
35
35
  StripeMock.stop
36
36
  StripeMock.start
37
37
 
38
- expect(StripeMock.instance.customers[:x]).to be_nil
39
- expect(StripeMock.instance.customers.keys.length).to eq(0)
38
+ expect(StripeMock.instance.customers[''][:x]).to be_nil
39
+ expect(StripeMock.instance.customers[''].keys.length).to eq(0)
40
40
  StripeMock.stop
41
41
  end
42
42
 
@@ -0,0 +1,8 @@
1
+
2
+ class StripeValidator
3
+ include StripeMock::RequestHandlers::ParamValidators
4
+ end
5
+
6
+ RSpec.shared_context "stripe validator", shared_context: :metadata do
7
+ let(:stripe_validator) { StripeValidator.new }
8
+ end
@@ -5,6 +5,7 @@ end
5
5
 
6
6
  def it_behaves_like_stripe(&block)
7
7
  it_behaves_like 'Account API', &block
8
+ it_behaves_like 'Account Link API', &block
8
9
  it_behaves_like 'Balance API', &block
9
10
  it_behaves_like 'Balance Transaction API', &block
10
11
  it_behaves_like 'Bank Account Token Mocking', &block
@@ -12,6 +13,7 @@ def it_behaves_like_stripe(&block)
12
13
  it_behaves_like 'Card API', &block
13
14
  it_behaves_like 'Charge API', &block
14
15
  it_behaves_like 'Bank API', &block
16
+ it_behaves_like 'Express Login Link API', &block
15
17
  it_behaves_like 'External Account API', &block
16
18
  it_behaves_like 'Coupon API', &block
17
19
  it_behaves_like 'Customer API', &block
@@ -20,18 +22,24 @@ def it_behaves_like_stripe(&block)
20
22
  it_behaves_like 'Invoice API', &block
21
23
  it_behaves_like 'Invoice Item API', &block
22
24
  it_behaves_like 'Plan API', &block
25
+ it_behaves_like 'Price API', &block
23
26
  it_behaves_like 'Product API', &block
24
27
  it_behaves_like 'Recipient API', &block
25
28
  it_behaves_like 'Refund API', &block
26
29
  it_behaves_like 'Transfer API', &block
27
30
  it_behaves_like 'Payout API', &block
31
+ it_behaves_like 'PaymentIntent API', &block
32
+ it_behaves_like 'PaymentMethod API', &block
33
+ it_behaves_like 'SetupIntent API', &block
28
34
  it_behaves_like 'Stripe Error Mocking', &block
29
- it_behaves_like 'Customer Subscriptions', &block
35
+ it_behaves_like 'Customer Subscriptions with plans', &block
36
+ it_behaves_like 'Customer Subscriptions with prices', &block
30
37
  it_behaves_like 'Subscription Items API', &block
31
38
  it_behaves_like 'Webhook Events API', &block
32
39
  it_behaves_like 'Country Spec API', &block
33
40
  it_behaves_like 'EphemeralKey API', &block
34
41
  it_behaves_like 'TaxRate API', &block
42
+ it_behaves_like 'Checkout API', &block
35
43
 
36
44
  # Integration tests
37
45
  it_behaves_like 'Multiple Customer Cards'
@@ -10,18 +10,23 @@ Gem::Specification.new do |gem|
10
10
  gem.license = "MIT"
11
11
  gem.authors = ["Gilbert"]
12
12
  gem.email = "gilbertbgarza@gmail.com"
13
- gem.homepage = "https://github.com/rebelidealist/stripe-ruby-mock"
13
+ gem.homepage = "https://github.com/stripe-ruby-mock/stripe-ruby-mock"
14
+ gem.metadata = {
15
+ "bug_tracker_uri" => "https://github.com/stripe-ruby-mock/stripe-ruby-mock/issues",
16
+ "changelog_uri" => "https://github.com/stripe-ruby-mock/stripe-ruby-mock/blob/master/CHANGELOG.md",
17
+ "source_code_uri" => "https://github.com/stripe-ruby-mock/stripe-ruby-mock"
18
+ }
14
19
 
15
20
  gem.files = `git ls-files`.split($/)
16
21
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
22
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
23
  gem.require_paths = ['lib']
19
24
 
20
- gem.add_dependency 'stripe', '>= 2.0.3'
25
+ gem.add_dependency 'stripe', '> 5', '< 6'
21
26
  gem.add_dependency 'multi_json', '~> 1.0'
22
27
  gem.add_dependency 'dante', '>= 0.2.0'
23
28
 
24
- gem.add_development_dependency 'rspec', '~> 3.1.0'
29
+ gem.add_development_dependency 'rspec', '~> 3.7.0'
25
30
  gem.add_development_dependency 'rubygems-tasks', '~> 0.2'
26
31
  gem.add_development_dependency 'thin', '~> 1.6.4'
27
32
  end
metadata CHANGED
@@ -1,97 +1,103 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe-ruby-mock
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.8
4
+ version: 3.1.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gilbert
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-25 00:00:00.000000000 Z
11
+ date: 2021-07-16 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
- - - '>='
17
+ - - ">"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.3
19
+ version: '5'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '6'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - '>='
27
+ - - ">"
28
+ - !ruby/object:Gem::Version
29
+ version: '5'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: 2.0.3
32
+ version: '6'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: multi_json
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - ~>
37
+ - - "~>"
32
38
  - !ruby/object:Gem::Version
33
39
  version: '1.0'
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
- - - ~>
44
+ - - "~>"
39
45
  - !ruby/object:Gem::Version
40
46
  version: '1.0'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: dante
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
- - - '>='
51
+ - - ">="
46
52
  - !ruby/object:Gem::Version
47
53
  version: 0.2.0
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
- - - '>='
58
+ - - ">="
53
59
  - !ruby/object:Gem::Version
54
60
  version: 0.2.0
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: rspec
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
- - - ~>
65
+ - - "~>"
60
66
  - !ruby/object:Gem::Version
61
- version: 3.1.0
67
+ version: 3.7.0
62
68
  type: :development
63
69
  prerelease: false
64
70
  version_requirements: !ruby/object:Gem::Requirement
65
71
  requirements:
66
- - - ~>
72
+ - - "~>"
67
73
  - !ruby/object:Gem::Version
68
- version: 3.1.0
74
+ version: 3.7.0
69
75
  - !ruby/object:Gem::Dependency
70
76
  name: rubygems-tasks
71
77
  requirement: !ruby/object:Gem::Requirement
72
78
  requirements:
73
- - - ~>
79
+ - - "~>"
74
80
  - !ruby/object:Gem::Version
75
81
  version: '0.2'
76
82
  type: :development
77
83
  prerelease: false
78
84
  version_requirements: !ruby/object:Gem::Requirement
79
85
  requirements:
80
- - - ~>
86
+ - - "~>"
81
87
  - !ruby/object:Gem::Version
82
88
  version: '0.2'
83
89
  - !ruby/object:Gem::Dependency
84
90
  name: thin
85
91
  requirement: !ruby/object:Gem::Requirement
86
92
  requirements:
87
- - - ~>
93
+ - - "~>"
88
94
  - !ruby/object:Gem::Version
89
95
  version: 1.6.4
90
96
  type: :development
91
97
  prerelease: false
92
98
  version_requirements: !ruby/object:Gem::Requirement
93
99
  requirements:
94
- - - ~>
100
+ - - "~>"
95
101
  - !ruby/object:Gem::Version
96
102
  version: 1.6.4
97
103
  description: A drop-in library to test stripe without hitting their servers
@@ -101,10 +107,11 @@ executables:
101
107
  extensions: []
102
108
  extra_rdoc_files: []
103
109
  files:
104
- - .env
105
- - .gitignore
106
- - .rspec
107
- - .travis.yml
110
+ - ".env"
111
+ - ".gitignore"
112
+ - ".rspec"
113
+ - ".travis.yml"
114
+ - CHANGELOG.md
108
115
  - Gemfile
109
116
  - LICENSE.txt
110
117
  - README.md
@@ -135,17 +142,21 @@ files:
135
142
  - lib/stripe_mock/errors/unstarted_state_error.rb
136
143
  - lib/stripe_mock/errors/unsupported_request_error.rb
137
144
  - lib/stripe_mock/instance.rb
145
+ - lib/stripe_mock/request_handlers/account_links.rb
138
146
  - lib/stripe_mock/request_handlers/accounts.rb
139
147
  - lib/stripe_mock/request_handlers/balance.rb
140
148
  - lib/stripe_mock/request_handlers/balance_transactions.rb
141
149
  - lib/stripe_mock/request_handlers/cards.rb
142
150
  - lib/stripe_mock/request_handlers/charges.rb
151
+ - lib/stripe_mock/request_handlers/checkout.rb
152
+ - lib/stripe_mock/request_handlers/checkout_session.rb
143
153
  - lib/stripe_mock/request_handlers/country_spec.rb
144
154
  - lib/stripe_mock/request_handlers/coupons.rb
145
155
  - lib/stripe_mock/request_handlers/customers.rb
146
156
  - lib/stripe_mock/request_handlers/disputes.rb
147
157
  - lib/stripe_mock/request_handlers/ephemeral_key.rb
148
158
  - lib/stripe_mock/request_handlers/events.rb
159
+ - lib/stripe_mock/request_handlers/express_login_links.rb
149
160
  - lib/stripe_mock/request_handlers/external_accounts.rb
150
161
  - lib/stripe_mock/request_handlers/helpers/bank_account_helpers.rb
151
162
  - lib/stripe_mock/request_handlers/helpers/card_helpers.rb
@@ -157,11 +168,15 @@ files:
157
168
  - lib/stripe_mock/request_handlers/invoice_items.rb
158
169
  - lib/stripe_mock/request_handlers/invoices.rb
159
170
  - lib/stripe_mock/request_handlers/orders.rb
171
+ - lib/stripe_mock/request_handlers/payment_intents.rb
172
+ - lib/stripe_mock/request_handlers/payment_methods.rb
160
173
  - lib/stripe_mock/request_handlers/payouts.rb
161
174
  - lib/stripe_mock/request_handlers/plans.rb
175
+ - lib/stripe_mock/request_handlers/prices.rb
162
176
  - lib/stripe_mock/request_handlers/products.rb
163
177
  - lib/stripe_mock/request_handlers/recipients.rb
164
178
  - lib/stripe_mock/request_handlers/refunds.rb
179
+ - lib/stripe_mock/request_handlers/setup_intents.rb
165
180
  - lib/stripe_mock/request_handlers/sources.rb
166
181
  - lib/stripe_mock/request_handlers/subscription_items.rb
167
182
  - lib/stripe_mock/request_handlers/subscriptions.rb
@@ -212,9 +227,14 @@ files:
212
227
  - lib/stripe_mock/webhook_fixtures/invoiceitem.created.json
213
228
  - lib/stripe_mock/webhook_fixtures/invoiceitem.deleted.json
214
229
  - lib/stripe_mock/webhook_fixtures/invoiceitem.updated.json
230
+ - lib/stripe_mock/webhook_fixtures/payment_intent.payment_failed.json
231
+ - lib/stripe_mock/webhook_fixtures/payment_intent.succeeded.json
215
232
  - lib/stripe_mock/webhook_fixtures/plan.created.json
216
233
  - lib/stripe_mock/webhook_fixtures/plan.deleted.json
217
234
  - lib/stripe_mock/webhook_fixtures/plan.updated.json
235
+ - lib/stripe_mock/webhook_fixtures/product.created.json
236
+ - lib/stripe_mock/webhook_fixtures/product.deleted.json
237
+ - lib/stripe_mock/webhook_fixtures/product.updated.json
218
238
  - lib/stripe_mock/webhook_fixtures/transfer.created.json
219
239
  - lib/stripe_mock/webhook_fixtures/transfer.failed.json
220
240
  - lib/stripe_mock/webhook_fixtures/transfer.paid.json
@@ -233,6 +253,7 @@ files:
233
253
  - spec/readme_spec.rb
234
254
  - spec/server_spec.rb
235
255
  - spec/shared_stripe_examples/account_examples.rb
256
+ - spec/shared_stripe_examples/account_link_examples.rb
236
257
  - spec/shared_stripe_examples/balance_examples.rb
237
258
  - spec/shared_stripe_examples/balance_transaction_examples.rb
238
259
  - spec/shared_stripe_examples/bank_examples.rb
@@ -240,21 +261,27 @@ files:
240
261
  - spec/shared_stripe_examples/card_examples.rb
241
262
  - spec/shared_stripe_examples/card_token_examples.rb
242
263
  - spec/shared_stripe_examples/charge_examples.rb
264
+ - spec/shared_stripe_examples/checkout_examples.rb
243
265
  - spec/shared_stripe_examples/country_specs_examples.rb
244
266
  - spec/shared_stripe_examples/coupon_examples.rb
245
267
  - spec/shared_stripe_examples/customer_examples.rb
246
268
  - spec/shared_stripe_examples/dispute_examples.rb
247
269
  - spec/shared_stripe_examples/ephemeral_key_examples.rb
248
270
  - spec/shared_stripe_examples/error_mock_examples.rb
271
+ - spec/shared_stripe_examples/express_login_link_examples.rb
249
272
  - spec/shared_stripe_examples/external_account_examples.rb
250
273
  - spec/shared_stripe_examples/extra_features_examples.rb
251
274
  - spec/shared_stripe_examples/invoice_examples.rb
252
275
  - spec/shared_stripe_examples/invoice_item_examples.rb
276
+ - spec/shared_stripe_examples/payment_intent_examples.rb
277
+ - spec/shared_stripe_examples/payment_method_examples.rb
253
278
  - spec/shared_stripe_examples/payout_examples.rb
254
279
  - spec/shared_stripe_examples/plan_examples.rb
255
- - spec/shared_stripe_examples/product_example.rb
280
+ - spec/shared_stripe_examples/price_examples.rb
281
+ - spec/shared_stripe_examples/product_examples.rb
256
282
  - spec/shared_stripe_examples/recipient_examples.rb
257
283
  - spec/shared_stripe_examples/refund_examples.rb
284
+ - spec/shared_stripe_examples/setup_intent_examples.rb
258
285
  - spec/shared_stripe_examples/subscription_examples.rb
259
286
  - spec/shared_stripe_examples/subscription_items_examples.rb
260
287
  - spec/shared_stripe_examples/tax_rate_examples.rb
@@ -263,31 +290,34 @@ files:
263
290
  - spec/shared_stripe_examples/webhook_event_examples.rb
264
291
  - spec/spec_helper.rb
265
292
  - spec/stripe_mock_spec.rb
293
+ - spec/support/shared_contexts/stripe_validator_spec.rb
266
294
  - spec/support/stripe_examples.rb
267
295
  - spec/util_spec.rb
268
296
  - stripe-ruby-mock.gemspec
269
- homepage: https://github.com/rebelidealist/stripe-ruby-mock
297
+ homepage: https://github.com/stripe-ruby-mock/stripe-ruby-mock
270
298
  licenses:
271
299
  - MIT
272
- metadata: {}
273
- post_install_message:
300
+ metadata:
301
+ bug_tracker_uri: https://github.com/stripe-ruby-mock/stripe-ruby-mock/issues
302
+ changelog_uri: https://github.com/stripe-ruby-mock/stripe-ruby-mock/blob/master/CHANGELOG.md
303
+ source_code_uri: https://github.com/stripe-ruby-mock/stripe-ruby-mock
304
+ post_install_message:
274
305
  rdoc_options: []
275
306
  require_paths:
276
307
  - lib
277
308
  required_ruby_version: !ruby/object:Gem::Requirement
278
309
  requirements:
279
- - - '>='
310
+ - - ">="
280
311
  - !ruby/object:Gem::Version
281
312
  version: '0'
282
313
  required_rubygems_version: !ruby/object:Gem::Requirement
283
314
  requirements:
284
- - - '>='
315
+ - - ">"
285
316
  - !ruby/object:Gem::Version
286
- version: '0'
317
+ version: 1.3.1
287
318
  requirements: []
288
- rubyforge_project:
289
- rubygems_version: 2.0.14.1
290
- signing_key:
319
+ rubygems_version: 3.1.2
320
+ signing_key:
291
321
  specification_version: 4
292
322
  summary: TDD with stripe
293
323
  test_files:
@@ -304,6 +334,7 @@ test_files:
304
334
  - spec/readme_spec.rb
305
335
  - spec/server_spec.rb
306
336
  - spec/shared_stripe_examples/account_examples.rb
337
+ - spec/shared_stripe_examples/account_link_examples.rb
307
338
  - spec/shared_stripe_examples/balance_examples.rb
308
339
  - spec/shared_stripe_examples/balance_transaction_examples.rb
309
340
  - spec/shared_stripe_examples/bank_examples.rb
@@ -311,21 +342,27 @@ test_files:
311
342
  - spec/shared_stripe_examples/card_examples.rb
312
343
  - spec/shared_stripe_examples/card_token_examples.rb
313
344
  - spec/shared_stripe_examples/charge_examples.rb
345
+ - spec/shared_stripe_examples/checkout_examples.rb
314
346
  - spec/shared_stripe_examples/country_specs_examples.rb
315
347
  - spec/shared_stripe_examples/coupon_examples.rb
316
348
  - spec/shared_stripe_examples/customer_examples.rb
317
349
  - spec/shared_stripe_examples/dispute_examples.rb
318
350
  - spec/shared_stripe_examples/ephemeral_key_examples.rb
319
351
  - spec/shared_stripe_examples/error_mock_examples.rb
352
+ - spec/shared_stripe_examples/express_login_link_examples.rb
320
353
  - spec/shared_stripe_examples/external_account_examples.rb
321
354
  - spec/shared_stripe_examples/extra_features_examples.rb
322
355
  - spec/shared_stripe_examples/invoice_examples.rb
323
356
  - spec/shared_stripe_examples/invoice_item_examples.rb
357
+ - spec/shared_stripe_examples/payment_intent_examples.rb
358
+ - spec/shared_stripe_examples/payment_method_examples.rb
324
359
  - spec/shared_stripe_examples/payout_examples.rb
325
360
  - spec/shared_stripe_examples/plan_examples.rb
326
- - spec/shared_stripe_examples/product_example.rb
361
+ - spec/shared_stripe_examples/price_examples.rb
362
+ - spec/shared_stripe_examples/product_examples.rb
327
363
  - spec/shared_stripe_examples/recipient_examples.rb
328
364
  - spec/shared_stripe_examples/refund_examples.rb
365
+ - spec/shared_stripe_examples/setup_intent_examples.rb
329
366
  - spec/shared_stripe_examples/subscription_examples.rb
330
367
  - spec/shared_stripe_examples/subscription_items_examples.rb
331
368
  - spec/shared_stripe_examples/tax_rate_examples.rb
@@ -334,5 +371,6 @@ test_files:
334
371
  - spec/shared_stripe_examples/webhook_event_examples.rb
335
372
  - spec/spec_helper.rb
336
373
  - spec/stripe_mock_spec.rb
374
+ - spec/support/shared_contexts/stripe_validator_spec.rb
337
375
  - spec/support/stripe_examples.rb
338
376
  - spec/util_spec.rb