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: bf4021227c337b34c71aefdfe939c64b19d4d9ca
4
- data.tar.gz: 3034aa654da34ed9aea889dce314a6fe5d2ebc55
3
+ metadata.gz: cd0598e6abdb1ec01c7900ee38b59231c6a8a6d8
4
+ data.tar.gz: d75ef361d3659a13b4d2d4b7893e3e90ebf89924
5
5
  SHA512:
6
- metadata.gz: c77bd85fd0842b18e3bd335924fdbd66ee2ffc888db6baa837e70686d3763dd5d7cfced580130e7da1c9ee551b3d35883f775fb08f01b78f3b9f5601660950a1
7
- data.tar.gz: 18a6f2dbff9003d8ae9759d4afff37281c2ea53afe760427d550c42b57a1d2ed7e0f992cff8c24c35a1bb56a283434674a62b5a717d08c736dcc7fe67502c885
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
 
@@ -1,3 +1,3 @@
1
1
  module StripeSaas
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
Binary file
@@ -3660,3 +3660,29 @@ Migrating to CreatePlanFeatures (20151220161817)
3660
3660
   (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150102001930')
3661
3661
   (1.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20151220161809')
3662
3662
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3663
+ ActiveRecord::SchemaMigration Load (1.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
3664
+  (2.2ms) CREATE 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) 
3665
+  (2.8ms) 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
+  (1.7ms) CREATE 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) 
3667
+  (1.7ms) 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
+  (2.0ms) CREATE 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) 
3669
+  (1.3ms) select sqlite_version(*)
3670
+  (1.9ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
3671
+  (0.1ms) 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
+  (1.5ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
3680
+  (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
3681
+  (2.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3682
+  (0.1ms) SELECT version FROM "schema_migrations"
3683
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20151220161817')
3684
+  (2.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150101233243')
3685
+  (2.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150102001921')
3686
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20150102001930')
3687
+  (2.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20151220161809')
3688
+ ActiveRecord::SchemaMigration Load (0.1ms) 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.6
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-04-18 00:00:00.000000000 Z
11
+ date: 2016-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails