payola-payments 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/payola/form.js +7 -3
- data/app/assets/javascripts/payola/subscription_form_onestep.js +77 -0
- data/app/assets/javascripts/payola/{subscription_form.js → subscription_form_twostep.js} +8 -4
- data/app/controllers/concerns/payola/async_behavior.rb +4 -6
- data/app/controllers/concerns/payola/status_behavior.rb +17 -0
- data/app/controllers/payola/subscriptions_controller.rb +2 -1
- data/app/controllers/payola/transactions_controller.rb +1 -0
- data/app/services/payola/create_subscription.rb +11 -3
- data/app/services/payola/start_subscription.rb +2 -2
- data/db/migrate/20141122020755_add_setup_fee_to_payola_subscriptions.rb +5 -0
- data/lib/payola/version.rb +1 -1
- data/spec/controllers/payola/subscriptions_controller_spec.rb +10 -2
- data/spec/controllers/payola/transactions_controller_spec.rb +8 -0
- data/spec/dummy/app/controllers/subscribe_controller.rb +7 -0
- data/spec/dummy/config/routes.rb +1 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +2 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +1606 -0
- data/spec/dummy/log/test.log +39964 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0e585aeb88c1555ae8f5292f7c7a9068 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5afa4bc970e0bc781b3500c696ba25ff +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/607dfde9c98ca72f323d73f9584a5a19 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/664efeb51d1b486dcfc30d142db56f3c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/68a3bbdc64a0729b5896fa1e33fce4b1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/725492e0b3449a4859968127df6613cd +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/96b1ccdc193a02b2bbea195310262fa5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b20dab973e971c61bc7e334a38453ae0 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b83da90cb58011313e13a97a4a41cb6e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/bdeec88bc14928f7a03444e1d2efac62 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c0b954b40f2881a6d286061bc069643e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d3f4b67cc032016dfeebc71f2148b9dc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d9856638a3c7b9cfd9d1b884e3b33982 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ef82c31948061751bb026663b54484e1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f0b5d4bea0c6cdd1904e1e9a0a45532f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/payola_spec.rb +0 -6
- data/spec/services/payola/create_subscription_spec.rb +4 -28
- data/spec/spec_helper.rb +11 -0
- metadata +12 -3
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/spec/payola_spec.rb
CHANGED
@@ -4,10 +4,13 @@ module Payola
|
|
4
4
|
describe CreateSubscription do
|
5
5
|
before do
|
6
6
|
@plan = create(:subscription_plan)
|
7
|
+
Payola.background_worker = Payola::FakeWorker
|
7
8
|
end
|
8
9
|
|
9
10
|
describe "#call" do
|
10
|
-
it "should create a
|
11
|
+
it "should create a subscription and queue the job" do
|
12
|
+
expect(Payola).to receive(:queue!)
|
13
|
+
|
11
14
|
sale = CreateSubscription.call(
|
12
15
|
stripeEmail: 'pete@bugsplat.info',
|
13
16
|
stripeToken: 'test_tok',
|
@@ -33,33 +36,6 @@ module Payola
|
|
33
36
|
|
34
37
|
expect(sale.affiliate).to eq affiliate
|
35
38
|
end
|
36
|
-
|
37
|
-
#describe "with coupon" do
|
38
|
-
#it "should include the coupon" do
|
39
|
-
#coupon = create(:payola_coupon)
|
40
|
-
|
41
|
-
#sale = CreateSubscription.call(
|
42
|
-
#email: 'pete@bugsplat.info',
|
43
|
-
#stripeToken: 'test_tok',
|
44
|
-
#product: @plan,
|
45
|
-
#coupon: coupon
|
46
|
-
#)
|
47
|
-
|
48
|
-
#expect(sale.coupon).to eq coupon
|
49
|
-
#end
|
50
|
-
#it "should set the price correctly" do
|
51
|
-
#coupon = create(:payola_coupon)
|
52
|
-
|
53
|
-
#sale = CreateSubscription.call(
|
54
|
-
#email: 'pete@bugsplat.info',
|
55
|
-
#stripeToken: 'test_tok',
|
56
|
-
#product: @plan,
|
57
|
-
#coupon: coupon
|
58
|
-
#)
|
59
|
-
|
60
|
-
#expect(sale.amount).to eq 99
|
61
|
-
#end
|
62
|
-
#end
|
63
39
|
end
|
64
40
|
end
|
65
41
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: payola-payments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
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-
|
11
|
+
date: 2014-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -176,10 +176,12 @@ files:
|
|
176
176
|
- app/assets/javascripts/payola/application.js
|
177
177
|
- app/assets/javascripts/payola/checkout_button.js
|
178
178
|
- app/assets/javascripts/payola/form.js
|
179
|
-
- app/assets/javascripts/payola/
|
179
|
+
- app/assets/javascripts/payola/subscription_form_onestep.js
|
180
|
+
- app/assets/javascripts/payola/subscription_form_twostep.js
|
180
181
|
- app/assets/stylesheets/payola/application.css
|
181
182
|
- app/controllers/concerns/payola/affiliate_behavior.rb
|
182
183
|
- app/controllers/concerns/payola/async_behavior.rb
|
184
|
+
- app/controllers/concerns/payola/status_behavior.rb
|
183
185
|
- app/controllers/payola/application_controller.rb
|
184
186
|
- app/controllers/payola/subscriptions_controller.rb
|
185
187
|
- app/controllers/payola/transactions_controller.rb
|
@@ -247,6 +249,7 @@ files:
|
|
247
249
|
- db/migrate/20141114032013_add_coupon_code_to_payola_subscriptions.rb
|
248
250
|
- db/migrate/20141114154223_add_signed_custom_fields_to_payola_subscription.rb
|
249
251
|
- db/migrate/20141114163841_add_addresses_to_payola_subscription.rb
|
252
|
+
- db/migrate/20141122020755_add_setup_fee_to_payola_subscriptions.rb
|
250
253
|
- lib/generators/payola/install_generator.rb
|
251
254
|
- lib/generators/payola/templates/initializer.rb
|
252
255
|
- lib/payola-payments.rb
|
@@ -329,12 +332,15 @@ files:
|
|
329
332
|
- spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
330
333
|
- spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953
|
331
334
|
- spec/dummy/tmp/cache/assets/development/sprockets/5afa4bc970e0bc781b3500c696ba25ff
|
335
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/607dfde9c98ca72f323d73f9584a5a19
|
332
336
|
- spec/dummy/tmp/cache/assets/development/sprockets/664efeb51d1b486dcfc30d142db56f3c
|
333
337
|
- spec/dummy/tmp/cache/assets/development/sprockets/68a3bbdc64a0729b5896fa1e33fce4b1
|
338
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/725492e0b3449a4859968127df6613cd
|
334
339
|
- spec/dummy/tmp/cache/assets/development/sprockets/96b1ccdc193a02b2bbea195310262fa5
|
335
340
|
- spec/dummy/tmp/cache/assets/development/sprockets/aea159adbc0944b120d91d5b578612ba
|
336
341
|
- spec/dummy/tmp/cache/assets/development/sprockets/b20dab973e971c61bc7e334a38453ae0
|
337
342
|
- spec/dummy/tmp/cache/assets/development/sprockets/b83da90cb58011313e13a97a4a41cb6e
|
343
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/bdeec88bc14928f7a03444e1d2efac62
|
338
344
|
- spec/dummy/tmp/cache/assets/development/sprockets/c0b954b40f2881a6d286061bc069643e
|
339
345
|
- spec/dummy/tmp/cache/assets/development/sprockets/c5b3877d49b39932a7557611cefca9a6
|
340
346
|
- spec/dummy/tmp/cache/assets/development/sprockets/ca491e325ff6948be9292f701aa4ce64
|
@@ -472,12 +478,15 @@ test_files:
|
|
472
478
|
- spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
473
479
|
- spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953
|
474
480
|
- spec/dummy/tmp/cache/assets/development/sprockets/5afa4bc970e0bc781b3500c696ba25ff
|
481
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/607dfde9c98ca72f323d73f9584a5a19
|
475
482
|
- spec/dummy/tmp/cache/assets/development/sprockets/664efeb51d1b486dcfc30d142db56f3c
|
476
483
|
- spec/dummy/tmp/cache/assets/development/sprockets/68a3bbdc64a0729b5896fa1e33fce4b1
|
484
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/725492e0b3449a4859968127df6613cd
|
477
485
|
- spec/dummy/tmp/cache/assets/development/sprockets/96b1ccdc193a02b2bbea195310262fa5
|
478
486
|
- spec/dummy/tmp/cache/assets/development/sprockets/aea159adbc0944b120d91d5b578612ba
|
479
487
|
- spec/dummy/tmp/cache/assets/development/sprockets/b20dab973e971c61bc7e334a38453ae0
|
480
488
|
- spec/dummy/tmp/cache/assets/development/sprockets/b83da90cb58011313e13a97a4a41cb6e
|
489
|
+
- spec/dummy/tmp/cache/assets/development/sprockets/bdeec88bc14928f7a03444e1d2efac62
|
481
490
|
- spec/dummy/tmp/cache/assets/development/sprockets/c0b954b40f2881a6d286061bc069643e
|
482
491
|
- spec/dummy/tmp/cache/assets/development/sprockets/c5b3877d49b39932a7557611cefca9a6
|
483
492
|
- spec/dummy/tmp/cache/assets/development/sprockets/ca491e325ff6948be9292f701aa4ce64
|