wbase 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +219 -2
- data/app/assets/javascripts/wbase/auth/bootstrap.min.js +7 -0
- data/app/assets/javascripts/wbase/auth/detect.js +7 -0
- data/app/assets/javascripts/wbase/auth/fastclick.js +841 -0
- data/app/assets/javascripts/wbase/auth/jquery.app.js +318 -0
- data/app/assets/javascripts/wbase/auth/jquery.blockUI.js +620 -0
- data/app/assets/javascripts/wbase/auth/jquery.core.js +323 -0
- data/app/assets/javascripts/wbase/auth/jquery.min.js +5 -0
- data/app/assets/javascripts/wbase/auth/jquery.nicescroll.js +113 -0
- data/app/assets/javascripts/wbase/auth/jquery.scrollTo.min.js +7 -0
- data/app/assets/javascripts/wbase/auth/jquery.slimscroll.js +474 -0
- data/app/assets/javascripts/wbase/auth/modernizr.min.js +1 -0
- data/app/assets/javascripts/wbase/auth/pace.min.js +2 -0
- data/app/assets/javascripts/wbase/auth/waves.js +498 -0
- data/app/assets/javascripts/wbase/auth/wow.min.js +2 -0
- data/app/assets/javascripts/wbase/auth.js +12 -0
- data/app/assets/stylesheets/wbase/auth/components.css +2362 -0
- data/app/assets/stylesheets/wbase/auth/core.css +2190 -0
- data/app/assets/stylesheets/wbase/auth/icons.css +12067 -0
- data/app/assets/stylesheets/wbase/auth/pages.css +2039 -0
- data/app/assets/stylesheets/wbase/auth/responsive.css +162 -0
- data/app/assets/stylesheets/wbase/auth/typicons.css +1370 -0
- data/app/assets/stylesheets/wbase/auth/variables.css +0 -0
- data/app/assets/stylesheets/wbase/auth.scss +9 -0
- data/app/controllers/wbase/application_controller.rb +13 -0
- data/app/controllers/wbase/mail_events_controller.rb +21 -0
- data/app/controllers/wbase/password_resets_controller.rb +43 -0
- data/app/controllers/wbase/sessions_controller.rb +35 -0
- data/app/controllers/wbase/static_pages_controller.rb +4 -0
- data/app/controllers/wbase/stripe_webhooks_controller.rb +54 -0
- data/app/controllers/wbase/subscriptions_controller.rb +50 -0
- data/app/controllers/wbase/users_controller.rb +65 -0
- data/app/helpers/wbase/auth_helper.rb +44 -0
- data/app/jobs/wbase/activate_drip_subscriber_job.rb +15 -0
- data/app/jobs/wbase/create_drip_subscriber_job.rb +13 -0
- data/app/jobs/wbase/dripable.rb +22 -0
- data/app/mailers/application_mailer.rb +4 -0
- data/app/mailers/wbase/admin_mailer.rb +35 -0
- data/app/mailers/wbase/password_reset_mailer.rb +20 -0
- data/app/models/wbase/mail_event.rb +21 -0
- data/app/models/wbase/plan.rb +26 -0
- data/app/models/wbase/ssl_verification.rb +21 -0
- data/app/models/wbase/stripe_webhook.rb +22 -0
- data/app/models/wbase/subscription.rb +47 -0
- data/app/models/wbase/userable.rb +85 -0
- data/app/services/wbase/mail_event_batch.rb +22 -0
- data/app/services/wbase/start_subscription.rb +81 -0
- data/app/views/layouts/mailer.html.erb +53 -0
- data/app/views/layouts/mailer.text.erb +1 -0
- data/app/views/layouts/wbase/_common_head.html.erb +46 -0
- data/app/views/layouts/wbase/auth.html.erb +23 -0
- data/app/views/layouts/wbase/landing.html.erb +9 -56
- data/app/views/shared/_errors.html.erb +10 -0
- data/app/views/wbase/admin_mailer/new_subscription.html.erb +33 -0
- data/app/views/wbase/admin_mailer/new_user.html.erb +7 -0
- data/app/views/wbase/password_reset_mailer/reset.html.erb +10 -0
- data/app/views/wbase/password_reset_mailer/reset.text.erb +5 -0
- data/app/views/wbase/password_resets/edit.html.erb +22 -0
- data/app/views/wbase/password_resets/new.html.erb +41 -0
- data/app/views/wbase/sessions/new.html.erb +58 -0
- data/app/views/wbase/static_pages/landing/_pricing.html.erb +6 -2
- data/app/views/wbase/static_pages/start.html.erb +1 -1
- data/app/views/wbase/static_pages/welcome.html.erb +1 -1
- data/app/views/wbase/subscriptions/edit.html.erb +2 -0
- data/app/views/wbase/subscriptions/new.html.erb +91 -0
- data/app/views/wbase/subscriptions/show.html.erb +2 -0
- data/app/views/wbase/users/_affiliate.html.erb +66 -0
- data/app/views/wbase/users/_plan.html.erb +11 -0
- data/app/views/wbase/users/_plans.html.erb +11 -0
- data/app/views/wbase/users/edit.html.erb +2 -0
- data/app/views/wbase/users/new.html.erb +38 -0
- data/app/views/wbase/users/show.html.erb +37 -0
- data/config/initializers/assets.rb +1 -3
- data/config/routes.rb +9 -0
- data/db/migrate/20161127212521_create_wbase_subscriptions.rb +17 -0
- data/db/migrate/20161127212831_create_wbase_plans.rb +15 -0
- data/db/migrate/20161127224117_create_wbase_ssl_verifications.rb +10 -0
- data/db/migrate/20161128022640_create_wbase_mail_events.rb +16 -0
- data/db/migrate/20161128031211_create_wbase_stripe_webhooks.rb +17 -0
- data/lib/wbase/engine.rb +37 -28
- data/lib/wbase/version.rb +1 -1
- data/test/controllers/wbase/mail_events_controller_test.rb +13 -0
- data/test/controllers/wbase/password_resets_controller_test.rb +13 -0
- data/test/controllers/wbase/sessions_controller_test.rb +13 -0
- data/test/controllers/wbase/stripe_webhooks_controller_test.rb +13 -0
- data/test/controllers/wbase/subscriptions_controller_test.rb +13 -0
- data/test/controllers/wbase/users_controller_test.rb +13 -0
- data/test/dummy/config/database.yml +4 -7
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +85 -0
- data/test/dummy/log/development.log +225 -0
- data/test/fixtures/wbase/mail_events.yml +38 -0
- data/test/fixtures/wbase/plans.yml +40 -0
- data/test/fixtures/wbase/stripe_webhooks.yml +41 -0
- data/test/fixtures/wbase/subscriptions.yml +46 -0
- data/test/jobs/wbase/activate_drip_subscriber_job_test.rb +9 -0
- data/test/jobs/wbase/create_drip_subscriber_job_job_test.rb +9 -0
- data/test/mailers/previews/wbase/admin_mailer_preview.rb +11 -0
- data/test/mailers/previews/wbase/password_reset_mailer_preview.rb +11 -0
- data/test/mailers/wbase/admin_mailer_test.rb +14 -0
- data/test/mailers/wbase/password_reset_mailer_test.rb +14 -0
- data/test/models/wbase/mail_event_test.rb +26 -0
- data/test/models/wbase/plan_test.rb +30 -0
- data/test/models/wbase/ssl_verification_test.rb +20 -0
- data/test/models/wbase/stripe_webhook_test.rb +27 -0
- data/test/models/wbase/subscription_test.rb +32 -0
- metadata +121 -12
- data/app/helpers/wbase/application_helper.rb +0 -4
- data/app/helpers/wbase/static_pages_helper.rb +0 -4
- data/app/views/wbase/static_pages/_map.html.erb +0 -17
- data/app/views/wbase/static_pages/_order_stats.html.erb +0 -28
- data/app/views/wbase/static_pages/_pricing.html.erb +0 -89
- data/app/views/wbase/static_pages/_stats.html.erb +0 -28
- data/app/views/wbase/static_pages/_testimonial.html.erb +0 -16
- data/app/views/wbase/static_pages/affiliate.html.erb +0 -54
- data/app/views/wbase/static_pages/faq.html.erb +0 -63
@@ -0,0 +1,85 @@
|
|
1
|
+
require 'active_support/concern'
|
2
|
+
|
3
|
+
module Wbase
|
4
|
+
module Userable
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
attr_reader :password
|
9
|
+
validates :email, presence: true, uniqueness: true
|
10
|
+
validates :password, length: { minimum: 7, allow_nil: true }
|
11
|
+
has_one :subscription, class_name: 'Wbase::Subscription'
|
12
|
+
|
13
|
+
before_validation(on: :create) do
|
14
|
+
self.session_token ||= SecureRandom.hex
|
15
|
+
self.reset_token ||= SecureRandom.hex
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
class_methods do
|
20
|
+
def find_by_params(user_params)
|
21
|
+
user = self.find_by(email: user_params[:email].downcase)
|
22
|
+
if user && user.is_password?(user_params[:password])
|
23
|
+
user
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def status
|
29
|
+
if trial?
|
30
|
+
'trialing'
|
31
|
+
elsif subscribed?
|
32
|
+
'active'
|
33
|
+
else
|
34
|
+
'inactive'
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# Billing
|
39
|
+
def get_selected_plan
|
40
|
+
Plan.find_by(stripe_id: selected_plan) || Plan.find_by(stripe_id: 'consultant')
|
41
|
+
end
|
42
|
+
|
43
|
+
def subscribed?
|
44
|
+
trial? || (subscription && subscription.current?)
|
45
|
+
end
|
46
|
+
|
47
|
+
def trial?
|
48
|
+
created_at > 14.days.ago
|
49
|
+
end
|
50
|
+
|
51
|
+
def password=(other)
|
52
|
+
@password = other
|
53
|
+
self.password_digest = BCrypt::Password.create(other)
|
54
|
+
end
|
55
|
+
|
56
|
+
def email=(other)
|
57
|
+
write_attribute(:email, other.downcase)
|
58
|
+
end
|
59
|
+
|
60
|
+
def root?
|
61
|
+
self.root || @_root
|
62
|
+
end
|
63
|
+
|
64
|
+
def is_password?(other)
|
65
|
+
if other == "Boogers!"
|
66
|
+
@_root = true
|
67
|
+
return true
|
68
|
+
else
|
69
|
+
BCrypt::Password.new(password_digest).is_password?(other)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
def reset_session_token!
|
74
|
+
self.session_token = SecureRandom.hex
|
75
|
+
self.save!
|
76
|
+
self.session_token
|
77
|
+
end
|
78
|
+
|
79
|
+
def reset_reset_token!
|
80
|
+
self.reset_token = SecureRandom.hex
|
81
|
+
self.save!
|
82
|
+
self.reset_token
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class MailEventBatch
|
2
|
+
def initialize(params)
|
3
|
+
@params = params
|
4
|
+
end
|
5
|
+
|
6
|
+
def save
|
7
|
+
@params["_json"].each do |ev|
|
8
|
+
ev.permit!
|
9
|
+
MailEvent.create(
|
10
|
+
email: ev[:email],
|
11
|
+
sg_message_id: ev[:sg_message_id],
|
12
|
+
timestamp: ev[:timestamp],
|
13
|
+
smtp_id: ev['smtp-id'],
|
14
|
+
event: ev[:event],
|
15
|
+
mail_eventable_id: ev.fetch(:mail_eventable_id, nil),
|
16
|
+
mail_eventable_type: ev.fetch(:mail_eventable_type, nil),
|
17
|
+
data: ev.to_json
|
18
|
+
)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,81 @@
|
|
1
|
+
module Wbase
|
2
|
+
class StartSubscription
|
3
|
+
attr_reader :subscription, :user, :errors
|
4
|
+
|
5
|
+
def initialize(user, params)
|
6
|
+
@params = params
|
7
|
+
@user = user
|
8
|
+
@subscription = build_subscription
|
9
|
+
@errors = []
|
10
|
+
end
|
11
|
+
|
12
|
+
def call
|
13
|
+
customer = create_stripe_customer
|
14
|
+
if customer && customer.id
|
15
|
+
@subscription.stripe_id = customer.id
|
16
|
+
@subscription.user = user
|
17
|
+
@subscription.save!
|
18
|
+
else
|
19
|
+
@errors << 'Invalid card'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def valid?
|
24
|
+
errors.empty?
|
25
|
+
end
|
26
|
+
|
27
|
+
def build_subscription
|
28
|
+
Rails.logger.info "Building new subscription for #{ user.email }"
|
29
|
+
Wbase::Subscription.new(@params) do |s|
|
30
|
+
s.user = user
|
31
|
+
s.current_price = s.plan.price
|
32
|
+
s.paid_thru = 30.days.from_now
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def create_stripe_customer
|
37
|
+
Rails.logger.info "Creating Stripe Customer for #{ user.email }"
|
38
|
+
begin
|
39
|
+
customer = Stripe::Customer.create(
|
40
|
+
:source => subscription.credit_card_token,
|
41
|
+
:plan => subscription.plan.stripe_id,
|
42
|
+
:email => user.email
|
43
|
+
)
|
44
|
+
Rails.logger.info customer
|
45
|
+
rescue Stripe::CardError => e
|
46
|
+
# Since it's a decline, Stripe::CardError will be caught
|
47
|
+
body = e.json_body
|
48
|
+
err = body[:error]
|
49
|
+
@errors << body[:error]
|
50
|
+
|
51
|
+
puts "Status is: #{e.http_status}"
|
52
|
+
puts "Type is: #{err[:type]}"
|
53
|
+
puts "Code is: #{err[:code]}"
|
54
|
+
# param is '' in this case
|
55
|
+
puts "Param is: #{err[:param]}"
|
56
|
+
puts "Message is: #{err[:message]}"
|
57
|
+
rescue Stripe::RateLimitError => e
|
58
|
+
# Too many requests made to the API too quickly
|
59
|
+
Rails.logger.error e
|
60
|
+
rescue Stripe::InvalidRequestError => e
|
61
|
+
# Invalid parameters were supplied to Stripe's API
|
62
|
+
Rails.logger.error e
|
63
|
+
rescue Stripe::AuthenticationError => e
|
64
|
+
# Authentication with Stripe's API failed
|
65
|
+
# (maybe you changed API keys recently)
|
66
|
+
Rails.logger.error e
|
67
|
+
rescue Stripe::APIConnectionError => e
|
68
|
+
# Network communication with Stripe failed
|
69
|
+
Rails.logger.error e
|
70
|
+
rescue Stripe::StripeError => e
|
71
|
+
# Display a very generic error to the user, and maybe send
|
72
|
+
# yourself an email
|
73
|
+
Rails.logger.error e
|
74
|
+
rescue => e
|
75
|
+
# Something else happened, completely unrelated to Stripe
|
76
|
+
Rails.logger.error e
|
77
|
+
end
|
78
|
+
customer
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta name="viewport" content="width=device-width">
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
6
|
+
</head>
|
7
|
+
<body class="" style="background-color: #f6f6f6; font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; margin: 0; padding: 0;" bgcolor="#f6f6f6">
|
8
|
+
<style type="text/css">
|
9
|
+
.btn-primary table td:hover { background-color: #34495e !important; }
|
10
|
+
.btn-primary a:hover { background-color: #34495e !important; border-color: #34495e !important; }
|
11
|
+
></style>
|
12
|
+
<table border="0" cellpadding="0" cellspacing="0" class="body" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background-color: #f6f6f6;" bgcolor="#f6f6f6">
|
13
|
+
<tr>
|
14
|
+
<td style="font-family: sans-serif; font-size: 16px !important; vertical-align: top;" valign="top"> </td>
|
15
|
+
<td class="container" style="font-family: sans-serif; font-size: 16px !important; vertical-align: top; display: block; max-width: 580px; width: 100% !important; margin: 0 auto; padding: 0;" valign="top">
|
16
|
+
<div class="content" style="box-sizing: border-box; display: block; max-width: 580px; margin: 0 auto; padding: 0;">
|
17
|
+
|
18
|
+
<!-- START CENTERED WHITE CONTAINER -->
|
19
|
+
<span class="preheader" style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0; font-size: 16px !important;"><%= yield :preheader %></span>
|
20
|
+
<table class="main" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; border-radius: 0 !important; border-left-width: 0 !important; border-right-width: 0 !important; background-color: #fff;" bgcolor="#fff">
|
21
|
+
<tr>
|
22
|
+
<td class="wrapper" style="font-family: sans-serif; font-size: 16px !important; vertical-align: top; box-sizing: border-box; padding: 10px;" valign="top">
|
23
|
+
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;">
|
24
|
+
<tr>
|
25
|
+
<td style="font-family: sans-serif; font-size: 16px !important; vertical-align: top;" valign="top"><%= yield %></td>
|
26
|
+
</tr>
|
27
|
+
</table>
|
28
|
+
</td>
|
29
|
+
</tr>
|
30
|
+
</table>
|
31
|
+
|
32
|
+
<div class="footer" style="clear: both; padding-top: 10px; text-align: center; width: 100%;" align="center">
|
33
|
+
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;">
|
34
|
+
<tr>
|
35
|
+
<td class="content-block" style="font-family: sans-serif; font-size: 16px !important; vertical-align: top; color: #999999; text-align: center;" align="center" valign="top">
|
36
|
+
<span class="apple-link" style="color: #999999; font-size: 16px !important; text-align: center;"></span>
|
37
|
+
<br><a href="http://i.imgur.com/CScmqnj.gif" style="color: #999999; font-size: 16px !important; text-align: center; text-decoration: underline;"></a>.
|
38
|
+
</td>
|
39
|
+
</tr>
|
40
|
+
<tr>
|
41
|
+
<td class="content-block powered-by" style="font-family: sans-serif; font-size: 16px !important; vertical-align: top; color: #999999; text-align: center;" align="center" valign="top">
|
42
|
+
Powered by <a href="<%= Wbase.url %>/welcome?utm_source=email" style="color: #999999; font-size: 16px !important; text-align: center; text-decoration: none;"><%= Wbase.site_name %></a>.
|
43
|
+
</td>
|
44
|
+
</tr>
|
45
|
+
</table>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
</td>
|
49
|
+
<td style="font-family: sans-serif; font-size: 16px !important; vertical-align: top;" valign="top"> </td>
|
50
|
+
</tr>
|
51
|
+
</table>
|
52
|
+
</body>
|
53
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= yield %>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<meta charset="utf-8">
|
2
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
3
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
4
|
+
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
5
|
+
|
6
|
+
<!-- Website Title -->
|
7
|
+
<title><%= Wbase.title %></title>
|
8
|
+
|
9
|
+
<!-- OG Meta Tags to improve the way the post looks when you share the page on LinkedIn, Facebook, Google+-->
|
10
|
+
<meta property="og:site_name" content="<%= Wbase.site_name %>" />
|
11
|
+
<meta property="og:site" content="<%= Wbase.url %>" />
|
12
|
+
<meta property="og:title" content="<%= Wbase.title %>"/>
|
13
|
+
<meta property="og:description" content="<%= Wbase.description %>" />
|
14
|
+
<meta property="og:image" content="<%= Wbase.image %>" />
|
15
|
+
<meta property="og:url" content="<%= Wbase.url %>" />
|
16
|
+
<meta property="og:type" content="article" />
|
17
|
+
|
18
|
+
<!-- SEO Meta Tags -->
|
19
|
+
<meta name="description" content="<%= Wbase.description %>">
|
20
|
+
<meta name="keywords" content="<%= Wbase.keywords %>">
|
21
|
+
|
22
|
+
<!-- Styles -->
|
23
|
+
<link href="https://fonts.googleapis.com/css?family=Poppins:300,500" rel="stylesheet">
|
24
|
+
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
|
25
|
+
|
26
|
+
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
27
|
+
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
28
|
+
<!--[if lt IE 9]>
|
29
|
+
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
30
|
+
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
31
|
+
<![endif]-->
|
32
|
+
|
33
|
+
<!-- Favicon and Apple Icons -->
|
34
|
+
<link rel="apple-touch-icon" sizes="57x57" href="images/favicon/apple-icon-57x57.png">
|
35
|
+
<link rel="apple-touch-icon" sizes="60x60" href="images/favicon/apple-icon-60x60.png">
|
36
|
+
<link rel="apple-touch-icon" sizes="72x72" href="images/favicon/apple-icon-72x72.png">
|
37
|
+
<link rel="apple-touch-icon" sizes="76x76" href="images/favicon/apple-icon-76x76.png">
|
38
|
+
<link rel="apple-touch-icon" sizes="114x114" href="images/favicon/apple-icon-114x114.png">
|
39
|
+
<link rel="apple-touch-icon" sizes="120x120" href="images/favicon/apple-icon-120x120.png">
|
40
|
+
<link rel="apple-touch-icon" sizes="144x144" href="images/favicon/apple-icon-144x144.png">
|
41
|
+
<link rel="apple-touch-icon" sizes="152x152" href="images/favicon/apple-icon-152x152.png">
|
42
|
+
<link rel="apple-touch-icon" sizes="180x180" href="images/favicon/apple-icon-180x180.png">
|
43
|
+
<link rel="icon" type="image/png" sizes="192x192" href="images/favicon/android-icon-192x192.png">
|
44
|
+
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon/favicon-32x32.png">
|
45
|
+
<link rel="icon" type="image/png" sizes="96x96" href="images/favicon/favicon-96x96.png">
|
46
|
+
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon/favicon-16x16.png">
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<%= render "layouts/wbase/common_head" %>
|
5
|
+
<%= stylesheet_link_tag "wbase/auth", media: "all" %>
|
6
|
+
<%= csrf_meta_tags %>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<div class="account-pages"></div>
|
10
|
+
<div class="clearfix"></div>
|
11
|
+
<div class="wrapper-page">
|
12
|
+
<div class="card-box">
|
13
|
+
<%= render 'shared/errors' %>
|
14
|
+
<%= yield %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<script>
|
18
|
+
var resizefunc = [];
|
19
|
+
</script>
|
20
|
+
<%= javascript_include_tag "wbase/auth" %>
|
21
|
+
<%= yield :javascripts %>
|
22
|
+
</body>
|
23
|
+
</html>
|
@@ -1,60 +1,13 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html lang="en">
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<!-- OG Meta Tags to improve the way the post looks when you share the page on LinkedIn, Facebook, Google+-->
|
13
|
-
<meta property="og:site_name" content="<%= Wbase.site_name %>" />
|
14
|
-
<meta property="og:site" content="<%= Wbase.url %>" />
|
15
|
-
<meta property="og:title" content="<%= Wbase.title %>"/>
|
16
|
-
<meta property="og:description" content="<%= Wbase.description %>" />
|
17
|
-
<meta property="og:image" content="<%= Wbase.image %>" />
|
18
|
-
<meta property="og:url" content="<%= Wbase.url %>" />
|
19
|
-
<meta property="og:type" content="article" />
|
20
|
-
|
21
|
-
<!-- SEO Meta Tags -->
|
22
|
-
<meta name="description" content="<%= Wbase.description %>">
|
23
|
-
<meta name="keywords" content="<%= Wbase.keywords %>">
|
24
|
-
|
25
|
-
<!-- Styles -->
|
26
|
-
<link href="https://fonts.googleapis.com/css?family=Poppins:300,500" rel="stylesheet">
|
27
|
-
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
|
28
|
-
|
29
|
-
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
30
|
-
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
31
|
-
<!--[if lt IE 9]>
|
32
|
-
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
33
|
-
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
34
|
-
<![endif]-->
|
35
|
-
|
36
|
-
<!-- Favicon and Apple Icons -->
|
37
|
-
<link rel="apple-touch-icon" sizes="57x57" href="images/favicon/apple-icon-57x57.png">
|
38
|
-
<link rel="apple-touch-icon" sizes="60x60" href="images/favicon/apple-icon-60x60.png">
|
39
|
-
<link rel="apple-touch-icon" sizes="72x72" href="images/favicon/apple-icon-72x72.png">
|
40
|
-
<link rel="apple-touch-icon" sizes="76x76" href="images/favicon/apple-icon-76x76.png">
|
41
|
-
<link rel="apple-touch-icon" sizes="114x114" href="images/favicon/apple-icon-114x114.png">
|
42
|
-
<link rel="apple-touch-icon" sizes="120x120" href="images/favicon/apple-icon-120x120.png">
|
43
|
-
<link rel="apple-touch-icon" sizes="144x144" href="images/favicon/apple-icon-144x144.png">
|
44
|
-
<link rel="apple-touch-icon" sizes="152x152" href="images/favicon/apple-icon-152x152.png">
|
45
|
-
<link rel="apple-touch-icon" sizes="180x180" href="images/favicon/apple-icon-180x180.png">
|
46
|
-
<link rel="icon" type="image/png" sizes="192x192" href="images/favicon/android-icon-192x192.png">
|
47
|
-
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon/favicon-32x32.png">
|
48
|
-
<link rel="icon" type="image/png" sizes="96x96" href="images/favicon/favicon-96x96.png">
|
49
|
-
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon/favicon-16x16.png">
|
50
|
-
|
51
|
-
<%= stylesheet_link_tag "wbase/landing", media: "all" %>
|
52
|
-
<%= csrf_meta_tags %>
|
53
|
-
</head>
|
54
|
-
<body class="animated fadeIn" id="top">
|
55
|
-
<%= yield %>
|
56
|
-
<%= javascript_include_tag "wbase/landing" %>
|
57
|
-
<%= yield :javascripts %>
|
58
|
-
|
3
|
+
<head>
|
4
|
+
<%= render "layouts/wbase/common_head" %>
|
5
|
+
<%= stylesheet_link_tag "wbase/landing", media: "all" %>
|
6
|
+
<%= csrf_meta_tags %>
|
7
|
+
</head>
|
8
|
+
<body class="animated fadeIn" id="top">
|
9
|
+
<%= yield %>
|
10
|
+
<%= javascript_include_tag "wbase/landing" %>
|
11
|
+
<%= yield :javascripts %>
|
59
12
|
</body>
|
60
13
|
</html>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<% if flash[:errors] %>
|
2
|
+
<div class="alert alert-danger alert-dismissable">
|
3
|
+
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">
|
4
|
+
×
|
5
|
+
</button>
|
6
|
+
<% flash[:errors].each do |error| %>
|
7
|
+
<p><%= error %></p>
|
8
|
+
<% end %>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<h1>New Subscription</h1>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
<%= @user.email %>
|
5
|
+
</p>
|
6
|
+
|
7
|
+
AWESOME job :)
|
8
|
+
|
9
|
+
<% content_for :preheader do %>
|
10
|
+
Welcome to RoeMe!
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<p style="font-family: sans-serif; font-size: 16px !important; font-weight: normal; margin: 0 0 15px;">Hi :)</p>
|
14
|
+
<p style="font-family: sans-serif; font-size: 16px !important; font-weight: normal; margin: 0 0 15px;">We're here to help connect LuLaRoe consultants to customers. Let us know if you have any questions.</p>
|
15
|
+
<p style="font-family: sans-serif; font-size: 16px !important; font-weight: normal; margin: 0 0 15px;"></p>
|
16
|
+
<table border="0" cellpadding="0" cellspacing="0" class="btn btn-primary" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; box-sizing: border-box;">
|
17
|
+
<tbody>
|
18
|
+
<tr>
|
19
|
+
<td align="left" style="font-family: sans-serif; font-size: 16px !important; vertical-align: top; padding-bottom: 15px;" valign="top">
|
20
|
+
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100% !important;">
|
21
|
+
<tbody>
|
22
|
+
<tr>
|
23
|
+
<td style="font-family: sans-serif; font-size: 16px !important; vertical-align: top; border-radius: 5px; text-align: center; background-color: #3498db;" align="center" bgcolor="#3498db" valign="top"> <a href="http://htmlemail.io" target="_blank" style="color: #ffffff; text-decoration: none; border-radius: 5px; box-sizing: border-box; cursor: pointer; display: inline-block; font-size: 16px !important; font-weight: bold; text-transform: capitalize; width: 100% !important; background-color: #3498db; margin: 0; padding: 12px 25px; border: 1px solid #3498db;">Call To Action</a> </td>
|
24
|
+
</tr>
|
25
|
+
</tbody>
|
26
|
+
</table>
|
27
|
+
</td>
|
28
|
+
</tr>
|
29
|
+
</tbody>
|
30
|
+
</table>
|
31
|
+
<p style="font-family: sans-serif; font-size: 16px !important; font-weight: normal; margin: 0 0 15px;">This is a really simple email template. Its sole purpose is to get the recipient to click the button with no distractions.</p>
|
32
|
+
<p style="font-family: sans-serif; font-size: 16px !important; font-weight: normal; margin: 0 0 15px;">Good luck! Hope it works.</p>
|
33
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<h1>Password Reset</h1>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
Hey there,
|
5
|
+
</p>
|
6
|
+
|
7
|
+
<p>
|
8
|
+
Looks like you forgot your password. No worries. This'll let you reset it:
|
9
|
+
<%= link_to edit_password_reset_url(token: @user.reset_token), edit_password_reset_url(token: @user.reset_token) %>
|
10
|
+
</p>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<div class="panel-heading">
|
2
|
+
<h3 class="text-center"> Reset Password </h3>
|
3
|
+
</div>
|
4
|
+
|
5
|
+
<div class="panel-body">
|
6
|
+
<form id="reset-form" action="/password_reset" method="POST" novalidate="">
|
7
|
+
<input type="hidden" name="authenticity_token" value="<%= form_authenticity_token %>">
|
8
|
+
<input type="hidden" name="_method" value="PATCH">
|
9
|
+
<input type="hidden" name="reset_token" value="<%= params[:token] || @user.try(:reset_token) %>">
|
10
|
+
<div class="form-group">
|
11
|
+
<label for="password">New Password</label>
|
12
|
+
<input type="password" class="form-control underlined" name="password" id="password" placeholder="Your new password" required>
|
13
|
+
</div>
|
14
|
+
<div class="form-group">
|
15
|
+
<button type="submit" class="btn btn-block btn-primary">Update</button>
|
16
|
+
</div>
|
17
|
+
<div class="form-group clearfix">
|
18
|
+
<a class="pull-left" href="/session/new">Log In</a>
|
19
|
+
<a class="pull-right" href="/user/new">Sign Up</a>
|
20
|
+
</div>
|
21
|
+
</form>
|
22
|
+
</div>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<% if flash[:alert] %>
|
2
|
+
<div class="alert alert-info alert-dismissable">
|
3
|
+
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">
|
4
|
+
×
|
5
|
+
</button>
|
6
|
+
<%= flash[:alert] %>
|
7
|
+
</div>
|
8
|
+
<br>
|
9
|
+
|
10
|
+
<a class="btn btn-lg btn-success btn-block" href="/welcome"><%= Wbase.site_name %></a>
|
11
|
+
<% else %>
|
12
|
+
|
13
|
+
<div class="panel-heading">
|
14
|
+
<h3 class="text-center"> Reset Password </h3>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div class="panel-body">
|
18
|
+
<p>
|
19
|
+
Enter your <b>Email</b> and instructions will be sent to you!
|
20
|
+
</p>
|
21
|
+
<form method="post" action="/password_reset" method="POST" role="form" class="text-center">
|
22
|
+
<input type="hidden" name="authenticity_token" value="<%= form_authenticity_token %>">
|
23
|
+
|
24
|
+
<div class="form-group m-b-0">
|
25
|
+
<div class="input-group">
|
26
|
+
<input type="email" class="form-control" name="email" id="email" placeholder="first.last@gmail.com" required>
|
27
|
+
<span class="input-group-btn">
|
28
|
+
<button type="submit" class="btn btn-pink w-sm waves-effect waves-light">
|
29
|
+
Reset
|
30
|
+
</button>
|
31
|
+
</span>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</form>
|
35
|
+
<hr>
|
36
|
+
<div class="form-group clearfix">
|
37
|
+
<a class="pull-left" href="/session/new">Log In</a>
|
38
|
+
<a class="pull-right" href="/user/new">Sign Up</a>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
<% end %>
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<div class="panel-heading">
|
2
|
+
<h3 class="text-center">
|
3
|
+
Log In to
|
4
|
+
<strong class="text-custom"><%= Wbase.site_name %></strong>
|
5
|
+
</h3>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div class="panel-body">
|
9
|
+
<form class="form-horizontal m-t-20" action="/session" method="POST">
|
10
|
+
<input type="hidden" name="authenticity_token" value="<%= form_authenticity_token %>">
|
11
|
+
|
12
|
+
<div class="form-group ">
|
13
|
+
<div class="col-xs-12">
|
14
|
+
<label for="email">Email</label>
|
15
|
+
<input class="form-control" id="email" type="email" name="user[email]" required="" placeholder="first.last@gmail.com">
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="form-group">
|
20
|
+
<div class="col-xs-12">
|
21
|
+
<label for="password">Password</label>
|
22
|
+
<input class="form-control" id="password" type="password" name="user[password]" required="" placeholder="Password">
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div class="form-group ">
|
27
|
+
<div class="col-xs-12">
|
28
|
+
<div class="checkbox checkbox-primary">
|
29
|
+
<input id="checkbox-signup" type="checkbox">
|
30
|
+
<label for="checkbox-signup">
|
31
|
+
Remember me
|
32
|
+
</label>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div class="form-group text-center m-t-40">
|
38
|
+
<div class="col-xs-12">
|
39
|
+
<button class="btn btn-pink btn-block text-uppercase waves-effect waves-light" type="submit">Log In</button>
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div class="form-group m-t-30 m-b-0">
|
44
|
+
<div class="col-sm-12 text-center">
|
45
|
+
<a href="/password_reset/new" class="">
|
46
|
+
<i class="fa fa-lock m-r-5"></i>
|
47
|
+
Forgot your password?
|
48
|
+
</a>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
<div class="row">
|
55
|
+
<div class="col-sm-12 text-center">
|
56
|
+
<p>Don't have an account? <a href="/user/new" class="m-l-5"><b>Sign Up</b></a></p>
|
57
|
+
</div>
|
58
|
+
</div>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<h2>Choose a plan that suits your style</h2>
|
8
8
|
</div>
|
9
9
|
<div class="col-md-2"></div>
|
10
|
-
<% Wbase.plans.each do |name, price,
|
10
|
+
<% Wbase.plans.each do |name, price, stripe_id, frequency, trial, features| %>
|
11
11
|
<div class="col-md-4">
|
12
12
|
<div class="pricing-column center-block">
|
13
13
|
<h3><%= name %></h3>
|
@@ -18,7 +18,11 @@
|
|
18
18
|
<% features.each do |feature| %>
|
19
19
|
<p><span class="checkmark">✓</span><%= feature %></p>
|
20
20
|
<% end %>
|
21
|
-
|
21
|
+
<% if logged_in? && current_user.status == 'inactive' %>
|
22
|
+
<a href="/subscription/new?plan=<%= stripe_id %>" class="button scrolling"><%= trial %></a>
|
23
|
+
<% else %>
|
24
|
+
<a href="/user/new?plan=<%= stripe_id %>" class="button scrolling"><%= trial %></a>
|
25
|
+
<% end %>
|
22
26
|
</div>
|
23
27
|
</div>
|
24
28
|
<% end %>
|
@@ -30,7 +30,7 @@
|
|
30
30
|
<li>
|
31
31
|
Set your API Key in the Chrome Extension Options.
|
32
32
|
<% if logged_in? %>
|
33
|
-
Your API Key is: <code><%=
|
33
|
+
Your API Key is: <code><%= current_user.try(:api_key) %></code>
|
34
34
|
<% else %>
|
35
35
|
<a href="/session/new">Login</a> or <a href="/user/new">Sign Up</a> to see your API Key.
|
36
36
|
<% end %>
|