payola-payments 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/generators/payola/install_generator.rb +9 -0
- data/lib/generators/payola/templates/initializer.rb +22 -0
- data/lib/payola/engine.rb +10 -0
- data/lib/payola/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTk2MGVjYTZiNDNjYzNhMWQxYjQxYWE0MDIzNzZjZDYxYTgxYWNmYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjM2YTI1OWI5NDA3ODc2MGM0N2E2MzRmOGY5ZDRkNjk0YTQ3ZDAzMA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NzNkMDVlNWQ0YWM4OTg4NGRmZWIxY2ZhMWYxMWM3MTIxMTBhYTQyYTZiZDhh
|
10
|
+
YjBkOTM0MzA0ZmNjYTBkNjE2ODM1ODk3NTk5MDRlZmQ1OTZhNGFkN2QxZDhi
|
11
|
+
NWQ3OGY4Y2Y0MWMzNzRjMTRlMDQ1MWI0MjA0ZjRhODdjNWEyYzI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTBhYTg5MjJiNjk4NzdhMjA0M2I2YzFmYmE2MWU0MGU4ZDhlOTQxNWI3YzYw
|
14
|
+
ODZjZTc0Mjc2NmU0ZTc2ZWJmZDIzMWQwYzA5ODkyNGRjODJjZjBiY2ZiZjY3
|
15
|
+
NGRmZTYwODA1Yzk1MGE1ZTZjNGNlZDczNWM1ZWMxNzdjNzk3Zjk=
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Payola.configure do |config|
|
2
|
+
# Example subscription:
|
3
|
+
#
|
4
|
+
# config.subscribe 'payola.package.sale.finished' do |sale|
|
5
|
+
# EmailSender.send_an_email(sale.email)
|
6
|
+
# end
|
7
|
+
#
|
8
|
+
# In addition to any event that Stripe sends, you can subscribe
|
9
|
+
# to the following special payola events:
|
10
|
+
#
|
11
|
+
# - payola.<sellable class>.sale.finished
|
12
|
+
# - payola.<sellable class>.sale.refunded
|
13
|
+
# - payola.<sellable class>.sale.failed
|
14
|
+
#
|
15
|
+
# These events consume a Payola::Sale, not a Stripe::Event
|
16
|
+
#
|
17
|
+
# Example charge verifier:
|
18
|
+
#
|
19
|
+
# config.charge_verifier = lambda do |sale|
|
20
|
+
# raise "Nope!" if sale.email.includes?('yahoo.com')
|
21
|
+
# end
|
22
|
+
end
|
data/lib/payola/engine.rb
CHANGED
@@ -17,5 +17,15 @@ module Payola
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
20
|
+
|
21
|
+
initializer :inject_helpers do |app|
|
22
|
+
ActiveSupport.on_load :action_controller do
|
23
|
+
helper Payola::PriceHelper
|
24
|
+
end
|
25
|
+
|
26
|
+
ActiveSupport.on_load :action_mailer do
|
27
|
+
helper Payola::PriceHelper
|
28
|
+
end
|
29
|
+
end
|
20
30
|
end
|
21
31
|
end
|
data/lib/payola/version.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.0.
|
4
|
+
version: 1.0.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-10-
|
11
|
+
date: 2014-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -186,6 +186,8 @@ files:
|
|
186
186
|
- db/migrate/20141002013618_create_payola_coupons.rb
|
187
187
|
- db/migrate/20141002013701_create_payola_affiliates.rb
|
188
188
|
- db/migrate/20141002203725_add_stripe_customer_id_to_sale.rb
|
189
|
+
- lib/generators/payola/install_generator.rb
|
190
|
+
- lib/generators/payola/templates/initializer.rb
|
189
191
|
- lib/payola-payments.rb
|
190
192
|
- lib/payola.rb
|
191
193
|
- lib/payola/engine.rb
|