payola-payments 1.0.6 → 1.0.7

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 +8 -8
  2. data/app/assets/javascripts/payola/checkout_button.js +11 -14
  3. data/app/views/payola/transactions/_checkout.html.erb +4 -2
  4. data/lib/generators/payola/install_generator.rb +1 -1
  5. data/lib/payola/version.rb +1 -1
  6. data/lib/payola/worker/active_job.rb +21 -0
  7. data/lib/payola/worker/base.rb +9 -0
  8. data/lib/payola/worker/sidekiq.rb +20 -0
  9. data/lib/payola/worker/sucker_punch.rb +20 -0
  10. data/lib/payola/worker.rb +12 -41
  11. data/lib/payola.rb +6 -0
  12. data/spec/dummy/config/routes.rb +1 -1
  13. data/spec/dummy/db/development.sqlite3 +0 -0
  14. data/spec/dummy/log/development.log +2 -8460
  15. data/spec/dummy/log/test.log +1428 -12240
  16. data/spec/payola_spec.rb +7 -0
  17. data/spec/worker_spec.rb +24 -0
  18. metadata +16 -57
  19. data/spec/dummy/tmp/cache/assets/development/sprockets/0e585aeb88c1555ae8f5292f7c7a9068 +0 -0
  20. data/spec/dummy/tmp/cache/assets/development/sprockets/0f0c99469c51f1b2d76b08f481781d09 +0 -0
  21. data/spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  22. data/spec/dummy/tmp/cache/assets/development/sprockets/1b54952339cbc96811097cee5f8923b4 +0 -0
  23. data/spec/dummy/tmp/cache/assets/development/sprockets/1cbc4f4790f2067a2c161c1eb480f276 +0 -0
  24. data/spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  25. data/spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  26. data/spec/dummy/tmp/cache/assets/development/sprockets/5afa4bc970e0bc781b3500c696ba25ff +0 -0
  27. data/spec/dummy/tmp/cache/assets/development/sprockets/664efeb51d1b486dcfc30d142db56f3c +0 -0
  28. data/spec/dummy/tmp/cache/assets/development/sprockets/68a3bbdc64a0729b5896fa1e33fce4b1 +0 -0
  29. data/spec/dummy/tmp/cache/assets/development/sprockets/aea159adbc0944b120d91d5b578612ba +0 -0
  30. data/spec/dummy/tmp/cache/assets/development/sprockets/b83da90cb58011313e13a97a4a41cb6e +0 -0
  31. data/spec/dummy/tmp/cache/assets/development/sprockets/c0b954b40f2881a6d286061bc069643e +0 -0
  32. data/spec/dummy/tmp/cache/assets/development/sprockets/c5b3877d49b39932a7557611cefca9a6 +0 -0
  33. data/spec/dummy/tmp/cache/assets/development/sprockets/ca491e325ff6948be9292f701aa4ce64 +0 -0
  34. data/spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  35. data/spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  36. data/spec/dummy/tmp/cache/assets/development/sprockets/d9856638a3c7b9cfd9d1b884e3b33982 +0 -0
  37. data/spec/dummy/tmp/cache/assets/development/sprockets/ddba6e841f28d3005e828fbfffd18b74 +0 -0
  38. data/spec/dummy/tmp/cache/assets/development/sprockets/df935e399019055729aa968bd7062096 +0 -0
  39. data/spec/dummy/tmp/cache/assets/development/sprockets/ef82c31948061751bb026663b54484e1 +0 -0
  40. data/spec/dummy/tmp/cache/assets/development/sprockets/f0b5d4bea0c6cdd1904e1e9a0a45532f +0 -0
  41. data/spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  42. data/spec/dummy/tmp/cache/assets/development/sprockets/f8018075b7aca72974f4014bbbc75ab5 +0 -0
data/spec/payola_spec.rb CHANGED
@@ -90,4 +90,11 @@ module Payola
90
90
  expect(Payola.secret_key_for_sale('blah')).to eq 'foo'
91
91
  end
92
92
  end
93
+
94
+ describe "#publishable_key_retriever" do
95
+ it "should get called" do
96
+ Payola.publishable_key_retriever = lambda { |sale| 'foo' }
97
+ expect(Payola.publishable_key_for_sale('blah')).to eq 'foo'
98
+ end
99
+ end
93
100
  end
data/spec/worker_spec.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  module Payola
4
+
4
5
  describe Worker::Sidekiq do
5
6
  before do
6
7
  module ::Sidekiq
@@ -26,4 +27,27 @@ module Payola
26
27
  end
27
28
  end
28
29
  end
30
+
31
+ describe Worker::ActiveJob do
32
+ before do
33
+ module ::ActiveJob
34
+ module Core; end
35
+ end
36
+ end
37
+
38
+ describe "#can_run?" do
39
+ it "should return true if ::ActiveJob::Core is defined" do
40
+ expect(Payola::Worker::ActiveJob.can_run?).to be_truthy
41
+ end
42
+ end
43
+
44
+ describe "#call" do
45
+ it "should call perform_later" do
46
+ Payola::Worker::ActiveJob.should_receive(:perform_later)
47
+ sale = double()
48
+ sale.should_receive(:guid).and_return('blah')
49
+ Payola::Worker::ActiveJob.call(sale)
50
+ end
51
+ end
52
+ end
29
53
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: payola-payments
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
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-10-19 00:00:00.000000000 Z
11
+ date: 2014-10-21 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
- version: 4.1.4
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
- version: 4.1.4
26
+ version: '4.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jquery-rails
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,14 +42,14 @@ dependencies:
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
@@ -194,6 +194,10 @@ files:
194
194
  - lib/payola/engine.rb
195
195
  - lib/payola/version.rb
196
196
  - lib/payola/worker.rb
197
+ - lib/payola/worker/active_job.rb
198
+ - lib/payola/worker/base.rb
199
+ - lib/payola/worker/sidekiq.rb
200
+ - lib/payola/worker/sucker_punch.rb
197
201
  - lib/tasks/payola_tasks.rake
198
202
  - spec/concerns/sellable_spec.rb
199
203
  - spec/controllers/payola/transactions_controller_spec.rb
@@ -245,30 +249,6 @@ files:
245
249
  - spec/dummy/public/favicon.ico
246
250
  - spec/dummy/spec/controllers/buy_controller_spec.rb
247
251
  - spec/dummy/spec/factories/products.rb
248
- - spec/dummy/tmp/cache/assets/development/sprockets/0e585aeb88c1555ae8f5292f7c7a9068
249
- - spec/dummy/tmp/cache/assets/development/sprockets/0f0c99469c51f1b2d76b08f481781d09
250
- - spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705
251
- - spec/dummy/tmp/cache/assets/development/sprockets/1b54952339cbc96811097cee5f8923b4
252
- - spec/dummy/tmp/cache/assets/development/sprockets/1cbc4f4790f2067a2c161c1eb480f276
253
- - spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af
254
- - spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953
255
- - spec/dummy/tmp/cache/assets/development/sprockets/5afa4bc970e0bc781b3500c696ba25ff
256
- - spec/dummy/tmp/cache/assets/development/sprockets/664efeb51d1b486dcfc30d142db56f3c
257
- - spec/dummy/tmp/cache/assets/development/sprockets/68a3bbdc64a0729b5896fa1e33fce4b1
258
- - spec/dummy/tmp/cache/assets/development/sprockets/aea159adbc0944b120d91d5b578612ba
259
- - spec/dummy/tmp/cache/assets/development/sprockets/b83da90cb58011313e13a97a4a41cb6e
260
- - spec/dummy/tmp/cache/assets/development/sprockets/c0b954b40f2881a6d286061bc069643e
261
- - spec/dummy/tmp/cache/assets/development/sprockets/c5b3877d49b39932a7557611cefca9a6
262
- - spec/dummy/tmp/cache/assets/development/sprockets/ca491e325ff6948be9292f701aa4ce64
263
- - spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994
264
- - spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6
265
- - spec/dummy/tmp/cache/assets/development/sprockets/d9856638a3c7b9cfd9d1b884e3b33982
266
- - spec/dummy/tmp/cache/assets/development/sprockets/ddba6e841f28d3005e828fbfffd18b74
267
- - spec/dummy/tmp/cache/assets/development/sprockets/df935e399019055729aa968bd7062096
268
- - spec/dummy/tmp/cache/assets/development/sprockets/ef82c31948061751bb026663b54484e1
269
- - spec/dummy/tmp/cache/assets/development/sprockets/f0b5d4bea0c6cdd1904e1e9a0a45532f
270
- - spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655
271
- - spec/dummy/tmp/cache/assets/development/sprockets/f8018075b7aca72974f4014bbbc75ab5
272
252
  - spec/factories/payola_affiliates.rb
273
253
  - spec/factories/payola_coupons.rb
274
254
  - spec/factories/product.rb
@@ -284,7 +264,10 @@ homepage: https://www.payola.io
284
264
  licenses:
285
265
  - LGPL-3.0
286
266
  metadata: {}
287
- post_install_message:
267
+ post_install_message: ! 'Please ensure that your Payola route has ''as: :payola''
268
+ included. Prior to v1.0.7 this was not added automatically.
269
+
270
+ '
288
271
  rdoc_options: []
289
272
  require_paths:
290
273
  - lib
@@ -355,30 +338,6 @@ test_files:
355
338
  - spec/dummy/README.rdoc
356
339
  - spec/dummy/spec/controllers/buy_controller_spec.rb
357
340
  - spec/dummy/spec/factories/products.rb
358
- - spec/dummy/tmp/cache/assets/development/sprockets/0e585aeb88c1555ae8f5292f7c7a9068
359
- - spec/dummy/tmp/cache/assets/development/sprockets/0f0c99469c51f1b2d76b08f481781d09
360
- - spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705
361
- - spec/dummy/tmp/cache/assets/development/sprockets/1b54952339cbc96811097cee5f8923b4
362
- - spec/dummy/tmp/cache/assets/development/sprockets/1cbc4f4790f2067a2c161c1eb480f276
363
- - spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af
364
- - spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953
365
- - spec/dummy/tmp/cache/assets/development/sprockets/5afa4bc970e0bc781b3500c696ba25ff
366
- - spec/dummy/tmp/cache/assets/development/sprockets/664efeb51d1b486dcfc30d142db56f3c
367
- - spec/dummy/tmp/cache/assets/development/sprockets/68a3bbdc64a0729b5896fa1e33fce4b1
368
- - spec/dummy/tmp/cache/assets/development/sprockets/aea159adbc0944b120d91d5b578612ba
369
- - spec/dummy/tmp/cache/assets/development/sprockets/b83da90cb58011313e13a97a4a41cb6e
370
- - spec/dummy/tmp/cache/assets/development/sprockets/c0b954b40f2881a6d286061bc069643e
371
- - spec/dummy/tmp/cache/assets/development/sprockets/c5b3877d49b39932a7557611cefca9a6
372
- - spec/dummy/tmp/cache/assets/development/sprockets/ca491e325ff6948be9292f701aa4ce64
373
- - spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994
374
- - spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6
375
- - spec/dummy/tmp/cache/assets/development/sprockets/d9856638a3c7b9cfd9d1b884e3b33982
376
- - spec/dummy/tmp/cache/assets/development/sprockets/ddba6e841f28d3005e828fbfffd18b74
377
- - spec/dummy/tmp/cache/assets/development/sprockets/df935e399019055729aa968bd7062096
378
- - spec/dummy/tmp/cache/assets/development/sprockets/ef82c31948061751bb026663b54484e1
379
- - spec/dummy/tmp/cache/assets/development/sprockets/f0b5d4bea0c6cdd1904e1e9a0a45532f
380
- - spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655
381
- - spec/dummy/tmp/cache/assets/development/sprockets/f8018075b7aca72974f4014bbbc75ab5
382
341
  - spec/factories/payola_affiliates.rb
383
342
  - spec/factories/payola_coupons.rb
384
343
  - spec/factories/product.rb