stripe_saas 0.0.7 → 0.0.8

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: cd0598e6abdb1ec01c7900ee38b59231c6a8a6d8
4
- data.tar.gz: d75ef361d3659a13b4d2d4b7893e3e90ebf89924
3
+ metadata.gz: c92e60e4506a887cc92abe8ffcf8438355152d14
4
+ data.tar.gz: 8e15c4fca16ebd1ef6bf3c347546c9c5f79a84fd
5
5
  SHA512:
6
- metadata.gz: 9887e2242bf6c066c47344f18f6ab198e0756710dc8b5c7de93ab25878093849da10ca5b1d1f8c6406f1a284e391962e85997a9920d6b8d0b1adff9570bfff75
7
- data.tar.gz: 5b866c5a6a43fe62594a91886582b606854f4a86eee6cd0d4286b89c83d4f868956d19e7bd779167a2e93b524df3604c314d8093b9b80eee9296ff1d2cceafda
6
+ metadata.gz: 21b96facae4217453da88a990b0b9d197b747badb2667915cbd0425baeed1408b0d237af5b426f36648471b560d736756225edee3d70bb3077d4bc419a177555
7
+ data.tar.gz: 00eff34be9533e60277d7368de0a6cb189ec1dd5d4cdeb5c1dfa92606f497bc4c49d4eab4fb0fa1c7fa3d44f5540b1ec13c6e7e7230c84c8ecdf7b076251ba6d
@@ -1,9 +1,9 @@
1
1
  module StripeSaas
2
2
  class SubscriptionsController < ApplicationController
3
- before_filter :load_owner
4
- before_filter :show_existing_subscription, only: [:index, :new, :create], unless: :no_owner?
5
- before_filter :load_subscription, only: [:show, :cancel, :edit, :update]
6
- before_filter :load_plans, only: [:index, :edit]
3
+ before_action :load_owner
4
+ before_action :show_existing_subscription, only: [:index, :new, :create], unless: :no_owner?
5
+ before_action :load_subscription, only: [:show, :cancel, :edit, :update]
6
+ before_action :load_plans, only: [:index, :edit]
7
7
 
8
8
  def load_plans
9
9
  @plans = ::Plan.order(:price_cents)
@@ -1,3 +1,3 @@
1
1
  module StripeSaas
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
Binary file
@@ -3686,3 +3686,107 @@ Migrating to CreatePlanFeatures (20151220161817)
3686
3686
   (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20150102001930')
3687
3687
   (2.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20151220161809')
3688
3688
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3689
+ ActiveRecord::SchemaMigration Load (1.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
3690
+  (2.1ms) 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) 
3691
+  (1.9ms) 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)
3692
+  (2.5ms) 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) 
3693
+  (0.9ms) 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)
3694
+  (2.2ms) 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) 
3695
+  (1.2ms) select sqlite_version(*)
3696
+  (2.0ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
3697
+  (0.1ms) SELECT sql
3698
+ FROM sqlite_master
3699
+ WHERE name='index_users_on_email' AND type='index'
3700
+ UNION ALL
3701
+ SELECT sql
3702
+ FROM sqlite_temp_master
3703
+ WHERE name='index_users_on_email' AND type='index'
3704
+
3705
+  (1.8ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
3706
+  (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
3707
+  (2.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3708
+  (0.1ms) SELECT version FROM "schema_migrations"
3709
+  (2.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20151220161817')
3710
+  (2.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20150101233243')
3711
+  (4.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20150102001921')
3712
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150102001930')
3713
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20151220161809')
3714
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3715
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
3716
+  (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) 
3717
+  (0.9ms) 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)
3718
+  (1.8ms) 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) 
3719
+  (2.4ms) 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)
3720
+  (2.4ms) 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) 
3721
+  (0.1ms) select sqlite_version(*)
3722
+  (1.7ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
3723
+  (0.1ms) SELECT sql
3724
+ FROM sqlite_master
3725
+ WHERE name='index_users_on_email' AND type='index'
3726
+ UNION ALL
3727
+ SELECT sql
3728
+ FROM sqlite_temp_master
3729
+ WHERE name='index_users_on_email' AND type='index'
3730
+
3731
+  (1.3ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
3732
+  (1.6ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
3733
+  (1.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3734
+  (0.2ms) SELECT version FROM "schema_migrations"
3735
+  (1.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20151220161817')
3736
+  (1.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150101233243')
3737
+  (1.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20150102001921')
3738
+  (1.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20150102001930')
3739
+  (3.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20151220161809')
3740
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3741
+ ActiveRecord::SchemaMigration Load (1.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
3742
+  (2.0ms) 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) 
3743
+  (1.6ms) 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)
3744
+  (2.3ms) 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) 
3745
+  (2.6ms) 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)
3746
+  (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) 
3747
+  (1.3ms) select sqlite_version(*)
3748
+  (1.7ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
3749
+  (0.1ms) SELECT sql
3750
+ FROM sqlite_master
3751
+ WHERE name='index_users_on_email' AND type='index'
3752
+ UNION ALL
3753
+ SELECT sql
3754
+ FROM sqlite_temp_master
3755
+ WHERE name='index_users_on_email' AND type='index'
3756
+
3757
+  (1.7ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
3758
+  (1.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
3759
+  (2.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3760
+  (0.1ms) SELECT version FROM "schema_migrations"
3761
+  (2.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20151220161817')
3762
+  (2.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20150101233243')
3763
+  (1.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150102001921')
3764
+  (2.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150102001930')
3765
+  (2.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20151220161809')
3766
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3767
+ ActiveRecord::SchemaMigration Load (1.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3768
+  (3.4ms) 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) 
3769
+  (1.2ms) 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)
3770
+  (1.2ms) 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) 
3771
+  (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)
3772
+  (1.6ms) 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) 
3773
+  (1.3ms) select sqlite_version(*)
3774
+  (1.8ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
3775
+  (0.2ms) SELECT sql
3776
+ FROM sqlite_master
3777
+ WHERE name='index_users_on_email' AND type='index'
3778
+ UNION ALL
3779
+ SELECT sql
3780
+ FROM sqlite_temp_master
3781
+ WHERE name='index_users_on_email' AND type='index'
3782
+
3783
+  (1.9ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
3784
+  (2.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
3785
+  (1.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3786
+  (0.1ms) SELECT version FROM "schema_migrations"
3787
+  (2.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20151220161817')
3788
+  (2.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150101233243')
3789
+  (2.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20150102001921')
3790
+  (2.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20150102001930')
3791
+  (2.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20151220161809')
3792
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
data/spec/spec_helper.rb CHANGED
@@ -1,12 +1,7 @@
1
- require 'codeclimate-test-reporter'
2
- CodeClimate::TestReporter.start
3
1
  require 'simplecov'
4
2
  SimpleCov.start
5
3
 
6
- # ENV['BUNDLE_GEMFILE'] = File.expand_path('../../Gemfile', __FILE__)
7
- # require "bundler"
8
4
  require "shoulda-matchers"
9
- # Bundler.setup
10
5
 
11
6
  RSpec.configure do |config|
12
7
  config.include(Shoulda::Matchers::ActiveModel, type: :model)
metadata CHANGED
@@ -1,22 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe_saas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
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-09-19 00:00:00.000000000 Z
11
+ date: 2017-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '4.2'
20
17
  - - ">="
21
18
  - !ruby/object:Gem::Version
22
19
  version: 4.2.0
@@ -24,9 +21,6 @@ dependencies:
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '4.2'
30
24
  - - ">="
31
25
  - !ruby/object:Gem::Version
32
26
  version: 4.2.0