stripe_saas 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd0598e6abdb1ec01c7900ee38b59231c6a8a6d8
|
4
|
+
data.tar.gz: d75ef361d3659a13b4d2d4b7893e3e90ebf89924
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9887e2242bf6c066c47344f18f6ab198e0756710dc8b5c7de93ab25878093849da10ca5b1d1f8c6406f1a284e391962e85997a9920d6b8d0b1adff9570bfff75
|
7
|
+
data.tar.gz: 5b866c5a6a43fe62594a91886582b606854f4a86eee6cd0d4286b89c83d4f868956d19e7bd779167a2e93b524df3604c314d8093b9b80eee9296ff1d2cceafda
|
@@ -81,7 +81,7 @@ module StripeSaas
|
|
81
81
|
begin
|
82
82
|
plan = ::Plan.find(params[:plan])
|
83
83
|
rescue ActiveRecord::RecordNotFound
|
84
|
-
plan = ::Plan.by_stripe_id(params[:plan])
|
84
|
+
plan = ::Plan.by_stripe_id(params[:plan]).try(:first)
|
85
85
|
end
|
86
86
|
|
87
87
|
if plan
|
@@ -132,7 +132,7 @@ module StripeSaas
|
|
132
132
|
|
133
133
|
else
|
134
134
|
@subscription = ::Subscription.new
|
135
|
-
@subscription.plan = ::Plan.find_by_stripe_id(params[:plan])
|
135
|
+
@subscription.plan = ::Plan.find_by_stripe_id(params[:plan]).try(:first)
|
136
136
|
end
|
137
137
|
end
|
138
138
|
|
data/lib/stripe_saas/version.rb
CHANGED
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/spec/dummy/log/test.log
CHANGED
@@ -3660,3 +3660,29 @@ Migrating to CreatePlanFeatures (20151220161817)
|
|
3660
3660
|
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150102001930')
|
3661
3661
|
[1m[36m (1.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151220161809')[0m
|
3662
3662
|
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
3663
|
+
[1m[36mActiveRecord::SchemaMigration Load (1.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
3664
|
+
[1m[36m (2.2ms)[0m [1mCREATE TABLE "features" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "description" varchar, "feature_type" varchar, "unit" varchar, "display_order" integer, "use_unit" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
3665
|
+
[1m[35m (2.8ms)[0m CREATE TABLE "plan_features" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "value" varchar, "display_value" varchar, "plan_id" integer, "feature_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
3666
|
+
[1m[36m (1.7ms)[0m [1mCREATE TABLE "plans" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "stripe_id" varchar, "name" varchar, "price_cents" integer, "interval" varchar, "interval_count" integer, "trial_period_days" integer, "metadata_as_json" text, "statement_descriptor" text, "highlight" boolean, "display_order" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
3667
|
+
[1m[35m (1.7ms)[0m CREATE TABLE "subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "stripe_id" varchar, "plan_id" integer, "last_four" varchar, "card_type" varchar, "current_price_cents" integer, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
3668
|
+
[1m[36m (2.0ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar DEFAULT '' NOT NULL, "encrypted_password" varchar DEFAULT '' NOT NULL, "reset_password_token" varchar, "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0 NOT NULL, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar, "last_sign_in_ip" varchar, "created_at" datetime, "updated_at" datetime) [0m
|
3669
|
+
[1m[35m (1.3ms)[0m select sqlite_version(*)
|
3670
|
+
[1m[36m (1.9ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")[0m
|
3671
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
3672
|
+
FROM sqlite_master
|
3673
|
+
WHERE name='index_users_on_email' AND type='index'
|
3674
|
+
UNION ALL
|
3675
|
+
SELECT sql
|
3676
|
+
FROM sqlite_temp_master
|
3677
|
+
WHERE name='index_users_on_email' AND type='index'
|
3678
|
+
|
3679
|
+
[1m[36m (1.5ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
3680
|
+
[1m[35m (1.7ms)[0m CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
|
3681
|
+
[1m[36m (2.2ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
3682
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
3683
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151220161817')[0m
|
3684
|
+
[1m[35m (2.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150101233243')
|
3685
|
+
[1m[36m (2.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150102001921')[0m
|
3686
|
+
[1m[35m (1.3ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150102001930')
|
3687
|
+
[1m[36m (2.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151220161809')[0m
|
3688
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe_saas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Sam-Bodden
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|