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 +4 -4
- data/app/controllers/stripe_saas/subscriptions_controller.rb +4 -4
- data/lib/stripe_saas/version.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +104 -0
- data/spec/spec_helper.rb +0 -5
- metadata +2 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c92e60e4506a887cc92abe8ffcf8438355152d14
|
4
|
+
data.tar.gz: 8e15c4fca16ebd1ef6bf3c347546c9c5f79a84fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21b96facae4217453da88a990b0b9d197b747badb2667915cbd0425baeed1408b0d237af5b426f36648471b560d736756225edee3d70bb3077d4bc419a177555
|
7
|
+
data.tar.gz: 00eff34be9533e60277d7368de0a6cb189ec1dd5d4cdeb5c1dfa92606f497bc4c49d4eab4fb0fa1c7fa3d44f5540b1ec13c6e7e7230c84c8ecdf7b076251ba6d
|
@@ -1,9 +1,9 @@
|
|
1
1
|
module StripeSaas
|
2
2
|
class SubscriptionsController < ApplicationController
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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)
|
data/lib/stripe_saas/version.rb
CHANGED
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/spec/dummy/log/test.log
CHANGED
@@ -3686,3 +3686,107 @@ Migrating to CreatePlanFeatures (20151220161817)
|
|
3686
3686
|
[1m[35m (1.3ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150102001930')
|
3687
3687
|
[1m[36m (2.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151220161809')[0m
|
3688
3688
|
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
3689
|
+
[1m[36mActiveRecord::SchemaMigration Load (1.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
3690
|
+
[1m[36m (2.1ms)[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
|
3691
|
+
[1m[35m (1.9ms)[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)
|
3692
|
+
[1m[36m (2.5ms)[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
|
3693
|
+
[1m[35m (0.9ms)[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)
|
3694
|
+
[1m[36m (2.2ms)[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
|
3695
|
+
[1m[35m (1.2ms)[0m select sqlite_version(*)
|
3696
|
+
[1m[36m (2.0ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")[0m
|
3697
|
+
[1m[35m (0.1ms)[0m 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
|
+
[1m[36m (1.8ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
3706
|
+
[1m[35m (1.7ms)[0m CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
|
3707
|
+
[1m[36m (2.0ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
3708
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
3709
|
+
[1m[36m (2.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151220161817')[0m
|
3710
|
+
[1m[35m (2.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150101233243')
|
3711
|
+
[1m[36m (4.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150102001921')[0m
|
3712
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150102001930')
|
3713
|
+
[1m[36m (1.2ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151220161809')[0m
|
3714
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
3715
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
3716
|
+
[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
|
3717
|
+
[1m[35m (0.9ms)[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)
|
3718
|
+
[1m[36m (1.8ms)[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
|
3719
|
+
[1m[35m (2.4ms)[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)
|
3720
|
+
[1m[36m (2.4ms)[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
|
3721
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
3722
|
+
[1m[36m (1.7ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")[0m
|
3723
|
+
[1m[35m (0.1ms)[0m 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
|
+
[1m[36m (1.3ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
3732
|
+
[1m[35m (1.6ms)[0m CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
|
3733
|
+
[1m[36m (1.9ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
3734
|
+
[1m[35m (0.2ms)[0m SELECT version FROM "schema_migrations"
|
3735
|
+
[1m[36m (1.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151220161817')[0m
|
3736
|
+
[1m[35m (1.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150101233243')
|
3737
|
+
[1m[36m (1.5ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150102001921')[0m
|
3738
|
+
[1m[35m (1.5ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150102001930')
|
3739
|
+
[1m[36m (3.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151220161809')[0m
|
3740
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
3741
|
+
[1m[36mActiveRecord::SchemaMigration Load (1.6ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
3742
|
+
[1m[36m (2.0ms)[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
|
3743
|
+
[1m[35m (1.6ms)[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)
|
3744
|
+
[1m[36m (2.3ms)[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
|
3745
|
+
[1m[35m (2.6ms)[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)
|
3746
|
+
[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
|
3747
|
+
[1m[35m (1.3ms)[0m select sqlite_version(*)
|
3748
|
+
[1m[36m (1.7ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")[0m
|
3749
|
+
[1m[35m (0.1ms)[0m 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
|
+
[1m[36m (1.7ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
3758
|
+
[1m[35m (1.8ms)[0m CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
|
3759
|
+
[1m[36m (2.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
3760
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
3761
|
+
[1m[36m (2.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151220161817')[0m
|
3762
|
+
[1m[35m (2.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150101233243')
|
3763
|
+
[1m[36m (1.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150102001921')[0m
|
3764
|
+
[1m[35m (2.2ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150102001930')
|
3765
|
+
[1m[36m (2.5ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151220161809')[0m
|
3766
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
3767
|
+
[1m[36mActiveRecord::SchemaMigration Load (1.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
3768
|
+
[1m[36m (3.4ms)[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
|
3769
|
+
[1m[35m (1.2ms)[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)
|
3770
|
+
[1m[36m (1.2ms)[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
|
3771
|
+
[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)
|
3772
|
+
[1m[36m (1.6ms)[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
|
3773
|
+
[1m[35m (1.3ms)[0m select sqlite_version(*)
|
3774
|
+
[1m[36m (1.8ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")[0m
|
3775
|
+
[1m[35m (0.2ms)[0m 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
|
+
[1m[36m (1.9ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")[0m
|
3784
|
+
[1m[35m (2.2ms)[0m CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
|
3785
|
+
[1m[36m (1.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
3786
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
3787
|
+
[1m[36m (2.0ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151220161817')[0m
|
3788
|
+
[1m[35m (2.2ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150101233243')
|
3789
|
+
[1m[36m (2.3ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150102001921')[0m
|
3790
|
+
[1m[35m (2.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150102001930')
|
3791
|
+
[1m[36m (2.0ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151220161809')[0m
|
3792
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m 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.
|
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:
|
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
|