payola-payments 1.1.4 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +5 -13
  2. data/app/assets/javascripts/payola/form.js +1 -0
  3. data/app/assets/javascripts/payola/subscription_form.js +74 -0
  4. data/app/controllers/payola/application_controller.rb +1 -2
  5. data/app/controllers/payola/subscriptions_controller.rb +94 -0
  6. data/app/models/concerns/payola/plan.rb +50 -0
  7. data/app/models/payola/subscription.rb +161 -0
  8. data/app/services/payola/cancel_subscription.rb +12 -0
  9. data/app/services/payola/change_subscription_plan.rb +29 -0
  10. data/app/services/payola/create_plan.rb +17 -0
  11. data/app/services/payola/create_subscription.rb +20 -0
  12. data/app/services/payola/invoice_failed.rb +42 -0
  13. data/app/services/payola/invoice_paid.rb +43 -0
  14. data/app/services/payola/process_subscription.rb +7 -0
  15. data/app/services/payola/start_subscription.rb +41 -0
  16. data/app/services/payola/sync_subscription.rb +11 -0
  17. data/app/services/payola/update_card.rb +27 -0
  18. data/app/services/payola/update_subscription.rb +11 -0
  19. data/app/views/payola/subscriptions/_cancel.html.erb +10 -0
  20. data/app/views/payola/subscriptions/_change_plan.html.erb +10 -0
  21. data/config/routes.rb +7 -0
  22. data/db/migrate/20141105043439_create_payola_subscriptions.rb +31 -0
  23. data/db/migrate/20141106034610_add_currency_to_payola_subscriptions.rb +6 -0
  24. data/db/migrate/20141107025420_add_guid_to_payola_subscriptions.rb +6 -0
  25. data/db/migrate/20141109203101_add_stripe_status_to_payola_subscription.rb +5 -0
  26. data/db/migrate/20141112024805_add_affiliate_id_to_payola_subscriptions.rb +5 -0
  27. data/db/migrate/20141114032013_add_coupon_code_to_payola_subscriptions.rb +5 -0
  28. data/db/migrate/20141114154223_add_signed_custom_fields_to_payola_subscription.rb +5 -0
  29. data/db/migrate/20141114163841_add_addresses_to_payola_subscription.rb +6 -0
  30. data/lib/payola.rb +11 -0
  31. data/lib/payola/engine.rb +10 -2
  32. data/lib/payola/version.rb +1 -1
  33. data/spec/concerns/plan_spec.rb +43 -0
  34. data/spec/controllers/payola/subscriptions_controller_spec.rb +148 -0
  35. data/spec/dummy/app/controllers/application_controller.rb +4 -0
  36. data/spec/dummy/app/controllers/home_controller.rb +6 -0
  37. data/spec/dummy/app/controllers/subscribe_controller.rb +11 -0
  38. data/spec/dummy/app/models/subscription_plan.rb +3 -0
  39. data/spec/dummy/app/views/home/index.html.erb +7 -0
  40. data/spec/dummy/app/views/subscribe/index.html.erb +21 -0
  41. data/spec/dummy/app/views/subscribe/show.html.erb +4 -0
  42. data/spec/dummy/config/initializers/payola.rb +4 -0
  43. data/spec/dummy/config/routes.rb +4 -0
  44. data/spec/dummy/db/development.sqlite3 +0 -0
  45. data/spec/dummy/db/migrate/20141105010234_create_subscription_plans.rb +14 -0
  46. data/spec/dummy/db/schema.rb +51 -1
  47. data/spec/dummy/db/test.sqlite3 +0 -0
  48. data/spec/dummy/log/development.log +275 -0
  49. data/spec/dummy/log/test.log +109420 -0
  50. data/spec/dummy/tmp/cache/assets/development/sprockets/0e585aeb88c1555ae8f5292f7c7a9068 +0 -0
  51. data/spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  52. data/spec/dummy/tmp/cache/assets/development/sprockets/1b54952339cbc96811097cee5f8923b4 +0 -0
  53. data/spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  54. data/spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  55. data/spec/dummy/tmp/cache/assets/development/sprockets/5afa4bc970e0bc781b3500c696ba25ff +0 -0
  56. data/spec/dummy/tmp/cache/assets/development/sprockets/664efeb51d1b486dcfc30d142db56f3c +0 -0
  57. data/spec/dummy/tmp/cache/assets/development/sprockets/68a3bbdc64a0729b5896fa1e33fce4b1 +0 -0
  58. data/spec/dummy/tmp/cache/assets/development/sprockets/96b1ccdc193a02b2bbea195310262fa5 +0 -0
  59. data/spec/dummy/tmp/cache/assets/development/sprockets/aea159adbc0944b120d91d5b578612ba +0 -0
  60. data/spec/dummy/tmp/cache/assets/development/sprockets/b20dab973e971c61bc7e334a38453ae0 +0 -0
  61. data/spec/dummy/tmp/cache/assets/development/sprockets/b83da90cb58011313e13a97a4a41cb6e +0 -0
  62. data/spec/dummy/tmp/cache/assets/development/sprockets/c0b954b40f2881a6d286061bc069643e +0 -0
  63. data/spec/dummy/tmp/cache/assets/development/sprockets/c5b3877d49b39932a7557611cefca9a6 +0 -0
  64. data/spec/dummy/tmp/cache/assets/development/sprockets/ca491e325ff6948be9292f701aa4ce64 +0 -0
  65. data/spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  66. data/spec/dummy/tmp/cache/assets/development/sprockets/d3f4b67cc032016dfeebc71f2148b9dc +0 -0
  67. data/spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  68. data/spec/dummy/tmp/cache/assets/development/sprockets/d9856638a3c7b9cfd9d1b884e3b33982 +0 -0
  69. data/spec/dummy/tmp/cache/assets/development/sprockets/ddba6e841f28d3005e828fbfffd18b74 +0 -0
  70. data/spec/dummy/tmp/cache/assets/development/sprockets/df935e399019055729aa968bd7062096 +0 -0
  71. data/spec/dummy/tmp/cache/assets/development/sprockets/ef82c31948061751bb026663b54484e1 +0 -0
  72. data/spec/dummy/tmp/cache/assets/development/sprockets/f0b5d4bea0c6cdd1904e1e9a0a45532f +0 -0
  73. data/spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  74. data/spec/factories/payola_subscriptions.rb +25 -0
  75. data/spec/factories/subscription_plan.rb +9 -0
  76. data/spec/models/payola/subscription_spec.rb +50 -0
  77. data/spec/services/payola/cancel_subscription_spec.rb +29 -0
  78. data/spec/services/payola/change_subscription_plan_spec.rb +31 -0
  79. data/spec/services/payola/charge_card_spec.rb +9 -5
  80. data/spec/services/payola/create_plan_spec.rb +24 -0
  81. data/spec/services/payola/create_subscription_spec.rb +65 -0
  82. data/spec/services/payola/invoice_failed_spec.rb +29 -0
  83. data/spec/services/payola/invoice_paid_spec.rb +49 -0
  84. data/spec/services/payola/start_subscription_spec.rb +36 -0
  85. data/spec/services/payola/sync_subscription_spec.rb +14 -0
  86. data/spec/services/payola/update_card_spec.rb +26 -0
  87. metadata +95 -30
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+
3
+ module Payola
4
+ describe SyncSubscription do
5
+ it "should call sync_with!" do
6
+ expect_any_instance_of(Payola::Subscription).to receive(:sync_with!)
7
+ sub = create(:subscription)
8
+
9
+ event = StripeMock.mock_webhook_event('customer.subscription.updated', id: sub.stripe_id)
10
+
11
+ Payola::SyncSubscription.call(event)
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,26 @@
1
+ require 'spec_helper'
2
+
3
+ module Payola
4
+ describe UpdateCard do
5
+ let(:stripe_helper) { StripeMock.create_test_helper }
6
+
7
+ describe "#call" do
8
+ before do
9
+ @plan = create(:subscription_plan)
10
+
11
+ token = StripeMock.generate_card_token({})
12
+ @subscription = create(:subscription, plan: @plan, stripe_token: token)
13
+ StartSubscription.call(@subscription)
14
+ token2 = StripeMock.generate_card_token({last4: '2233', exp_year: '2021', exp_month: '11', brand: 'JCB'})
15
+ Payola::UpdateCard.call(@subscription, token2)
16
+ end
17
+
18
+ it "should change the card" do
19
+ @subscription.reload
20
+ expect(@subscription.card_last4).to eq '2233'
21
+ expect(@subscription.card_expiration).to eq Date.new(2021,11,1)
22
+ expect(@subscription.card_type).to eq 'JCB'
23
+ end
24
+ end
25
+ end
26
+ end
metadata CHANGED
@@ -1,153 +1,153 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: payola-payments
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Keen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-07 00:00:00.000000000 Z
11
+ date: 2014-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jquery-rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: stripe
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 1.16.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.16.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: aasm
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 3.4.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 3.4.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: stripe_event
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: 1.3.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.3.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: sqlite3
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ! '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ! '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec-rails
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ! '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ! '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: factory_girl_rails
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ! '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ! '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: stripe-ruby-mock
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ~>
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 1.10.1.7
131
+ version: '2.0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ~>
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 1.10.1.7
138
+ version: '2.0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: sucker_punch
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ~>
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
145
  version: 1.2.1
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ~>
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: 1.2.1
153
153
  description: One-off and subscription payments for your Rails application
@@ -162,22 +162,37 @@ files:
162
162
  - app/assets/javascripts/payola/application.js
163
163
  - app/assets/javascripts/payola/checkout_button.js
164
164
  - app/assets/javascripts/payola/form.js
165
+ - app/assets/javascripts/payola/subscription_form.js
165
166
  - app/assets/stylesheets/payola/application.css
166
167
  - app/controllers/payola/application_controller.rb
168
+ - app/controllers/payola/subscriptions_controller.rb
167
169
  - app/controllers/payola/transactions_controller.rb
168
170
  - app/helpers/payola/application_helper.rb
169
171
  - app/helpers/payola/price_helper.rb
170
172
  - app/mailers/payola/admin_mailer.rb
171
173
  - app/mailers/payola/receipt_mailer.rb
174
+ - app/models/concerns/payola/plan.rb
172
175
  - app/models/concerns/payola/sellable.rb
173
176
  - app/models/payola/affiliate.rb
174
177
  - app/models/payola/coupon.rb
175
178
  - app/models/payola/sale.rb
176
179
  - app/models/payola/stripe_webhook.rb
180
+ - app/models/payola/subscription.rb
181
+ - app/services/payola/cancel_subscription.rb
182
+ - app/services/payola/change_subscription_plan.rb
177
183
  - app/services/payola/charge_card.rb
184
+ - app/services/payola/create_plan.rb
178
185
  - app/services/payola/create_sale.rb
186
+ - app/services/payola/create_subscription.rb
187
+ - app/services/payola/invoice_failed.rb
188
+ - app/services/payola/invoice_paid.rb
179
189
  - app/services/payola/process_sale.rb
190
+ - app/services/payola/process_subscription.rb
180
191
  - app/services/payola/send_mail.rb
192
+ - app/services/payola/start_subscription.rb
193
+ - app/services/payola/sync_subscription.rb
194
+ - app/services/payola/update_card.rb
195
+ - app/services/payola/update_subscription.rb
181
196
  - app/views/layouts/payola/application.html.erb
182
197
  - app/views/payola/admin_mailer/dispute.html.erb
183
198
  - app/views/payola/admin_mailer/failure.html.erb
@@ -187,6 +202,8 @@ files:
187
202
  - app/views/payola/receipt_mailer/receipt.text.erb
188
203
  - app/views/payola/receipt_mailer/receipt_pdf.html.erb
189
204
  - app/views/payola/receipt_mailer/refund.html.erb
205
+ - app/views/payola/subscriptions/_cancel.html.erb
206
+ - app/views/payola/subscriptions/_change_plan.html.erb
190
207
  - app/views/payola/transactions/_checkout.html.erb
191
208
  - app/views/payola/transactions/_form.html.erb
192
209
  - app/views/payola/transactions/_stripe_header.html.erb
@@ -204,6 +221,14 @@ files:
204
221
  - db/migrate/20141026101628_add_custom_fields_to_payola_sale.rb
205
222
  - db/migrate/20141026144800_rename_custom_fields_to_signed_custom_fields_on_payola_sale.rb
206
223
  - db/migrate/20141029135848_add_owner_to_payola_sale.rb
224
+ - db/migrate/20141105043439_create_payola_subscriptions.rb
225
+ - db/migrate/20141106034610_add_currency_to_payola_subscriptions.rb
226
+ - db/migrate/20141107025420_add_guid_to_payola_subscriptions.rb
227
+ - db/migrate/20141109203101_add_stripe_status_to_payola_subscription.rb
228
+ - db/migrate/20141112024805_add_affiliate_id_to_payola_subscriptions.rb
229
+ - db/migrate/20141114032013_add_coupon_code_to_payola_subscriptions.rb
230
+ - db/migrate/20141114154223_add_signed_custom_fields_to_payola_subscription.rb
231
+ - db/migrate/20141114163841_add_addresses_to_payola_subscription.rb
207
232
  - lib/generators/payola/install_generator.rb
208
233
  - lib/generators/payola/templates/initializer.rb
209
234
  - lib/payola-payments.rb
@@ -216,7 +241,9 @@ files:
216
241
  - lib/payola/worker/sidekiq.rb
217
242
  - lib/payola/worker/sucker_punch.rb
218
243
  - lib/tasks/payola_tasks.rake
244
+ - spec/concerns/plan_spec.rb
219
245
  - spec/concerns/sellable_spec.rb
246
+ - spec/controllers/payola/subscriptions_controller_spec.rb
220
247
  - spec/controllers/payola/transactions_controller_spec.rb
221
248
  - spec/dummy/README.rdoc
222
249
  - spec/dummy/Rakefile
@@ -226,12 +253,18 @@ files:
226
253
  - spec/dummy/app/assets/stylesheets/buy.css
227
254
  - spec/dummy/app/controllers/application_controller.rb
228
255
  - spec/dummy/app/controllers/buy_controller.rb
256
+ - spec/dummy/app/controllers/home_controller.rb
257
+ - spec/dummy/app/controllers/subscribe_controller.rb
229
258
  - spec/dummy/app/helpers/application_helper.rb
230
259
  - spec/dummy/app/helpers/buy_helper.rb
231
260
  - spec/dummy/app/models/owner.rb
232
261
  - spec/dummy/app/models/product.rb
262
+ - spec/dummy/app/models/subscription_plan.rb
233
263
  - spec/dummy/app/views/buy/index.html.erb
264
+ - spec/dummy/app/views/home/index.html.erb
234
265
  - spec/dummy/app/views/layouts/application.html.erb
266
+ - spec/dummy/app/views/subscribe/index.html.erb
267
+ - spec/dummy/app/views/subscribe/show.html.erb
235
268
  - spec/dummy/bin/bundle
236
269
  - spec/dummy/bin/rails
237
270
  - spec/dummy/bin/rake
@@ -259,6 +292,7 @@ files:
259
292
  - spec/dummy/db/development.sqlite3
260
293
  - spec/dummy/db/migrate/20141001230848_create_products.rb
261
294
  - spec/dummy/db/migrate/20141029140518_create_owners.rb
295
+ - spec/dummy/db/migrate/20141105010234_create_subscription_plans.rb
262
296
  - spec/dummy/db/schema.rb
263
297
  - spec/dummy/db/test.sqlite3
264
298
  - spec/dummy/log/development.log
@@ -295,35 +329,45 @@ files:
295
329
  - spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655
296
330
  - spec/factories/payola_affiliates.rb
297
331
  - spec/factories/payola_coupons.rb
332
+ - spec/factories/payola_subscriptions.rb
298
333
  - spec/factories/product.rb
299
334
  - spec/factories/sales.rb
335
+ - spec/factories/subscription_plan.rb
300
336
  - spec/helpers/payola/price_helper_spec.rb
301
337
  - spec/models/payola/sale_spec.rb
302
338
  - spec/models/payola/stripe_webhook_spec.rb
339
+ - spec/models/payola/subscription_spec.rb
303
340
  - spec/payola_spec.rb
341
+ - spec/services/payola/cancel_subscription_spec.rb
342
+ - spec/services/payola/change_subscription_plan_spec.rb
304
343
  - spec/services/payola/charge_card_spec.rb
344
+ - spec/services/payola/create_plan_spec.rb
305
345
  - spec/services/payola/create_sale_spec.rb
346
+ - spec/services/payola/create_subscription_spec.rb
347
+ - spec/services/payola/invoice_failed_spec.rb
348
+ - spec/services/payola/invoice_paid_spec.rb
349
+ - spec/services/payola/start_subscription_spec.rb
350
+ - spec/services/payola/sync_subscription_spec.rb
351
+ - spec/services/payola/update_card_spec.rb
306
352
  - spec/spec_helper.rb
307
353
  - spec/worker_spec.rb
308
354
  homepage: https://www.payola.io
309
355
  licenses:
310
356
  - LGPL-3.0
311
357
  metadata: {}
312
- post_install_message: ! 'Please ensure that your Payola route has ''as: :payola''
313
- included. Prior to v1.0.7 this was not added automatically.
314
-
315
- '
358
+ post_install_message: |
359
+ Please ensure that your Payola route has 'as: :payola' included. Prior to v1.0.7 this was not added automatically.
316
360
  rdoc_options: []
317
361
  require_paths:
318
362
  - lib
319
363
  required_ruby_version: !ruby/object:Gem::Requirement
320
364
  requirements:
321
- - - ! '>='
365
+ - - ">="
322
366
  - !ruby/object:Gem::Version
323
367
  version: '0'
324
368
  required_rubygems_version: !ruby/object:Gem::Requirement
325
369
  requirements:
326
- - - ! '>='
370
+ - - ">="
327
371
  - !ruby/object:Gem::Version
328
372
  version: '0'
329
373
  requirements: []
@@ -333,7 +377,9 @@ signing_key:
333
377
  specification_version: 4
334
378
  summary: Drop-in Rails engine for accepting payments with Stripe
335
379
  test_files:
380
+ - spec/concerns/plan_spec.rb
336
381
  - spec/concerns/sellable_spec.rb
382
+ - spec/controllers/payola/subscriptions_controller_spec.rb
337
383
  - spec/controllers/payola/transactions_controller_spec.rb
338
384
  - spec/dummy/app/assets/javascripts/application.js
339
385
  - spec/dummy/app/assets/javascripts/buy.js
@@ -341,12 +387,18 @@ test_files:
341
387
  - spec/dummy/app/assets/stylesheets/buy.css
342
388
  - spec/dummy/app/controllers/application_controller.rb
343
389
  - spec/dummy/app/controllers/buy_controller.rb
390
+ - spec/dummy/app/controllers/home_controller.rb
391
+ - spec/dummy/app/controllers/subscribe_controller.rb
344
392
  - spec/dummy/app/helpers/application_helper.rb
345
393
  - spec/dummy/app/helpers/buy_helper.rb
346
394
  - spec/dummy/app/models/owner.rb
347
395
  - spec/dummy/app/models/product.rb
396
+ - spec/dummy/app/models/subscription_plan.rb
348
397
  - spec/dummy/app/views/buy/index.html.erb
398
+ - spec/dummy/app/views/home/index.html.erb
349
399
  - spec/dummy/app/views/layouts/application.html.erb
400
+ - spec/dummy/app/views/subscribe/index.html.erb
401
+ - spec/dummy/app/views/subscribe/show.html.erb
350
402
  - spec/dummy/bin/bundle
351
403
  - spec/dummy/bin/rails
352
404
  - spec/dummy/bin/rake
@@ -374,6 +426,7 @@ test_files:
374
426
  - spec/dummy/db/development.sqlite3
375
427
  - spec/dummy/db/migrate/20141001230848_create_products.rb
376
428
  - spec/dummy/db/migrate/20141029140518_create_owners.rb
429
+ - spec/dummy/db/migrate/20141105010234_create_subscription_plans.rb
377
430
  - spec/dummy/db/schema.rb
378
431
  - spec/dummy/db/test.sqlite3
379
432
  - spec/dummy/log/development.log
@@ -412,13 +465,25 @@ test_files:
412
465
  - spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655
413
466
  - spec/factories/payola_affiliates.rb
414
467
  - spec/factories/payola_coupons.rb
468
+ - spec/factories/payola_subscriptions.rb
415
469
  - spec/factories/product.rb
416
470
  - spec/factories/sales.rb
471
+ - spec/factories/subscription_plan.rb
417
472
  - spec/helpers/payola/price_helper_spec.rb
418
473
  - spec/models/payola/sale_spec.rb
419
474
  - spec/models/payola/stripe_webhook_spec.rb
475
+ - spec/models/payola/subscription_spec.rb
420
476
  - spec/payola_spec.rb
477
+ - spec/services/payola/cancel_subscription_spec.rb
478
+ - spec/services/payola/change_subscription_plan_spec.rb
421
479
  - spec/services/payola/charge_card_spec.rb
480
+ - spec/services/payola/create_plan_spec.rb
422
481
  - spec/services/payola/create_sale_spec.rb
482
+ - spec/services/payola/create_subscription_spec.rb
483
+ - spec/services/payola/invoice_failed_spec.rb
484
+ - spec/services/payola/invoice_paid_spec.rb
485
+ - spec/services/payola/start_subscription_spec.rb
486
+ - spec/services/payola/sync_subscription_spec.rb
487
+ - spec/services/payola/update_card_spec.rb
423
488
  - spec/spec_helper.rb
424
489
  - spec/worker_spec.rb