koudoku 1.1.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +7 -7
- data/app/concerns/koudoku/subscription.rb +1 -1
- data/app/controllers/koudoku/application_controller.rb +5 -1
- data/app/helpers/koudoku/application_helper.rb +6 -0
- data/lib/generators/koudoku/templates/config/initializers/koudoku.rb +3 -0
- data/lib/koudoku.rb +3 -0
- data/lib/koudoku/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 014fa4c5942241aa28303b621413ebca94c1debc
|
4
|
+
data.tar.gz: a36a27fc806f8dbaf0d5ce563a9cd8bc7a18f1fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e077820743b976d6b261807db7b01492450033861806900e601822982a2811717c2325e912fa71b2d3ef03204eb8e86102f3c352283aefc4bdb135dc13f1925e
|
7
|
+
data.tar.gz: 656010d4338ffea9add5f0682dbdd263261eac84fc553ef29a36a971a57b5ca8881786c2be1409bcc53ebd77cf53b12b7a634ede638fc0cb53def7fa17fb71a9
|
data/Rakefile
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
#!/usr/bin/env rake
|
2
2
|
require "bundler/gem_tasks"
|
3
3
|
|
4
|
-
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
5
|
-
load 'rails/tasks/engine.rake'
|
6
|
-
|
7
|
-
require 'rspec/core/rake_task'
|
8
|
-
RSpec::Core::RakeTask.new(spec: 'app:db:test:prepare')
|
9
|
-
|
10
|
-
task default: :spec
|
4
|
+
# APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
5
|
+
# load 'rails/tasks/engine.rake'
|
6
|
+
#
|
7
|
+
# require 'rspec/core/rake_task'
|
8
|
+
# RSpec::Core::RakeTask.new(spec: 'app:db:test:prepare')
|
9
|
+
#
|
10
|
+
# task default: :spec
|
@@ -1,6 +1,10 @@
|
|
1
1
|
module Koudoku
|
2
2
|
class ApplicationController < ::ApplicationController
|
3
|
-
layout
|
3
|
+
layout Koudoku.layout
|
4
4
|
helper :application
|
5
|
+
|
6
|
+
# stolen from http://stackoverflow.com/questions/9232175/access-main-app-helpers-when-overridings-a-rails-engine-view-layout#comment44856124_19453140
|
7
|
+
# to solve the problem of having to reference "main_app.$some_model_path" in layouts
|
8
|
+
helper Rails.application.routes.url_helpers
|
5
9
|
end
|
6
10
|
end
|
@@ -22,5 +22,11 @@ module Koudoku
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
+
# returns TRUE if the controller belongs to Koudoku
|
26
|
+
# false in all other cases, for convenience when executing filters
|
27
|
+
# in the main application
|
28
|
+
def koudoku_controller?
|
29
|
+
is_a? Koudoku::ApplicationController
|
30
|
+
end
|
25
31
|
end
|
26
32
|
end
|
@@ -6,6 +6,9 @@ Koudoku.setup do |config|
|
|
6
6
|
Stripe.api_version = '2015-01-11' #Making sure the API version used is compatible.
|
7
7
|
# config.prorate = false # Default is true, set to false to disable prorating subscriptions
|
8
8
|
# config.free_trial_length = 30
|
9
|
+
|
10
|
+
# Specify layout you want to use for the subscription pages, default is application
|
11
|
+
config.layout = 'application'
|
9
12
|
|
10
13
|
# you can subscribe to additional webhooks here
|
11
14
|
# we use stripe_event under the hood and you can subscribe using the
|
data/lib/koudoku.rb
CHANGED
@@ -19,6 +19,9 @@ module Koudoku
|
|
19
19
|
mattr_accessor :prorate
|
20
20
|
@@prorate = true
|
21
21
|
|
22
|
+
mattr_accessor :layout
|
23
|
+
@@layout = nil
|
24
|
+
|
22
25
|
def self.webhooks_api_key=(key)
|
23
26
|
raise "Koudoku no longer uses an API key to secure webhooks, please delete the line from \"config/initializers/koudoku.rb\""
|
24
27
|
end
|
data/lib/koudoku/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: koudoku
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|