koudoku 0.0.11 → 1.0.0
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 +4 -4
- data/README.md +56 -17
- data/Rakefile +1 -32
- data/app/concerns/koudoku/plan.rb +0 -8
- data/app/concerns/koudoku/subscription.rb +36 -20
- data/app/controllers/koudoku/subscriptions_controller.rb +45 -11
- data/app/views/koudoku/subscriptions/_card.html.erb +1 -1
- data/app/views/koudoku/subscriptions/show.html.erb +6 -6
- data/config/initializers/stripe_event.rb +27 -0
- data/config/routes.rb +3 -1
- data/lib/generators/koudoku/install_generator.rb +27 -31
- data/lib/generators/koudoku/templates/app/models/coupon.rb +5 -0
- data/lib/generators/koudoku/templates/app/models/plan.rb +6 -0
- data/lib/generators/koudoku/templates/app/models/subscription.rb +8 -0
- data/lib/generators/koudoku/templates/config/initializers/koudoku.rb +13 -0
- data/lib/generators/koudoku/views_generator.rb +5 -2
- data/lib/koudoku/version.rb +1 -1
- data/lib/koudoku.rb +28 -10
- data/spec/concerns/koudoku/plan_spec.rb +13 -13
- data/spec/dummy/app/models/plan.rb +0 -1
- data/spec/dummy/config/application.rb +0 -6
- data/spec/dummy/config/environments/development.rb +2 -7
- data/spec/dummy/config/environments/production.rb +2 -0
- data/spec/dummy/config/environments/test.rb +2 -3
- data/spec/dummy/config/initializers/koudoku.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +48 -0
- data/spec/dummy/log/test.log +203 -0
- metadata +60 -48
- data/app/controllers/koudoku/webhooks_controller.rb +0 -39
- data/spec/controllers/koudoku/webhooks_controller_spec.rb +0 -76
- data/spec/dummy/spec/factories/coupons.rb +0 -8
- data/spec/dummy/spec/factories/plans.rb +0 -12
- data/spec/dummy/spec/factories/subscriptions.rb +0 -14
- data/spec/dummy/spec/models/coupon_spec.rb +0 -5
- data/spec/dummy/spec/models/plan_spec.rb +0 -5
- data/spec/dummy/spec/models/subscription_spec.rb +0 -5
@@ -0,0 +1,13 @@
|
|
1
|
+
Koudoku.setup do |config|
|
2
|
+
config.subscriptions_owned_by = :<%= subscription_owner_model %>
|
3
|
+
config.stripe_publishable_key = ENV['STRIPE_PUBLISHABLE_KEY']
|
4
|
+
config.stripe_secret_key = ENV['STRIPE_SECRET_KEY']
|
5
|
+
# config.prorate = false # Default is true, set to false to disable prorating subscriptions
|
6
|
+
# config.free_trial_length = 30
|
7
|
+
|
8
|
+
# you can subscribe to additional webhooks here
|
9
|
+
# we use stripe_event under the hood and you can subscribe using the
|
10
|
+
# stripe_event syntax on the config object:
|
11
|
+
# config.subscribe 'charge.failed', Koudoku::ChargeFailed
|
12
|
+
|
13
|
+
end
|
@@ -10,7 +10,7 @@ module Koudoku
|
|
10
10
|
class ViewsGenerator < Rails::Generators::Base
|
11
11
|
|
12
12
|
# Not sure what this does.
|
13
|
-
source_root
|
13
|
+
source_root "#{Koudoku::Engine.root}/app/views/koudoku/subscriptions"
|
14
14
|
|
15
15
|
include Rails::Generators::Migration
|
16
16
|
|
@@ -18,7 +18,10 @@ module Koudoku
|
|
18
18
|
|
19
19
|
def install
|
20
20
|
|
21
|
-
|
21
|
+
# all entries in app/views/koudoku/subscriptions without . and ..
|
22
|
+
# ==> all FILES in the directory
|
23
|
+
files_to_copy = Dir.entries("#{Koudoku::Engine.root}/app/views/koudoku/subscriptions") - %w[. ..]
|
24
|
+
files_to_copy.each do |file|
|
22
25
|
copy_file file, "app/views/koudoku/subscriptions/#{file}"
|
23
26
|
end
|
24
27
|
|
data/lib/koudoku/version.rb
CHANGED
data/lib/koudoku.rb
CHANGED
@@ -1,12 +1,9 @@
|
|
1
1
|
require "koudoku/engine"
|
2
2
|
require "generators/koudoku/install_generator"
|
3
3
|
require "generators/koudoku/views_generator"
|
4
|
+
require 'stripe_event'
|
4
5
|
|
5
6
|
module Koudoku
|
6
|
-
|
7
|
-
mattr_accessor :webhooks_api_key
|
8
|
-
@@webhooks_api_key = nil
|
9
|
-
|
10
7
|
mattr_accessor :subscriptions_owned_by
|
11
8
|
@@subscriptions_owned_by = nil
|
12
9
|
|
@@ -18,6 +15,13 @@ module Koudoku
|
|
18
15
|
|
19
16
|
mattr_accessor :free_trial_length
|
20
17
|
@@free_trial_length = nil
|
18
|
+
|
19
|
+
mattr_accessor :prorate
|
20
|
+
@@prorate = true
|
21
|
+
|
22
|
+
def self.webhooks_api_key=(key)
|
23
|
+
raise "Koudoku no longer uses an API key to secure webhooks, please delete the line from \"config/initializers/koudoku.rb\""
|
24
|
+
end
|
21
25
|
|
22
26
|
def self.setup
|
23
27
|
yield self
|
@@ -33,18 +37,16 @@ module Koudoku
|
|
33
37
|
|
34
38
|
# e.g. :user_id
|
35
39
|
def self.owner_id_sym
|
36
|
-
#
|
37
|
-
(Koudoku.subscriptions_owned_by.to_s + '_id').to_sym
|
40
|
+
:"#{Koudoku.subscriptions_owned_by}_id"
|
38
41
|
end
|
39
42
|
|
43
|
+
# e.g. :user=
|
40
44
|
def self.owner_assignment_sym
|
41
|
-
#
|
42
|
-
(Koudoku.subscriptions_owned_by.to_s + '=').to_sym
|
45
|
+
:"#{Koudoku.subscriptions_owned_by}="
|
43
46
|
end
|
44
47
|
|
45
|
-
# e.g.
|
48
|
+
# e.g. User
|
46
49
|
def self.owner_class
|
47
|
-
# e.g. User
|
48
50
|
Koudoku.subscriptions_owned_by.to_s.classify.constantize
|
49
51
|
end
|
50
52
|
|
@@ -52,4 +54,20 @@ module Koudoku
|
|
52
54
|
free_trial_length.to_i > 0
|
53
55
|
end
|
54
56
|
|
57
|
+
|
58
|
+
#
|
59
|
+
# STRIPE_EVENT section
|
60
|
+
#
|
61
|
+
def self.subscribe(name, callable = Proc.new)
|
62
|
+
StripeEvent.subscribe(name, callable)
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.instrument(name, object)
|
66
|
+
StripeEvent.backend.instrument(StripeEvent.namespace.call(name), object)
|
67
|
+
end
|
68
|
+
|
69
|
+
def self.all(callable = Proc.new)
|
70
|
+
StripeEvent.all(callable)
|
71
|
+
end
|
72
|
+
|
55
73
|
end
|
@@ -2,35 +2,35 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Koudoku::Plan do
|
4
4
|
describe '#is_upgrade_from?' do
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
|
6
|
+
class FakePlan
|
7
|
+
attr_accessor :price
|
8
|
+
include Koudoku::Plan
|
9
|
+
end
|
10
|
+
|
11
11
|
it 'returns true if the price is higher' do
|
12
|
-
plan =
|
12
|
+
plan = FakePlan.new
|
13
13
|
plan.price = 123.23
|
14
|
-
cheaper_plan =
|
14
|
+
cheaper_plan = FakePlan.new
|
15
15
|
cheaper_plan.price = 61.61
|
16
16
|
plan.is_upgrade_from?(cheaper_plan).should be_true
|
17
17
|
end
|
18
18
|
it 'returns true if the price is the same' do
|
19
|
-
plan =
|
19
|
+
plan = FakePlan.new
|
20
20
|
plan.price = 123.23
|
21
21
|
plan.is_upgrade_from?(plan).should be_true
|
22
22
|
end
|
23
23
|
it 'returns false if the price is the same or higher' do
|
24
|
-
plan =
|
24
|
+
plan = FakePlan.new
|
25
25
|
plan.price = 61.61
|
26
|
-
more_expensive_plan =
|
26
|
+
more_expensive_plan = FakePlan.new
|
27
27
|
more_expensive_plan.price = 123.23
|
28
28
|
plan.is_upgrade_from?(more_expensive_plan).should be_false
|
29
29
|
end
|
30
30
|
it 'handles a nil value gracefully' do
|
31
|
-
plan =
|
31
|
+
plan = FakePlan.new
|
32
32
|
plan.price = 123.23
|
33
|
-
cheaper_plan =
|
33
|
+
cheaper_plan = FakePlan.new
|
34
34
|
lambda {
|
35
35
|
plan.is_upgrade_from?(cheaper_plan).should be_true
|
36
36
|
}.should_not raise_error
|
@@ -45,12 +45,6 @@ module Dummy
|
|
45
45
|
# like if you have constraints or database-specific column types
|
46
46
|
# config.active_record.schema_format = :sql
|
47
47
|
|
48
|
-
# Enforce whitelist mode for mass assignment.
|
49
|
-
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
50
|
-
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
51
|
-
# parameters by using an attr_accessible or attr_protected declaration.
|
52
|
-
config.active_record.whitelist_attributes = true
|
53
|
-
|
54
48
|
# Enable the asset pipeline
|
55
49
|
config.assets.enabled = true
|
56
50
|
|
@@ -22,16 +22,11 @@ Dummy::Application.configure do
|
|
22
22
|
# Only use best-standards-support built into browsers
|
23
23
|
config.action_dispatch.best_standards_support = :builtin
|
24
24
|
|
25
|
-
# Raise exception on mass assignment protection for Active Record models
|
26
|
-
config.active_record.mass_assignment_sanitizer = :strict
|
27
|
-
|
28
|
-
# Log the query plan for queries taking more than this (works
|
29
|
-
# with SQLite, MySQL, and PostgreSQL)
|
30
|
-
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
31
|
-
|
32
25
|
# Do not compress assets
|
33
26
|
config.assets.compress = false
|
34
27
|
|
35
28
|
# Expands the lines which load the assets
|
36
29
|
config.assets.debug = true
|
30
|
+
|
31
|
+
config.eager_load = false
|
37
32
|
end
|
@@ -29,9 +29,8 @@ Dummy::Application.configure do
|
|
29
29
|
# ActionMailer::Base.deliveries array.
|
30
30
|
config.action_mailer.delivery_method = :test
|
31
31
|
|
32
|
-
# Raise exception on mass assignment protection for Active Record models
|
33
|
-
config.active_record.mass_assignment_sanitizer = :strict
|
34
|
-
|
35
32
|
# Print deprecation notices to the stderr
|
36
33
|
config.active_support.deprecation = :stderr
|
34
|
+
|
35
|
+
config.eager_load = false
|
37
36
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
Koudoku.setup do |config|
|
2
|
-
config.webhooks_api_key = "2f1a9b40-abe4-4bbc-86c8-8e7bd000c8b3"
|
2
|
+
#config.webhooks_api_key = "2f1a9b40-abe4-4bbc-86c8-8e7bd000c8b3"
|
3
3
|
config.subscriptions_owned_by = :customer
|
4
4
|
config.stripe_publishable_key = 'not_stripe_publishable_key'
|
5
5
|
config.stripe_secret_key = 'not_stripe_secret_key'
|
Binary file
|
Binary file
|
@@ -0,0 +1,48 @@
|
|
1
|
+
Connecting to database specified by database.yml
|
2
|
+
[1m[36m (0.4ms)[0m [1mselect sqlite_version(*)[0m
|
3
|
+
[1m[35m (1.3ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
4
|
+
[1m[36m (1.0ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
5
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
6
|
+
Connecting to database specified by database.yml
|
7
|
+
[1m[36m (0.0ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
8
|
+
Migrating to CreateCustomers (20130318201927)
|
9
|
+
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
10
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
11
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
12
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20130318201927')[0m
|
13
|
+
[1m[35m (1.4ms)[0m commit transaction
|
14
|
+
Migrating to CreateSubscriptions (20130318204455)
|
15
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "stripe_id" varchar(255), "plan_id" integer, "last_four" varchar(255), "coupon_id" integer, "card_type" varchar(255), "current_price" float, "customer_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
17
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20130318204455')[0m
|
18
|
+
[1m[35m (0.6ms)[0m commit transaction
|
19
|
+
Migrating to CreatePlans (20130318204458)
|
20
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
21
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "plans" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "stripe_id" varchar(255), "price" float, "features" text, "highlight" boolean, "display_order" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
22
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20130318204458')[0m
|
23
|
+
[1m[35m (0.6ms)[0m commit transaction
|
24
|
+
Migrating to CreateCoupons (20130318204502)
|
25
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
26
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "code" varchar(255), "free_trial_length" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
27
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20130318204502')[0m
|
28
|
+
[1m[35m (0.6ms)[0m commit transaction
|
29
|
+
Migrating to AddIntervalToPlan (20130520163946)
|
30
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
31
|
+
[1m[35m (0.2ms)[0m ALTER TABLE "plans" ADD "interval" varchar(255)
|
32
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20130520163946')[0m
|
33
|
+
[1m[35m (0.6ms)[0m commit transaction
|
34
|
+
[1m[36m (0.0ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
35
|
+
[1m[35m (0.0ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
36
|
+
[1m[36m (0.2ms)[0m [1mselect sqlite_version(*)[0m
|
37
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "code" varchar(255), "free_trial_length" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
38
|
+
[1m[36m (0.6ms)[0m [1mCREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
39
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "plans" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "stripe_id" varchar(255), "price" float, "features" text, "highlight" boolean, "display_order" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "interval" varchar(255))
|
40
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "stripe_id" varchar(255), "plan_id" integer, "last_four" varchar(255), "coupon_id" integer, "card_type" varchar(255), "current_price" float, "customer_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
41
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
42
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
43
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
44
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20130520163946')[0m
|
45
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20130318201927')
|
46
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20130318204455')[0m
|
47
|
+
[1m[35m (0.5ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20130318204458')
|
48
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20130318204502')[0m
|
@@ -0,0 +1,203 @@
|
|
1
|
+
Connecting to database specified by database.yml
|
2
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
3
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
4
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
6
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
7
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
8
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
9
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
10
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
11
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
12
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
13
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
14
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
16
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
18
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
19
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
20
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
21
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
22
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
23
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
24
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
26
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
28
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
29
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
30
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
31
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
32
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
33
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
34
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
35
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
36
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
37
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
38
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
39
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
40
|
+
Connecting to database specified by database.yml
|
41
|
+
Connecting to database specified by database.yml
|
42
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
43
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
44
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
45
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
46
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
47
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
48
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
49
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
50
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
51
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
53
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
54
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
55
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
56
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
57
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
58
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
59
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
60
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
61
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
62
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
63
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
64
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
65
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
66
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
67
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
68
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
69
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
70
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
71
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
72
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
73
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
74
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
75
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
76
|
+
Connecting to database specified by database.yml
|
77
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
78
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
79
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
80
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
81
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
82
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
83
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
84
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
85
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
86
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
87
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
88
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
89
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
90
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
91
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
92
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
93
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
94
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
95
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
96
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
97
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
98
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
99
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
100
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
101
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
102
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
103
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
104
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
105
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
106
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
107
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
108
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
109
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
110
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
111
|
+
Connecting to database specified by database.yml
|
112
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
113
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
114
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
115
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
116
|
+
[1m[36mSQL (7.5ms)[0m [1mINSERT INTO "customers" ("created_at", "email", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00], ["email", "andrew.culver@gmail.com"], ["updated_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00]]
|
117
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
118
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
119
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "subscriptions" ("card_type", "coupon_id", "created_at", "current_price", "customer_id", "last_four", "plan_id", "stripe_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["card_type", nil], ["coupon_id", nil], ["created_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00], ["current_price", nil], ["customer_id", 1], ["last_four", nil], ["plan_id", nil], ["stripe_id", "customer-id"], ["updated_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00]]
|
120
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
121
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
122
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
123
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
124
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "customers" ("created_at", "email", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00], ["email", "andrew.culver@gmail.com"], ["updated_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00]]
|
125
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
126
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
127
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "subscriptions" ("card_type", "coupon_id", "created_at", "current_price", "customer_id", "last_four", "plan_id", "stripe_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["card_type", nil], ["coupon_id", nil], ["created_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00], ["current_price", nil], ["customer_id", 1], ["last_four", nil], ["plan_id", nil], ["stripe_id", "customer-id"], ["updated_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00]]
|
128
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
129
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
130
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
131
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
132
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "customers" ("created_at", "email", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00], ["email", "andrew.culver@gmail.com"], ["updated_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00]]
|
133
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
134
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
135
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "subscriptions" ("card_type", "coupon_id", "created_at", "current_price", "customer_id", "last_four", "plan_id", "stripe_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["card_type", nil], ["coupon_id", nil], ["created_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00], ["current_price", nil], ["customer_id", 1], ["last_four", nil], ["plan_id", nil], ["stripe_id", "customer-id"], ["updated_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00]]
|
136
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
137
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
138
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
139
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
140
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "customers" ("created_at", "email", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00], ["email", "andrew.culver@gmail.com"], ["updated_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00]]
|
141
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
142
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
143
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "subscriptions" ("card_type", "coupon_id", "created_at", "current_price", "customer_id", "last_four", "plan_id", "stripe_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["card_type", nil], ["coupon_id", nil], ["created_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00], ["current_price", nil], ["customer_id", 1], ["last_four", nil], ["plan_id", nil], ["stripe_id", "customer-id"], ["updated_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00]]
|
144
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
145
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
146
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
147
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
148
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "customers" ("created_at", "email", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00], ["email", "andrew.culver@gmail.com"], ["updated_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00]]
|
149
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
150
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
151
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "subscriptions" ("card_type", "coupon_id", "created_at", "current_price", "customer_id", "last_four", "plan_id", "stripe_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["card_type", nil], ["coupon_id", nil], ["created_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00], ["current_price", nil], ["customer_id", 1], ["last_four", nil], ["plan_id", nil], ["stripe_id", "customer-id"], ["updated_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00]]
|
152
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
153
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
154
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
155
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
156
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "customers" ("created_at", "email", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00], ["email", "andrew.culver@gmail.com"], ["updated_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00]]
|
157
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
158
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
159
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "subscriptions" ("card_type", "coupon_id", "created_at", "current_price", "customer_id", "last_four", "plan_id", "stripe_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["card_type", nil], ["coupon_id", nil], ["created_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00], ["current_price", nil], ["customer_id", 1], ["last_four", nil], ["plan_id", nil], ["stripe_id", "customer-id"], ["updated_at", Sun, 15 Feb 2015 10:37:49 UTC +00:00]]
|
160
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
161
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
162
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
163
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
164
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
165
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
166
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
167
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
168
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
169
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
170
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
171
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
172
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
173
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
174
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
175
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
176
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
177
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
178
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
179
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
180
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
181
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
182
|
+
Connecting to database specified by database.yml
|
183
|
+
Connecting to database specified by database.yml
|
184
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
185
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
186
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
187
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
188
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
189
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
190
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
191
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
192
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
193
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
194
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
195
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
196
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
197
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
198
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
199
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
200
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
201
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
202
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
203
|
+
[1m[35m (0.0ms)[0m rollback transaction
|