wbase 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +219 -2
  3. data/app/assets/javascripts/wbase/auth/bootstrap.min.js +7 -0
  4. data/app/assets/javascripts/wbase/auth/detect.js +7 -0
  5. data/app/assets/javascripts/wbase/auth/fastclick.js +841 -0
  6. data/app/assets/javascripts/wbase/auth/jquery.app.js +318 -0
  7. data/app/assets/javascripts/wbase/auth/jquery.blockUI.js +620 -0
  8. data/app/assets/javascripts/wbase/auth/jquery.core.js +323 -0
  9. data/app/assets/javascripts/wbase/auth/jquery.min.js +5 -0
  10. data/app/assets/javascripts/wbase/auth/jquery.nicescroll.js +113 -0
  11. data/app/assets/javascripts/wbase/auth/jquery.scrollTo.min.js +7 -0
  12. data/app/assets/javascripts/wbase/auth/jquery.slimscroll.js +474 -0
  13. data/app/assets/javascripts/wbase/auth/modernizr.min.js +1 -0
  14. data/app/assets/javascripts/wbase/auth/pace.min.js +2 -0
  15. data/app/assets/javascripts/wbase/auth/waves.js +498 -0
  16. data/app/assets/javascripts/wbase/auth/wow.min.js +2 -0
  17. data/app/assets/javascripts/wbase/auth.js +12 -0
  18. data/app/assets/stylesheets/wbase/auth/components.css +2362 -0
  19. data/app/assets/stylesheets/wbase/auth/core.css +2190 -0
  20. data/app/assets/stylesheets/wbase/auth/icons.css +12067 -0
  21. data/app/assets/stylesheets/wbase/auth/pages.css +2039 -0
  22. data/app/assets/stylesheets/wbase/auth/responsive.css +162 -0
  23. data/app/assets/stylesheets/wbase/auth/typicons.css +1370 -0
  24. data/app/assets/stylesheets/wbase/auth/variables.css +0 -0
  25. data/app/assets/stylesheets/wbase/auth.scss +9 -0
  26. data/app/controllers/wbase/application_controller.rb +13 -0
  27. data/app/controllers/wbase/mail_events_controller.rb +21 -0
  28. data/app/controllers/wbase/password_resets_controller.rb +43 -0
  29. data/app/controllers/wbase/sessions_controller.rb +35 -0
  30. data/app/controllers/wbase/static_pages_controller.rb +4 -0
  31. data/app/controllers/wbase/stripe_webhooks_controller.rb +54 -0
  32. data/app/controllers/wbase/subscriptions_controller.rb +50 -0
  33. data/app/controllers/wbase/users_controller.rb +65 -0
  34. data/app/helpers/wbase/auth_helper.rb +44 -0
  35. data/app/jobs/wbase/activate_drip_subscriber_job.rb +15 -0
  36. data/app/jobs/wbase/create_drip_subscriber_job.rb +13 -0
  37. data/app/jobs/wbase/dripable.rb +22 -0
  38. data/app/mailers/application_mailer.rb +4 -0
  39. data/app/mailers/wbase/admin_mailer.rb +35 -0
  40. data/app/mailers/wbase/password_reset_mailer.rb +20 -0
  41. data/app/models/wbase/mail_event.rb +21 -0
  42. data/app/models/wbase/plan.rb +26 -0
  43. data/app/models/wbase/ssl_verification.rb +21 -0
  44. data/app/models/wbase/stripe_webhook.rb +22 -0
  45. data/app/models/wbase/subscription.rb +47 -0
  46. data/app/models/wbase/userable.rb +85 -0
  47. data/app/services/wbase/mail_event_batch.rb +22 -0
  48. data/app/services/wbase/start_subscription.rb +81 -0
  49. data/app/views/layouts/mailer.html.erb +53 -0
  50. data/app/views/layouts/mailer.text.erb +1 -0
  51. data/app/views/layouts/wbase/_common_head.html.erb +46 -0
  52. data/app/views/layouts/wbase/auth.html.erb +23 -0
  53. data/app/views/layouts/wbase/landing.html.erb +9 -56
  54. data/app/views/shared/_errors.html.erb +10 -0
  55. data/app/views/wbase/admin_mailer/new_subscription.html.erb +33 -0
  56. data/app/views/wbase/admin_mailer/new_user.html.erb +7 -0
  57. data/app/views/wbase/password_reset_mailer/reset.html.erb +10 -0
  58. data/app/views/wbase/password_reset_mailer/reset.text.erb +5 -0
  59. data/app/views/wbase/password_resets/edit.html.erb +22 -0
  60. data/app/views/wbase/password_resets/new.html.erb +41 -0
  61. data/app/views/wbase/sessions/new.html.erb +58 -0
  62. data/app/views/wbase/static_pages/landing/_pricing.html.erb +6 -2
  63. data/app/views/wbase/static_pages/start.html.erb +1 -1
  64. data/app/views/wbase/static_pages/welcome.html.erb +1 -1
  65. data/app/views/wbase/subscriptions/edit.html.erb +2 -0
  66. data/app/views/wbase/subscriptions/new.html.erb +91 -0
  67. data/app/views/wbase/subscriptions/show.html.erb +2 -0
  68. data/app/views/wbase/users/_affiliate.html.erb +66 -0
  69. data/app/views/wbase/users/_plan.html.erb +11 -0
  70. data/app/views/wbase/users/_plans.html.erb +11 -0
  71. data/app/views/wbase/users/edit.html.erb +2 -0
  72. data/app/views/wbase/users/new.html.erb +38 -0
  73. data/app/views/wbase/users/show.html.erb +37 -0
  74. data/config/initializers/assets.rb +1 -3
  75. data/config/routes.rb +9 -0
  76. data/db/migrate/20161127212521_create_wbase_subscriptions.rb +17 -0
  77. data/db/migrate/20161127212831_create_wbase_plans.rb +15 -0
  78. data/db/migrate/20161127224117_create_wbase_ssl_verifications.rb +10 -0
  79. data/db/migrate/20161128022640_create_wbase_mail_events.rb +16 -0
  80. data/db/migrate/20161128031211_create_wbase_stripe_webhooks.rb +17 -0
  81. data/lib/wbase/engine.rb +37 -28
  82. data/lib/wbase/version.rb +1 -1
  83. data/test/controllers/wbase/mail_events_controller_test.rb +13 -0
  84. data/test/controllers/wbase/password_resets_controller_test.rb +13 -0
  85. data/test/controllers/wbase/sessions_controller_test.rb +13 -0
  86. data/test/controllers/wbase/stripe_webhooks_controller_test.rb +13 -0
  87. data/test/controllers/wbase/subscriptions_controller_test.rb +13 -0
  88. data/test/controllers/wbase/users_controller_test.rb +13 -0
  89. data/test/dummy/config/database.yml +4 -7
  90. data/test/dummy/db/development.sqlite3 +0 -0
  91. data/test/dummy/db/schema.rb +85 -0
  92. data/test/dummy/log/development.log +225 -0
  93. data/test/fixtures/wbase/mail_events.yml +38 -0
  94. data/test/fixtures/wbase/plans.yml +40 -0
  95. data/test/fixtures/wbase/stripe_webhooks.yml +41 -0
  96. data/test/fixtures/wbase/subscriptions.yml +46 -0
  97. data/test/jobs/wbase/activate_drip_subscriber_job_test.rb +9 -0
  98. data/test/jobs/wbase/create_drip_subscriber_job_job_test.rb +9 -0
  99. data/test/mailers/previews/wbase/admin_mailer_preview.rb +11 -0
  100. data/test/mailers/previews/wbase/password_reset_mailer_preview.rb +11 -0
  101. data/test/mailers/wbase/admin_mailer_test.rb +14 -0
  102. data/test/mailers/wbase/password_reset_mailer_test.rb +14 -0
  103. data/test/models/wbase/mail_event_test.rb +26 -0
  104. data/test/models/wbase/plan_test.rb +30 -0
  105. data/test/models/wbase/ssl_verification_test.rb +20 -0
  106. data/test/models/wbase/stripe_webhook_test.rb +27 -0
  107. data/test/models/wbase/subscription_test.rb +32 -0
  108. metadata +121 -12
  109. data/app/helpers/wbase/application_helper.rb +0 -4
  110. data/app/helpers/wbase/static_pages_helper.rb +0 -4
  111. data/app/views/wbase/static_pages/_map.html.erb +0 -17
  112. data/app/views/wbase/static_pages/_order_stats.html.erb +0 -28
  113. data/app/views/wbase/static_pages/_pricing.html.erb +0 -89
  114. data/app/views/wbase/static_pages/_stats.html.erb +0 -28
  115. data/app/views/wbase/static_pages/_testimonial.html.erb +0 -16
  116. data/app/views/wbase/static_pages/affiliate.html.erb +0 -54
  117. data/app/views/wbase/static_pages/faq.html.erb +0 -63
@@ -0,0 +1,225 @@
1
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2
+  (0.1ms) select sqlite_version(*)
3
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
+ Migrating to CreateWbaseSubscriptions (20161127212521)
6
+  (0.1ms) begin transaction
7
+  (0.3ms) CREATE TABLE "wbase_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "stripe_id" varchar, "plan_id" integer, "last_four" varchar, "coupon_id" integer, "card_type" varchar, "current_price" integer, "user_id" integer, "paid_thru" datetime, "credit_card_token" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
8
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20161127212521"]]
9
+  (0.7ms) commit transaction
10
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
11
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
12
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
13
+ Migrating to CreateWbasePlans (20161127212831)
14
+  (0.1ms) begin transaction
15
+  (0.4ms) CREATE TABLE "wbase_plans" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "stripe_id" varchar NOT NULL, "price" integer NOT NULL, "interval" varchar DEFAULT 'monthly', "features" text, "highlight" boolean DEFAULT 'f', "display_order" integer DEFAULT 0, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
16
+  (0.0ms) select sqlite_version(*)
17
+  (0.1ms) CREATE INDEX "index_wbase_plans_on_name" ON "wbase_plans" ("name")
18
+  (0.1ms) SELECT sql
19
+ FROM sqlite_master
20
+ WHERE name='index_wbase_plans_on_name' AND type='index'
21
+ UNION ALL
22
+ SELECT sql
23
+ FROM sqlite_temp_master
24
+ WHERE name='index_wbase_plans_on_name' AND type='index'
25
+
26
+  (0.1ms) CREATE INDEX "index_wbase_plans_on_stripe_id" ON "wbase_plans" ("stripe_id")
27
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20161127212831"]]
28
+  (1.1ms) commit transaction
29
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
30
+  (0.1ms)  SELECT sql
31
+ FROM sqlite_master
32
+ WHERE name='index_wbase_plans_on_stripe_id' AND type='index'
33
+ UNION ALL
34
+ SELECT sql
35
+ FROM sqlite_temp_master
36
+ WHERE name='index_wbase_plans_on_stripe_id' AND type='index'
37
+ 
38
+  (0.1ms) SELECT sql
39
+ FROM sqlite_master
40
+ WHERE name='index_wbase_plans_on_name' AND type='index'
41
+ UNION ALL
42
+ SELECT sql
43
+ FROM sqlite_temp_master
44
+ WHERE name='index_wbase_plans_on_name' AND type='index'
45
+
46
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
47
+  (0.1ms) SELECT sql
48
+ FROM sqlite_master
49
+ WHERE name='index_wbase_plans_on_stripe_id' AND type='index'
50
+ UNION ALL
51
+ SELECT sql
52
+ FROM sqlite_temp_master
53
+ WHERE name='index_wbase_plans_on_stripe_id' AND type='index'
54
+
55
+  (0.1ms)  SELECT sql
56
+ FROM sqlite_master
57
+ WHERE name='index_wbase_plans_on_name' AND type='index'
58
+ UNION ALL
59
+ SELECT sql
60
+ FROM sqlite_temp_master
61
+ WHERE name='index_wbase_plans_on_name' AND type='index'
62
+ 
63
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
64
+ Migrating to CreateWbaseSslVerifications (20161127224117)
65
+  (0.1ms) begin transaction
66
+  (0.5ms) CREATE TABLE "wbase_ssl_verifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "key" varchar, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
67
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20161127224117"]]
68
+  (0.7ms) commit transaction
69
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
70
+  (0.1ms)  SELECT sql
71
+ FROM sqlite_master
72
+ WHERE name='index_wbase_plans_on_stripe_id' AND type='index'
73
+ UNION ALL
74
+ SELECT sql
75
+ FROM sqlite_temp_master
76
+ WHERE name='index_wbase_plans_on_stripe_id' AND type='index'
77
+ 
78
+  (0.1ms) SELECT sql
79
+ FROM sqlite_master
80
+ WHERE name='index_wbase_plans_on_name' AND type='index'
81
+ UNION ALL
82
+ SELECT sql
83
+ FROM sqlite_temp_master
84
+ WHERE name='index_wbase_plans_on_name' AND type='index'
85
+
86
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
87
+  (0.1ms) SELECT sql
88
+ FROM sqlite_master
89
+ WHERE name='index_wbase_plans_on_stripe_id' AND type='index'
90
+ UNION ALL
91
+ SELECT sql
92
+ FROM sqlite_temp_master
93
+ WHERE name='index_wbase_plans_on_stripe_id' AND type='index'
94
+
95
+  (0.1ms)  SELECT sql
96
+ FROM sqlite_master
97
+ WHERE name='index_wbase_plans_on_name' AND type='index'
98
+ UNION ALL
99
+ SELECT sql
100
+ FROM sqlite_temp_master
101
+ WHERE name='index_wbase_plans_on_name' AND type='index'
102
+ 
103
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
104
+ Migrating to CreateWbaseMailEvents (20161128022640)
105
+  (0.1ms) begin transaction
106
+  (0.0ms) rollback transaction
107
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
108
+ Migrating to CreateWbaseMailEvents (20161128022640)
109
+  (0.1ms) begin transaction
110
+  (0.0ms) rollback transaction
111
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
112
+ Migrating to CreateWbaseMailEvents (20161128022640)
113
+  (0.2ms) begin transaction
114
+  (0.0ms) rollback transaction
115
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
116
+  (0.1ms) SELECT sql
117
+ FROM sqlite_master
118
+ WHERE name='index_wbase_plans_on_stripe_id' AND type='index'
119
+ UNION ALL
120
+ SELECT sql
121
+ FROM sqlite_temp_master
122
+ WHERE name='index_wbase_plans_on_stripe_id' AND type='index'
123
+
124
+  (0.1ms)  SELECT sql
125
+ FROM sqlite_master
126
+ WHERE name='index_wbase_plans_on_name' AND type='index'
127
+ UNION ALL
128
+ SELECT sql
129
+ FROM sqlite_temp_master
130
+ WHERE name='index_wbase_plans_on_name' AND type='index'
131
+ 
132
+  (4.3ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
133
+  (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
134
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
135
+ Migrating to CreateWbaseSubscriptions (20161127212521)
136
+  (0.1ms) BEGIN
137
+  (5.8ms) CREATE TABLE "wbase_subscriptions" ("id" serial primary key, "stripe_id" character varying NOT NULL, "plan_id" integer NOT NULL, "last_four" character varying, "coupon_id" integer, "card_type" character varying, "current_price" integer, "user_id" integer NOT NULL, "paid_thru" timestamp, "credit_card_token" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
138
+  (1.0ms) CREATE INDEX "index_wbase_subscriptions_on_plan_id" ON "wbase_subscriptions" ("plan_id")
139
+  (0.9ms) CREATE INDEX "index_wbase_subscriptions_on_user_id" ON "wbase_subscriptions" ("user_id")
140
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161127212521"]]
141
+  (0.5ms) COMMIT
142
+ Migrating to CreateWbasePlans (20161127212831)
143
+  (0.3ms) BEGIN
144
+  (4.3ms) CREATE TABLE "wbase_plans" ("id" serial primary key, "name" character varying NOT NULL, "stripe_id" character varying NOT NULL, "price" integer NOT NULL, "interval" character varying DEFAULT 'monthly', "features" text, "highlight" boolean DEFAULT 'f', "display_order" integer DEFAULT 0, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
145
+  (0.9ms) CREATE INDEX "index_wbase_plans_on_name" ON "wbase_plans" ("name")
146
+  (0.9ms) CREATE INDEX "index_wbase_plans_on_stripe_id" ON "wbase_plans" ("stripe_id")
147
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161127212831"]]
148
+  (0.4ms) COMMIT
149
+ Migrating to CreateWbaseSslVerifications (20161127224117)
150
+  (0.2ms) BEGIN
151
+  (3.7ms) CREATE TABLE "wbase_ssl_verifications" ("id" serial primary key, "key" character varying NOT NULL, "value" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
152
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161127224117"]]
153
+  (0.4ms) COMMIT
154
+ Migrating to CreateWbaseMailEvents (20161128022640)
155
+  (0.3ms) BEGIN
156
+  (5.0ms) CREATE TABLE "wbase_mail_events" ("id" serial primary key, "sg_message_id" character varying, "email" character varying, "timestamp" character varying, "smtp_id" character varying, "event" character varying, "data" json, "mail_eventable_id" integer, "mail_eventable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
157
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161128022640"]]
158
+  (0.3ms) COMMIT
159
+ Migrating to CreateWbaseStripeWebhooks (20161128031211)
160
+  (0.2ms) BEGIN
161
+  (5.2ms) CREATE TABLE "wbase_stripe_webhooks" ("id" serial primary key, "external_id" character varying, "object" character varying, "api_version" character varying, "created" timestamp, "data" json, "livemode" boolean, "pending_webhooks" integer, "external_type" character varying, "external_request" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
162
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161128031211"]]
163
+  (0.3ms) COMMIT
164
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
165
+  (3.5ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
166
+ FROM pg_constraint c
167
+ JOIN pg_class t1 ON c.conrelid = t1.oid
168
+ JOIN pg_class t2 ON c.confrelid = t2.oid
169
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
170
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
171
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
172
+ WHERE c.contype = 'f'
173
+ AND t1.relname = 'wbase_mail_events'
174
+ AND t3.nspname = ANY (current_schemas(false))
175
+ ORDER BY c.conname
176
+ 
177
+  (2.9ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
178
+ FROM pg_constraint c
179
+ JOIN pg_class t1 ON c.conrelid = t1.oid
180
+ JOIN pg_class t2 ON c.confrelid = t2.oid
181
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
182
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
183
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
184
+ WHERE c.contype = 'f'
185
+ AND t1.relname = 'wbase_plans'
186
+ AND t3.nspname = ANY (current_schemas(false))
187
+ ORDER BY c.conname
188
+
189
+  (3.0ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
190
+ FROM pg_constraint c
191
+ JOIN pg_class t1 ON c.conrelid = t1.oid
192
+ JOIN pg_class t2 ON c.confrelid = t2.oid
193
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
194
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
195
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
196
+ WHERE c.contype = 'f'
197
+ AND t1.relname = 'wbase_ssl_verifications'
198
+ AND t3.nspname = ANY (current_schemas(false))
199
+ ORDER BY c.conname
200
+ 
201
+  (4.4ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
202
+ FROM pg_constraint c
203
+ JOIN pg_class t1 ON c.conrelid = t1.oid
204
+ JOIN pg_class t2 ON c.confrelid = t2.oid
205
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
206
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
207
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
208
+ WHERE c.contype = 'f'
209
+ AND t1.relname = 'wbase_stripe_webhooks'
210
+ AND t3.nspname = ANY (current_schemas(false))
211
+ ORDER BY c.conname
212
+
213
+  (3.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
214
+ FROM pg_constraint c
215
+ JOIN pg_class t1 ON c.conrelid = t1.oid
216
+ JOIN pg_class t2 ON c.confrelid = t2.oid
217
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
218
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
219
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
220
+ WHERE c.contype = 'f'
221
+ AND t1.relname = 'wbase_subscriptions'
222
+ AND t3.nspname = ANY (current_schemas(false))
223
+ ORDER BY c.conname
224
+ 
225
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
@@ -0,0 +1,38 @@
1
+ # == Schema Information
2
+ #
3
+ # Table name: wbase_mail_events
4
+ #
5
+ # id :integer not null, primary key
6
+ # sg_message_id :string
7
+ # email :string
8
+ # timestamp :string
9
+ # smtp_id :string
10
+ # event :string
11
+ # data :json
12
+ # mail_eventable_id :integer
13
+ # mail_eventable_type :string
14
+ # created_at :datetime not null
15
+ # updated_at :datetime not null
16
+ #
17
+
18
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
19
+
20
+ one:
21
+ sg_message_id: MyString
22
+ email: MyString
23
+ timestamp: MyString
24
+ smtp-id: MyString
25
+ event: MyString
26
+ data:
27
+ mail_eventable_id: 1
28
+ mail_eventable_type: MyString
29
+
30
+ two:
31
+ sg_message_id: MyString
32
+ email: MyString
33
+ timestamp: MyString
34
+ smtp-id: MyString
35
+ event: MyString
36
+ data:
37
+ mail_eventable_id: 1
38
+ mail_eventable_type: MyString
@@ -0,0 +1,40 @@
1
+ # == Schema Information
2
+ #
3
+ # Table name: wbase_plans
4
+ #
5
+ # id :integer not null, primary key
6
+ # name :string not null
7
+ # stripe_id :string not null
8
+ # price :integer not null
9
+ # interval :string default("monthly")
10
+ # features :text
11
+ # highlight :boolean default(FALSE)
12
+ # display_order :integer default(0)
13
+ # created_at :datetime not null
14
+ # updated_at :datetime not null
15
+ #
16
+ # Indexes
17
+ #
18
+ # index_wbase_plans_on_name (name)
19
+ # index_wbase_plans_on_stripe_id (stripe_id)
20
+ #
21
+
22
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
23
+
24
+ one:
25
+ name: MyString
26
+ stripe_id: MyString
27
+ price: 1
28
+ interval: MyString
29
+ features: MyText
30
+ highlight: false
31
+ display_order: 1
32
+
33
+ two:
34
+ name: MyString
35
+ stripe_id: MyString
36
+ price: 1
37
+ interval: MyString
38
+ features: MyText
39
+ highlight: false
40
+ display_order: 1
@@ -0,0 +1,41 @@
1
+ # == Schema Information
2
+ #
3
+ # Table name: wbase_stripe_webhooks
4
+ #
5
+ # id :integer not null, primary key
6
+ # external_id :string
7
+ # object :string
8
+ # api_version :string
9
+ # created :datetime
10
+ # data :json
11
+ # livemode :boolean
12
+ # pending_webhooks :integer
13
+ # external_type :string
14
+ # external_request :string
15
+ # created_at :datetime not null
16
+ # updated_at :datetime not null
17
+ #
18
+
19
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
20
+
21
+ one:
22
+ external_id: MyString
23
+ object: MyString
24
+ api_version: MyString
25
+ created: 2016-11-27 19:12:11
26
+ data:
27
+ livemode: false
28
+ pending_webhooks: 1
29
+ external_type: MyString
30
+ external_request: MyString
31
+
32
+ two:
33
+ external_id: MyString
34
+ object: MyString
35
+ api_version: MyString
36
+ created: 2016-11-27 19:12:11
37
+ data:
38
+ livemode: false
39
+ pending_webhooks: 1
40
+ external_type: MyString
41
+ external_request: MyString
@@ -0,0 +1,46 @@
1
+ # == Schema Information
2
+ #
3
+ # Table name: wbase_subscriptions
4
+ #
5
+ # id :integer not null, primary key
6
+ # stripe_id :string not null
7
+ # plan_id :integer not null
8
+ # last_four :string
9
+ # coupon_id :integer
10
+ # card_type :string
11
+ # current_price :integer
12
+ # user_id :integer not null
13
+ # paid_thru :datetime
14
+ # credit_card_token :string
15
+ # created_at :datetime not null
16
+ # updated_at :datetime not null
17
+ #
18
+ # Indexes
19
+ #
20
+ # index_wbase_subscriptions_on_plan_id (plan_id)
21
+ # index_wbase_subscriptions_on_user_id (user_id)
22
+ #
23
+
24
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
25
+
26
+ one:
27
+ stripe_id: MyString
28
+ plan_id: 1
29
+ last_four: MyString
30
+ coupon_id: 1
31
+ card_type: MyString
32
+ current_price: 1
33
+ user_id: 1
34
+ paid_thru: 2016-11-27 13:25:21
35
+ credit_card_token: MyString
36
+
37
+ two:
38
+ stripe_id: MyString
39
+ plan_id: 1
40
+ last_four: MyString
41
+ coupon_id: 1
42
+ card_type: MyString
43
+ current_price: 1
44
+ user_id: 1
45
+ paid_thru: 2016-11-27 13:25:21
46
+ credit_card_token: MyString
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module Wbase
4
+ class ActivateDripSubscriberJobTest < ActiveJob::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module Wbase
4
+ class CreateDripSubscriberJobJobTest < ActiveJob::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ module Wbase
2
+ # Preview all emails at http://localhost:3000/rails/mailers/admin_mailer
3
+ class AdminMailerPreview < ActionMailer::Preview
4
+
5
+ # Preview this email at http://localhost:3000/rails/mailers/admin_mailer/new_user
6
+ def new_user
7
+ AdminMailer.new_user
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Wbase
2
+ # Preview all emails at http://localhost:3000/rails/mailers/password_reset_mailer
3
+ class PasswordResetMailerPreview < ActionMailer::Preview
4
+
5
+ # Preview this email at http://localhost:3000/rails/mailers/password_reset_mailer/reset
6
+ def reset
7
+ PasswordResetMailer.reset
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,14 @@
1
+ require 'test_helper'
2
+
3
+ module Wbase
4
+ class AdminMailerTest < ActionMailer::TestCase
5
+ test "new_user" do
6
+ mail = AdminMailer.new_user
7
+ assert_equal "New user", mail.subject
8
+ assert_equal ["to@example.org"], mail.to
9
+ assert_equal ["from@example.com"], mail.from
10
+ assert_match "Hi", mail.body.encoded
11
+ end
12
+
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'test_helper'
2
+
3
+ module Wbase
4
+ class PasswordResetMailerTest < ActionMailer::TestCase
5
+ test "reset" do
6
+ mail = PasswordResetMailer.reset
7
+ assert_equal "Reset", mail.subject
8
+ assert_equal ["to@example.org"], mail.to
9
+ assert_equal ["from@example.com"], mail.from
10
+ assert_match "Hi", mail.body.encoded
11
+ end
12
+
13
+ end
14
+ end
@@ -0,0 +1,26 @@
1
+ # == Schema Information
2
+ #
3
+ # Table name: wbase_mail_events
4
+ #
5
+ # id :integer not null, primary key
6
+ # sg_message_id :string
7
+ # email :string
8
+ # timestamp :string
9
+ # smtp_id :string
10
+ # event :string
11
+ # data :json
12
+ # mail_eventable_id :integer
13
+ # mail_eventable_type :string
14
+ # created_at :datetime not null
15
+ # updated_at :datetime not null
16
+ #
17
+
18
+ require 'test_helper'
19
+
20
+ module Wbase
21
+ class MailEventTest < ActiveSupport::TestCase
22
+ # test "the truth" do
23
+ # assert true
24
+ # end
25
+ end
26
+ end
@@ -0,0 +1,30 @@
1
+ # == Schema Information
2
+ #
3
+ # Table name: wbase_plans
4
+ #
5
+ # id :integer not null, primary key
6
+ # name :string not null
7
+ # stripe_id :string not null
8
+ # price :integer not null
9
+ # interval :string default("monthly")
10
+ # features :text
11
+ # highlight :boolean default(FALSE)
12
+ # display_order :integer default(0)
13
+ # created_at :datetime not null
14
+ # updated_at :datetime not null
15
+ #
16
+ # Indexes
17
+ #
18
+ # index_wbase_plans_on_name (name)
19
+ # index_wbase_plans_on_stripe_id (stripe_id)
20
+ #
21
+
22
+ require 'test_helper'
23
+
24
+ module Wbase
25
+ class PlanTest < ActiveSupport::TestCase
26
+ # test "the truth" do
27
+ # assert true
28
+ # end
29
+ end
30
+ end
@@ -0,0 +1,20 @@
1
+ # == Schema Information
2
+ #
3
+ # Table name: wbase_ssl_verifications
4
+ #
5
+ # id :integer not null, primary key
6
+ # key :string not null
7
+ # value :string not null
8
+ # created_at :datetime not null
9
+ # updated_at :datetime not null
10
+ #
11
+
12
+ require 'test_helper'
13
+
14
+ module Wbase
15
+ class SslVerificationTest < ActiveSupport::TestCase
16
+ # test "the truth" do
17
+ # assert true
18
+ # end
19
+ end
20
+ end
@@ -0,0 +1,27 @@
1
+ # == Schema Information
2
+ #
3
+ # Table name: wbase_stripe_webhooks
4
+ #
5
+ # id :integer not null, primary key
6
+ # external_id :string
7
+ # object :string
8
+ # api_version :string
9
+ # created :datetime
10
+ # data :json
11
+ # livemode :boolean
12
+ # pending_webhooks :integer
13
+ # external_type :string
14
+ # external_request :string
15
+ # created_at :datetime not null
16
+ # updated_at :datetime not null
17
+ #
18
+
19
+ require 'test_helper'
20
+
21
+ module Wbase
22
+ class StripeWebhookTest < ActiveSupport::TestCase
23
+ # test "the truth" do
24
+ # assert true
25
+ # end
26
+ end
27
+ end
@@ -0,0 +1,32 @@
1
+ # == Schema Information
2
+ #
3
+ # Table name: wbase_subscriptions
4
+ #
5
+ # id :integer not null, primary key
6
+ # stripe_id :string not null
7
+ # plan_id :integer not null
8
+ # last_four :string
9
+ # coupon_id :integer
10
+ # card_type :string
11
+ # current_price :integer
12
+ # user_id :integer not null
13
+ # paid_thru :datetime
14
+ # credit_card_token :string
15
+ # created_at :datetime not null
16
+ # updated_at :datetime not null
17
+ #
18
+ # Indexes
19
+ #
20
+ # index_wbase_subscriptions_on_plan_id (plan_id)
21
+ # index_wbase_subscriptions_on_user_id (user_id)
22
+ #
23
+
24
+ require 'test_helper'
25
+
26
+ module Wbase
27
+ class SubscriptionTest < ActiveSupport::TestCase
28
+ # test "the truth" do
29
+ # assert true
30
+ # end
31
+ end
32
+ end