payola-payments 1.0.1 → 1.0.2

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWQxYzZkNGE4NzJmZjc0NjRjMTA4NjNiZmQyODNhNjhiODZlZTRlMw==
4
+ MTk2MGVjYTZiNDNjYzNhMWQxYjQxYWE0MDIzNzZjZDYxYTgxYWNmYg==
5
5
  data.tar.gz: !binary |-
6
- ZjFhMDA0ZGMzMjJjYWVjMDcxNDQxM2ZiMDZlODJkZDIwNGZhMDI4Zg==
6
+ ZjM2YTI1OWI5NDA3ODc2MGM0N2E2MzRmOGY5ZDRkNjk0YTQ3ZDAzMA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OGY5MjhiZWZjOTQyNDgyYjMyNDVhMDA5MDUyZTJmMThmOTE4ZmExZjQwY2Yx
10
- M2JmYWI5MTU3MzFjZjMwZDMxZTJiOGQ3NzE5YmU5YjliZWIzZTFhMTg5Njc0
11
- ZDczYTk2NGQyNWU0MzJhYmFhZGMwM2Y4OGI2YTdiOGQxOTUwZTc=
9
+ NzNkMDVlNWQ0YWM4OTg4NGRmZWIxY2ZhMWYxMWM3MTIxMTBhYTQyYTZiZDhh
10
+ YjBkOTM0MzA0ZmNjYTBkNjE2ODM1ODk3NTk5MDRlZmQ1OTZhNGFkN2QxZDhi
11
+ NWQ3OGY4Y2Y0MWMzNzRjMTRlMDQ1MWI0MjA0ZjRhODdjNWEyYzI=
12
12
  data.tar.gz: !binary |-
13
- MTc5ZWI0MjUyODdjMzMxNDFjOGMyNDIzYzc2MTM3M2JkMGNjYjg4ZDRlOGIx
14
- MTE0MzZmNTJhNjY2NTU3YWQwYzU1YzMxY2RiMjgzOTdiYzY2OWZhNDM0YThh
15
- ODM2ZmM3ZWMxYmM4ZGZkOGY2NTkxZDg1OGNlZjBmOWE4MzA5ZDE=
13
+ NTBhYTg5MjJiNjk4NzdhMjA0M2I2YzFmYmE2MWU0MGU4ZDhlOTQxNWI3YzYw
14
+ ODZjZTc0Mjc2NmU0ZTc2ZWJmZDIzMWQwYzA5ODkyNGRjODJjZjBiY2ZiZjY3
15
+ NGRmZTYwODA1Yzk1MGE1ZTZjNGNlZDczNWM1ZWMxNzdjNzk3Zjk=
@@ -0,0 +1,9 @@
1
+ module Payola
2
+ class InstallGenerator < Rails::Generators::Base
3
+ source_root File.expand_path('../templates', __FILE__)
4
+
5
+ def install_initializer
6
+ initializer 'payola.rb', File.read(File.expand_path('../templates/initializer.rb', __FILE__))
7
+ end
8
+ end
9
+ end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Payola
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
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.1
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-15 00:00:00.000000000 Z
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