.
675 |
--------------------------------------------------------------------------------
/Procfile:
--------------------------------------------------------------------------------
1 | web: bundle exec rails s -p $PORT
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Brisk Forms - No longer maintained
2 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 |
4 | require File.expand_path('../config/application', __FILE__)
5 |
6 | Rails.application.load_tasks
7 |
--------------------------------------------------------------------------------
/app/assets/images/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/app/assets/images/.keep
--------------------------------------------------------------------------------
/app/assets/images/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/app/assets/images/favicon.png
--------------------------------------------------------------------------------
/app/assets/images/sample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/app/assets/images/sample.png
--------------------------------------------------------------------------------
/app/assets/javascripts/application.js:
--------------------------------------------------------------------------------
1 | // This is a manifest file that'll be compiled into application.js, which will include all the files
2 | // listed below.
3 | //
4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5 | // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6 | //
7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8 | // compiled file.
9 | //
10 | // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11 | // about supported directives.
12 | //
13 | //= require jquery
14 | //= require jquery_ujs
15 | //= require turbolinks
16 | //= require_tree .
17 |
--------------------------------------------------------------------------------
/app/assets/javascripts/errors.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://coffeescript.org/
4 |
--------------------------------------------------------------------------------
/app/assets/javascripts/form.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://coffeescript.org/
4 |
--------------------------------------------------------------------------------
/app/assets/javascripts/static_pages.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://coffeescript.org/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/application.scss:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a manifest file that'll be compiled into application.css, which will include all the files
3 | * listed below.
4 | *
5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6 | * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7 | *
8 | * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9 | * compiled file so the styles you add here take precedence over styles defined in any styles
10 | * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11 | * file per style scope.
12 | */
13 |
14 | @import "bootstrap-sprockets";
15 | @import "bootstrap";
16 | @import "main";
17 | @import "callouts";
18 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/callouts.scss:
--------------------------------------------------------------------------------
1 | .bs-callout {
2 | padding: 20px;
3 | margin: 20px 0;
4 | border: 1px solid #eee;
5 | border-left-width: 5px;
6 | border-radius: 3px;
7 | }
8 | .bs-callout h4 {
9 | margin-top: 0;
10 | margin-bottom: 5px;
11 | }
12 | .bs-callout p:last-child {
13 | margin-bottom: 0;
14 | }
15 | .bs-callout code {
16 | border-radius: 3px;
17 | }
18 | .bs-callout+.bs-callout {
19 | margin-top: -5px;
20 | }
21 | .bs-callout-default {
22 | border-left-color: #777;
23 | }
24 | .bs-callout-default h4 {
25 | color: #777;
26 | }
27 | .bs-callout-primary {
28 | border-left-color: #428bca;
29 | }
30 | .bs-callout-primary h4 {
31 | color: #428bca;
32 | }
33 | .bs-callout-success {
34 | border-left-color: #5cb85c;
35 | }
36 | .bs-callout-success h4 {
37 | color: #5cb85c;
38 | }
39 | .bs-callout-danger {
40 | border-left-color: #d9534f;
41 | }
42 | .bs-callout-danger h4 {
43 | color: #d9534f;
44 | }
45 | .bs-callout-warning {
46 | border-left-color: #f0ad4e;
47 | }
48 | .bs-callout-warning h4 {
49 | color: #f0ad4e;
50 | }
51 | .bs-callout-info {
52 | border-left-color: #5bc0de;
53 | }
54 | .bs-callout-info h4 {
55 | color: #5bc0de;
56 | }
--------------------------------------------------------------------------------
/app/assets/stylesheets/errors.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the Errors controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/form.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the Form controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/main.scss:
--------------------------------------------------------------------------------
1 | /* Space out content a bit */
2 | body {
3 | padding-top: 20px;
4 | padding-bottom: 20px;
5 | }
6 |
7 | /* Everything but the jumbotron gets side spacing for mobile first views */
8 | .header,
9 | .marketing,
10 | .footer {
11 | padding-right: 15px;
12 | padding-left: 15px;
13 | }
14 |
15 | /* Custom page header */
16 | .header {
17 | padding-bottom: 20px;
18 | border-bottom: 1px solid #e5e5e5;
19 | }
20 | /* Make the masthead heading the same height as the navigation */
21 | .header h3 {
22 | margin-top: 0;
23 | margin-bottom: 0;
24 | line-height: 40px;
25 | }
26 |
27 | /* Custom page footer */
28 | .footer {
29 | padding-top: 19px;
30 | color: #777;
31 | border-top: 1px solid #e5e5e5;
32 | }
33 |
34 | /* Customize container */
35 | @media (min-width: 768px) {
36 | .container {
37 | max-width: 730px;
38 | }
39 | }
40 | .container-narrow > hr {
41 | margin: 30px 0;
42 | }
43 |
44 | /* Main marketing message and sign up button */
45 | .jumbotron {
46 | text-align: center;
47 | border-bottom: 1px solid #e5e5e5;
48 | padding-top: 0px;
49 | padding-bottom: 0px;
50 | background-color: #FFF;
51 | }
52 | .jumbotron .btn {
53 | padding: 14px 24px;
54 | font-size: 21px;
55 | }
56 | .jumbotron h1 {
57 | font-size: 4em;
58 | }
59 |
60 | /* Supporting marketing content */
61 | .marketing {
62 | margin: 40px 0;
63 | }
64 | .marketing p + h4 {
65 | margin-top: 28px;
66 | }
67 |
68 | /* Responsive: Portrait tablets and up */
69 | @media screen and (min-width: 768px) {
70 | /* Remove the padding we set earlier */
71 | .header,
72 | .marketing,
73 | .footer {
74 | padding-right: 0;
75 | padding-left: 0;
76 | }
77 | /* Space out the masthead */
78 | .header {
79 | margin-bottom: 30px;
80 | }
81 | /* Remove the bottom border on the jumbotron for visual effect */
82 | .jumbotron {
83 | border-bottom: 0;
84 | }
85 | }
--------------------------------------------------------------------------------
/app/assets/stylesheets/static_pages.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the StaticPages controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
5 |
--------------------------------------------------------------------------------
/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | class ApplicationController < ActionController::Base
2 | # Prevent CSRF attacks by raising an exception.
3 | # For APIs, you may want to use :null_session instead.
4 | protect_from_forgery with: :exception
5 | end
6 |
--------------------------------------------------------------------------------
/app/controllers/concerns/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/app/controllers/concerns/.keep
--------------------------------------------------------------------------------
/app/controllers/errors_controller.rb:
--------------------------------------------------------------------------------
1 | class ErrorsController < ApplicationController
2 | def not_found
3 | render status: :not_found
4 | end
5 |
6 | def forbidden
7 | render status: :forbidden
8 |
9 | end
10 |
11 | def error
12 | render status: :internal_server_error
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/app/controllers/form_controller.rb:
--------------------------------------------------------------------------------
1 | require 'securerandom'
2 |
3 | class FormController < ApplicationController
4 |
5 | protect_from_forgery except: :submit
6 |
7 | def new
8 | end
9 |
10 | def create
11 | @form = Form.new
12 | @form.email = params['email']
13 | @form.success_url = params['success_url']
14 | @form.url = SecureRandom.hex
15 | @form.admin_url = SecureRandom.hex
16 | @form.confirm_url = SecureRandom.hex
17 | @form.confirmed = false
18 | if @form.save
19 | FormMailer.form_confirmation(@form).deliver_now
20 | flash[:notice] = "Form action handler created"
21 | redirect_to "/show/#{@form.admin_url}"
22 | else
23 | flash[:error] = "Please fill out the form completely."
24 | redirect_to "/new"
25 | end
26 | end
27 |
28 | def confirm
29 | @form = Form.find_by! confirm_url: params[:id]
30 | @form.confirmed = true
31 | @form.save
32 | if @form.save
33 | flash[:notice] = "Thank you for confirming your email. Your form is now ready to use."
34 | redirect_to "/show/#{@form.admin_url}"
35 | else
36 | flash[:error] = "Something went wrong."
37 | redirect_to root_path
38 | end
39 |
40 | end
41 |
42 | def delete
43 | Form.where(admin_url: params[:id]).destroy_all
44 | flash[:notice] = "Form action handler destroyed"
45 | redirect_to '/new'
46 | end
47 |
48 | def show
49 | @form = Form.find_by! admin_url: params[:id]
50 | flash.now[:error] = "This form has not yet been confirmed. Please check your email for a link." if not @form.confirmed
51 | end
52 |
53 | def submit
54 | #TODO throttle submission rate to 10 per form per hour?
55 | @form = Form.find_by! url: params[:id]
56 |
57 | if @form.confirmed
58 | FormMailer.form_submission(@form, params).deliver_now
59 | respond_to do |format|
60 | format.json do
61 | render :json => {
62 | :status => :ok,
63 | :message => 'form submitted'
64 | }, :callback => params['callback']
65 | end
66 | format.html { redirect_to URI.escape(@form.success_url) }
67 | end
68 | else
69 | respond_to do |format|
70 | format.json do
71 | render :json => {
72 | :status => :error,
73 | :message => 'form not activated'
74 | }, :callback => params['callback']
75 | end
76 | format.html { redirect_to URI.escape(@form.success_url) } #fail silently
77 | end
78 | end
79 | end
80 | end
81 |
--------------------------------------------------------------------------------
/app/controllers/static_pages_controller.rb:
--------------------------------------------------------------------------------
1 | class StaticPagesController < ApplicationController
2 | def home
3 | end
4 | def contact
5 | end
6 | def guide
7 | end
8 | def tos
9 | end
10 | def privacy
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | module ApplicationHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/errors_helper.rb:
--------------------------------------------------------------------------------
1 | module ErrorsHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/form_helper.rb:
--------------------------------------------------------------------------------
1 | module FormHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/static_pages_helper.rb:
--------------------------------------------------------------------------------
1 | module StaticPagesHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/mailers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/app/mailers/.keep
--------------------------------------------------------------------------------
/app/mailers/application_mailer.rb:
--------------------------------------------------------------------------------
1 | class ApplicationMailer < ActionMailer::Base
2 | default from: "from@example.com"
3 | layout 'mailer'
4 | end
5 |
--------------------------------------------------------------------------------
/app/mailers/form_mailer.rb:
--------------------------------------------------------------------------------
1 | class FormMailer < ApplicationMailer
2 | default from: 'admin@briskforms.com'
3 |
4 | def form_submission(form, contents)
5 | @contents = contents
6 | @form = form
7 | mail(to: @form.email, subject: 'Form Submission')
8 | end
9 |
10 | def form_confirmation(form)
11 | @form = form
12 | mail(to: @form.email, subject: 'Confirm Form Creation')
13 | end
14 |
15 | end
16 |
--------------------------------------------------------------------------------
/app/models/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/app/models/.keep
--------------------------------------------------------------------------------
/app/models/concerns/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/app/models/concerns/.keep
--------------------------------------------------------------------------------
/app/models/form.rb:
--------------------------------------------------------------------------------
1 | class Form < ActiveRecord::Base
2 |
3 | after_validation :add_url_scheme
4 |
5 | def add_url_scheme
6 | unless self.success_url[/\Ahttp:\/\//] || self.success_url[/\Ahttps:\/\//]
7 | self.success_url = "http://#{self.success_url}"
8 | end
9 | end
10 |
11 | validates :email, presence: true
12 | validates :url, presence: true
13 | validates :success_url, presence: true
14 | validates :admin_url, presence: true
15 | validates :confirm_url, presence: true
16 |
17 | has_secure_token :url
18 | has_secure_token :admin_url
19 | has_secure_token :confirm_url
20 | end
21 |
--------------------------------------------------------------------------------
/app/views/errors/error.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
Error!
3 |
An error has occurred. We know about it and are working to fix it.
4 |
Return home
5 |
--------------------------------------------------------------------------------
/app/views/errors/forbidden.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
Forbidden!
3 |
You are not authorized to access this resource.
4 |
Return home
5 |
--------------------------------------------------------------------------------
/app/views/errors/not_found.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
Not found!
3 |
The page you are looking for does not exist.
4 |
Return home
5 |
--------------------------------------------------------------------------------
/app/views/form/new.html.erb:
--------------------------------------------------------------------------------
1 | <% if flash[:notice] %>
2 | <%= flash[:notice] %>
3 | <% end %>
4 |
5 |
8 |
9 |
10 | <% if flash[:error] %>
11 | <%= flash[:error] %>
12 | <% end %>
13 |
14 | <%= form_tag('/new', class:'form-horizontal') do %>
15 |
16 |
23 |
30 |
31 |
38 |
43 |
44 | <% end %>
45 |
46 |
--------------------------------------------------------------------------------
/app/views/form/show.html.erb:
--------------------------------------------------------------------------------
1 | <% if flash[:notice] %>
2 | <%= flash[:notice] %>
3 | <% end %>
4 |
5 |
8 |
9 | <% if flash[:error] %>
10 | <%= flash[:error] %>
11 | <% end %>
12 |
13 | Set your form's action attribute to:
14 | <%= "#{request.base_url}/go/#{@form.url}" %>
15 |
16 | Or use the following HTML tag:
17 | <%= "
18 |
19 | <%= form_tag('/new', class:'form-horizontal') do %>
20 |
21 |
27 |
33 |
34 |
35 |
40 |
41 | <% end %>
42 |
43 |
44 |
--------------------------------------------------------------------------------
/app/views/form_mailer/form_confirmation.html.erb:
--------------------------------------------------------------------------------
1 | Welcome to Brisk Forms!
2 |
3 | Please confirm the creation of your form by clicking ">here.
4 |
5 | If you did not register this form, you can safely ignore this email, or click ">here.
6 |
7 | Thanks for using Brisk Forms to process form submissions!
8 |
9 | -Brisk Forms
--------------------------------------------------------------------------------
/app/views/form_mailer/form_confirmation.text.erb:
--------------------------------------------------------------------------------
1 | Welcome to Brisk Forms!
2 | =======================
3 | Please confirm the creation of your form by visiting
4 |
5 | <%= "https://briskforms.com/confirm/#{@form.confirm_url}" %>
6 |
7 | If you did not register this form, you can safely ignore this email, or visit
8 |
9 | <%= "https://briskforms.com/delete/#{@form.admin_url}" %>
10 |
11 |
12 | Thanks for using Brisk Forms to process form submissions!
13 |
14 | -Brisk Forms
15 |
--------------------------------------------------------------------------------
/app/views/form_mailer/form_submission.html.erb:
--------------------------------------------------------------------------------
1 | New submission from your Brisk Form
2 |
3 | Contents
4 |
5 | <% @contents.each do |k, v| %>
6 | <% if k != 'controller' and k != 'action' and k != 'id' %>
7 | <%= k %> - <%= v %>
8 | <% end %>
9 | <% end %>
10 |
11 | Administration
12 | Details for this form handler, click ">here. To stop receiving these emails, delete the form submission handler by clicking ">here.
13 | Thanks for using Brisk Forms to process form submissions!
14 |
15 | -Brisk Forms
16 |
--------------------------------------------------------------------------------
/app/views/form_mailer/form_submission.text.erb:
--------------------------------------------------------------------------------
1 | New submission from your Brisk Form!
2 | ======
3 | Contents:
4 |
5 | <% @contents.each do |k, v| %>
6 | <% if k != 'controller' and k != 'action' and k != 'id' %>
7 | *<%= k %>:
8 | <%= v %>
9 |
10 | <% end %>
11 | <% end %>
12 |
13 |
14 | Administration
15 | Details for this form handler including stopping these emails, visit <%= "https://briskforms.com/show/#{@form.admin_url}" %>.
16 |
17 | Thanks for using Brisk Forms to process form submissions!
18 |
19 | -Brisk Forms
20 |
--------------------------------------------------------------------------------
/app/views/layouts/application.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Brisk Forms - Free, Secure, Open source form submission service
5 |
6 |
7 |
8 |
9 | <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
10 | <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
11 | <%= csrf_meta_tags %>
12 | <%= favicon_link_tag 'favicon.png' %>
13 |
14 |
15 |
16 |
17 |
18 |
29 |
30 | <%= yield %>
31 |
32 |
33 |
34 |
39 |
42 |
45 |
46 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/app/views/layouts/mailer.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | <%= yield %>
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/views/layouts/mailer.text.erb:
--------------------------------------------------------------------------------
1 | <%= yield %>
2 |
--------------------------------------------------------------------------------
/app/views/static_pages/contact.html.erb:
--------------------------------------------------------------------------------
1 |
5 |
6 | <%= form_tag('https://www.briskforms.com/go/69054750e2631f50d2196dddbec4956d', class:'form-horizontal') do %>
7 |
8 |
14 |
15 |
21 |
22 |
28 |
29 | <% end %>
30 |
31 |
34 |
--------------------------------------------------------------------------------
/app/views/static_pages/guide.html.erb:
--------------------------------------------------------------------------------
1 |
4 |
5 | What is BriskForms?
6 |
7 | BriskForms provides a fast and secure mechanism by which to keep in touch with your visitors while protecting your privacy and keeping spammers away.
8 |
9 |
10 | With no registration required, adding a BriskForm to your site or app has never been easier.
11 |
12 | Getting Started
13 |
14 | We ask just two simple questions.
15 |
16 | 1. Where are you at?
17 |
18 | Tell us where to send your form submissions.
19 |
20 |
21 | A confirmation link will be sent to this address following setup.
22 |
23 | 2. Do what now?
24 |
25 | We can't just leave your visitors hanging! Tell us where you want them sent next.
26 |
27 | Setting up your Brisk Form
28 |
29 | Upon submission of your configuration information, you'll be supplied with a secure URL to place in your form's action attribute. Want to use AJAX? Not a problem! Just POST your form data to the same URL and we'll give you a JSON object indicating the status of the form submission. Padded JSON (PJSON) is supported by setting the "callback" parameter in the request header or URL to a function of your choosing.
30 |
31 |
32 |
33 |
34 |
Important:
35 | The address you used in step 1 must be confirmed via a confirmation link before your BriskForm will be active.
36 |
37 | And that's it.
38 | We'll take it form here.
39 |
40 |
41 |
44 |
--------------------------------------------------------------------------------
/app/views/static_pages/home.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
HTML forms delivered to your inbox for free
3 |
Submit your form to our URL, and we'll forward the contents to your email. No account, no database, no scripting, and no cost!
4 |
Get started now
5 |
6 |
7 |
8 |
9 |
Free, secure HTML form submission for static sites
10 |
Ideal for people wishing to implement a contact form without exposing your email address on static sites such as those created with Jekyll, Pelican, or Hakyll.
11 |
12 |
13 |
Why choose Brisk Forms
14 |
Similar services all have the same problem: Your email address is exposed to would-be spammers, unless you pay them. Brisk Forms side-steps this issue by providing you with a unique and secure URL to use in place of your email address. You can even stop emails at any time with a click of a button. Brisk Forms is also open source!
15 |
16 |
17 |
Example usage
18 |
<%= image_tag("sample.png", class:'img-thumbnail') %>
19 |
20 |
21 | When the form is completed and submitted, the results of the form will be emailed to you, and your user will be forwarded to wherever you'd like.
22 | Start Now, it's free!
23 |
24 |
27 |
--------------------------------------------------------------------------------
/app/views/static_pages/privacy.html.erb:
--------------------------------------------------------------------------------
1 | Privacy Policy
2 | Last updated: February 25, 2016
3 | Brisk Forms is committed to protecting your privacy. We only use the information we collect about you to process forms, verify account ownership and to provide support and upgrades for our products. We do not store the information submitted by external forms in our database. Please read on for more details about our privacy policy.
4 |
5 | How does Brisk Forms protect customer information?
6 | We use a secure server for collecting personal information. The secure server layer (SSL) encrypts all of the information you enter before it is transmitted over the interenet and sent to us. Furthermore, all of the customer data we collect is protected against unauthorized access.
7 |
8 | How are credit cards handled?
9 | They're not, because Brisk Forms is a free service.
10 |
11 | What about "cookies"?
12 | "Cookies" are small pieces of information that are stored by your browser on your computer's hard drive. We do not use cookies to collect or store any information about visitors or customers; they are used only to identify you and your computer for secure access to our site.
13 |
14 | How are email addresses used?
15 | Email addresses are stored only so that we can send our validation and notifiers of form activity. We do not use them for marketing or sales.
16 |
17 | Will Brisk Forms disclose the information it collects to outside parties?
18 | Brisk Forms will not sell your personal information to others. Brisk Forms may provide aggregate statistics about our customers, sales, traffic patterns, and related site information to reputable third-party vendors, but these statistics will not include personally identifying information.
19 | Brisk Forms may release account information when we believe, in good faith, that such release is reasonably necessary to (i) comply with law, (ii) enforce or apply the terms of any of our user agreements or (iii) protect the rights, property or safety of Brisk Forms, our users, or others.
20 |
21 | Your Consent
22 | By using our Web site, you consent to the collection and use of this information by Brisk Forms. If we decide to change our privacy policy, we will post those changes on this page so that you are always aware of what information we collect, how we use it, and under what circumstances we disclose it.
23 | Brisk Forms may provides links on our site to other sites we work with. The privacy policies of those linked sites are the responsibliity of those site owners, and Brisk Forms has no control or influence over their policies. Please check the policies of each site you visit for specific information. Brisk Forms cannot be held liable for damage or misdoings of other sites, linked or otherwise.
24 |
25 | Contact Us
26 | If you have any questions about our Privacy Policy, please contact us.
27 |
--------------------------------------------------------------------------------
/app/views/static_pages/tos.html.erb:
--------------------------------------------------------------------------------
1 | Terms of Service ("Terms")
2 | Last updated: February 21, 2016
3 | Please read these Terms of Service ("Terms", "Terms of Service") carefully before using the https://www.briskforms.com website (the "Service") operated by Brisk Forms ("us", "we", or "our").
4 | Your access to and use of the Service is conditioned on your acceptance of and compliance with these Terms. These Terms apply to all visitors, users and others who access or use the Service.
5 | By accessing or using the Service you agree to be bound by these Terms. If you disagree with any part of the terms then you may not access the Service.
6 | Links To Other Web Sites
7 | Our Service may contain links to third-party web sites or services that are not owned or controlled by Brisk Forms.
8 | Brisk Forms has no control over, and assumes no responsibility for, the content, privacy policies, or practices of any third party web sites or services. You further acknowledge and agree that Brisk Forms shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods or services available on or through any such web sites or services.
9 | We strongly advise you to read the terms and conditions and privacy policies of any third-party web sites or services that you visit.
10 | Termination
11 | We may terminate or suspend access to our Service immediately, without prior notice or liability, for any reason whatsoever, including without limitation if you breach the Terms.
12 | All provisions of the Terms which by their nature should survive termination shall survive termination, including, without limitation, ownership provisions, warranty disclaimers, indemnity and limitations of liability.
13 | Governing Law
14 | These Terms shall be governed and construed in accordance with the laws of Virginia, United States, without regard to its conflict of law provisions.
15 | Our failure to enforce any right or provision of these Terms will not be considered a waiver of those rights. If any provision of these Terms is held to be invalid or unenforceable by a court, the remaining provisions of these Terms will remain in effect. These Terms constitute the entire agreement between us regarding our Service, and supersede and replace any prior agreements we might have between us regarding the Service.
16 | Changes
17 | We reserve the right, at our sole discretion, to modify or replace these Terms at any time. If a revision is material we will try to provide at least 30 days notice prior to any new terms taking effect. What constitutes a material change will be determined at our sole discretion.
18 | By continuing to access or use our Service after those revisions become effective, you agree to be bound by the revised terms. If you do not agree to the new terms, please stop using the Service.
19 | Contact Us
20 | If you have any questions about these Terms, please contact us.
21 |
--------------------------------------------------------------------------------
/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3 | load Gem.bin_path('bundler', 'bundle')
4 |
--------------------------------------------------------------------------------
/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_PATH = File.expand_path('../config/application', __dir__)
3 | require_relative '../config/boot'
4 | require 'rails/commands'
5 |
--------------------------------------------------------------------------------
/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require_relative '../config/boot'
3 | require 'rake'
4 | Rake.application.run
5 |
--------------------------------------------------------------------------------
/bin/setup:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require 'pathname'
3 | require 'fileutils'
4 | include FileUtils
5 |
6 | # path to your application root.
7 | APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8 |
9 | def system!(*args)
10 | system(*args) || abort("\n== Command #{args} failed ==")
11 | end
12 |
13 | chdir APP_ROOT do
14 | # This script is a starting point to setup your application.
15 | # Add necessary setup steps to this file.
16 |
17 | puts '== Installing dependencies =='
18 | system! 'gem install bundler --conservative'
19 | system('bundle check') || system!('bundle install')
20 |
21 | # puts "\n== Copying sample files =="
22 | # unless File.exist?('config/database.yml')
23 | # cp 'config/database.yml.sample', 'config/database.yml'
24 | # end
25 |
26 | puts "\n== Preparing database =="
27 | system! 'bin/rails db:setup'
28 |
29 | puts "\n== Removing old logs and tempfiles =="
30 | system! 'bin/rails log:clear tmp:clear'
31 |
32 | puts "\n== Restarting application server =="
33 | system! 'bin/rails restart'
34 | end
35 |
--------------------------------------------------------------------------------
/bin/spring:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 |
3 | # This file loads spring without using Bundler, in order to be fast.
4 | # It gets overwritten when you run the `spring binstub` command.
5 |
6 | unless defined?(Spring)
7 | require 'rubygems'
8 | require 'bundler'
9 |
10 | if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
11 | Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq }
12 | gem 'spring', match[1]
13 | require 'spring/binstub'
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/bin/update:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require 'pathname'
3 | require 'fileutils'
4 | include FileUtils
5 |
6 | # path to your application root.
7 | APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8 |
9 | def system!(*args)
10 | system(*args) || abort("\n== Command #{args} failed ==")
11 | end
12 |
13 | chdir APP_ROOT do
14 | # This script is a way to update your development environment automatically.
15 | # Add necessary update steps to this file.
16 |
17 | puts '== Installing dependencies =='
18 | system! 'gem install bundler --conservative'
19 | system('bundle check') || system!('bundle install')
20 |
21 | puts "\n== Updating database =="
22 | system! 'bin/rails db:migrate'
23 |
24 | puts "\n== Removing old logs and tempfiles =="
25 | system! 'bin/rails log:clear tmp:clear'
26 |
27 | puts "\n== Restarting application server =="
28 | system! 'bin/rails restart'
29 | end
30 |
--------------------------------------------------------------------------------
/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require ::File.expand_path('../config/environment', __FILE__)
4 | run Rails.application
5 |
--------------------------------------------------------------------------------
/config/application.rb:
--------------------------------------------------------------------------------
1 | require_relative 'boot'
2 |
3 | require 'rails/all'
4 |
5 | # Require the gems listed in Gemfile, including any gems
6 | # you've limited to :test, :development, or :production.
7 | Bundler.require(*Rails.groups)
8 |
9 | module BriskForms
10 | class Application < Rails::Application
11 | # Settings in config/environments/* take precedence over those specified here.
12 | # Application configuration should go into files in config/initializers
13 | # -- all .rb files in that directory are automatically loaded.
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/config/boot.rb:
--------------------------------------------------------------------------------
1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2 |
3 | require 'bundler/setup' # Set up gems listed in the Gemfile.
4 |
--------------------------------------------------------------------------------
/config/cable.yml:
--------------------------------------------------------------------------------
1 | development:
2 | adapter: async
3 |
4 | test:
5 | adapter: async
6 |
7 | production:
8 | adapter: redis
9 | url: redis://localhost:6379/1
10 |
--------------------------------------------------------------------------------
/config/database.yml:
--------------------------------------------------------------------------------
1 | # SQLite version 3.x
2 | # gem install sqlite3
3 | #
4 | # Ensure the SQLite 3 gem is defined in your Gemfile
5 | # gem 'sqlite3'
6 | #
7 | default: &default
8 | adapter: sqlite3
9 | pool: 5
10 | timeout: 5000
11 |
12 | development:
13 | <<: *default
14 | database: db/development.sqlite3
15 |
16 | # Warning: The database defined as "test" will be erased and
17 | # re-generated from your development database when you run "rake".
18 | # Do not set this db to the same as development or production.
19 | test:
20 | <<: *default
21 | database: db/test.sqlite3
22 |
23 | production:
24 | adapter: postgresql
25 | encoding: unicode
26 | database: ENV['DATABASE_URL']
27 |
28 |
--------------------------------------------------------------------------------
/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require File.expand_path('../application', __FILE__)
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
7 |
8 | ActionMailer::Base.smtp_settings = {
9 | :user_name => ENV['SENDGRID_USERNAME'],
10 | :password => ENV['SENDGRID_PASSWORD'],
11 | :domain => 'briskforms.com',
12 | :address => 'smtp.sendgrid.net',
13 | :port => 587,
14 | :authentication => :plain,
15 | :enable_starttls_auto => true
16 | }
17 |
--------------------------------------------------------------------------------
/config/environments/development.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # In the development environment your application's code is reloaded on
5 | # every request. This slows down response time but is perfect for development
6 | # since you don't have to restart the web server when you make code changes.
7 | config.cache_classes = false
8 |
9 | # Do not eager load code on boot.
10 | config.eager_load = false
11 |
12 | # Show full error reports.
13 | config.consider_all_requests_local = true
14 |
15 | # Enable/disable caching. By default caching is disabled.
16 | if Rails.root.join('tmp/caching-dev.txt').exist?
17 | config.action_controller.perform_caching = true
18 |
19 | config.cache_store = :memory_store
20 | config.public_file_server.headers = {
21 | 'Cache-Control' => 'public, max-age=172800'
22 | }
23 | else
24 | config.action_controller.perform_caching = false
25 |
26 | config.cache_store = :null_store
27 | end
28 |
29 | # Don't care if the mailer can't send.
30 | config.action_mailer.raise_delivery_errors = false
31 |
32 | config.action_mailer.perform_caching = false
33 |
34 | # Print deprecation notices to the Rails logger.
35 | config.active_support.deprecation = :log
36 |
37 | # Raise an error on page load if there are pending migrations.
38 | config.active_record.migration_error = :page_load
39 |
40 | # Debug mode disables concatenation and preprocessing of assets.
41 | # This option may cause significant delays in view rendering with a large
42 | # number of complex assets.
43 | config.assets.debug = true
44 |
45 | # Suppress logger output for asset requests.
46 | config.assets.quiet = true
47 |
48 | # Raises error for missing translations
49 | # config.action_view.raise_on_missing_translations = true
50 |
51 | # Use an evented file watcher to asynchronously detect changes in source code,
52 | # routes, locales, etc. This feature depends on the listen gem.
53 | # config.file_watcher = ActiveSupport::EventedFileUpdateChecker
54 | end
55 |
--------------------------------------------------------------------------------
/config/environments/production.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # Code is not reloaded between requests.
5 | config.cache_classes = true
6 |
7 | # Eager load code on boot. This eager loads most of Rails and
8 | # your application in memory, allowing both threaded web servers
9 | # and those relying on copy on write to perform better.
10 | # Rake tasks automatically ignore this option for performance.
11 | config.eager_load = true
12 |
13 | # Full error reports are disabled and caching is turned on.
14 | config.consider_all_requests_local = false
15 | config.action_controller.perform_caching = true
16 |
17 | # Disable serving static files from the `/public` folder by default since
18 | # Apache or NGINX already handles this.
19 | config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
20 |
21 | # Compress JavaScripts and CSS.
22 | config.assets.js_compressor = :uglifier
23 | # config.assets.css_compressor = :sass
24 |
25 | # Do not fallback to assets pipeline if a precompiled asset is missed.
26 | config.assets.compile = false
27 |
28 | # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
29 |
30 | # Enable serving of images, stylesheets, and JavaScripts from an asset server.
31 | # config.action_controller.asset_host = 'http://assets.example.com'
32 |
33 | # Specifies the header that your server uses for sending files.
34 | # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
35 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
36 |
37 | # Mount Action Cable outside main process or domain
38 | # config.action_cable.mount_path = nil
39 | # config.action_cable.url = 'wss://example.com/cable'
40 | # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
41 |
42 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
43 | # config.force_ssl = true
44 |
45 | # Use the lowest log level to ensure availability of diagnostic information
46 | # when problems arise.
47 | config.log_level = :debug
48 |
49 | # Prepend all log lines with the following tags.
50 | config.log_tags = [ :request_id ]
51 |
52 | # Use a different cache store in production.
53 | # config.cache_store = :mem_cache_store
54 |
55 | # Use a real queuing backend for Active Job (and separate queues per environment)
56 | # config.active_job.queue_adapter = :resque
57 | # config.active_job.queue_name_prefix = "brisk_forms_#{Rails.env}"
58 | config.action_mailer.perform_caching = false
59 |
60 | # Ignore bad email addresses and do not raise email delivery errors.
61 | # Set this to true and configure the email server for immediate delivery to raise delivery errors.
62 | # config.action_mailer.raise_delivery_errors = false
63 |
64 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
65 | # the I18n.default_locale when a translation cannot be found).
66 | config.i18n.fallbacks = true
67 |
68 | # Send deprecation notices to registered listeners.
69 | config.active_support.deprecation = :notify
70 |
71 | # Use default logging formatter so that PID and timestamp are not suppressed.
72 | config.log_formatter = ::Logger::Formatter.new
73 |
74 | # Use a different logger for distributed setups.
75 | # require 'syslog/logger'
76 | # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
77 |
78 | if ENV["RAILS_LOG_TO_STDOUT"].present?
79 | logger = ActiveSupport::Logger.new(STDOUT)
80 | logger.formatter = config.log_formatter
81 | config.logger = ActiveSupport::TaggedLogging.new(logger)
82 | end
83 |
84 | # Do not dump schema after migrations.
85 | config.active_record.dump_schema_after_migration = false
86 | end
87 |
--------------------------------------------------------------------------------
/config/environments/test.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # The test environment is used exclusively to run your application's
5 | # test suite. You never need to work with it otherwise. Remember that
6 | # your test database is "scratch space" for the test suite and is wiped
7 | # and recreated between test runs. Don't rely on the data there!
8 | config.cache_classes = true
9 |
10 | # Do not eager load code on boot. This avoids loading your whole application
11 | # just for the purpose of running a single test. If you are using a tool that
12 | # preloads Rails for running tests, you may have to set it to true.
13 | config.eager_load = false
14 |
15 | # Configure public file server for tests with Cache-Control for performance.
16 | config.public_file_server.enabled = true
17 | config.public_file_server.headers = {
18 | 'Cache-Control' => 'public, max-age=3600'
19 | }
20 |
21 | # Show full error reports and disable caching.
22 | config.consider_all_requests_local = true
23 | config.action_controller.perform_caching = false
24 |
25 | # Raise exceptions instead of rendering exception templates.
26 | config.action_dispatch.show_exceptions = false
27 |
28 | # Disable request forgery protection in test environment.
29 | config.action_controller.allow_forgery_protection = false
30 | config.action_mailer.perform_caching = false
31 |
32 | # Tell Action Mailer not to deliver emails to the real world.
33 | # The :test delivery method accumulates sent emails in the
34 | # ActionMailer::Base.deliveries array.
35 | config.action_mailer.delivery_method = :test
36 |
37 | # Print deprecation notices to the stderr.
38 | config.active_support.deprecation = :stderr
39 |
40 | # Raises error for missing translations
41 | # config.action_view.raise_on_missing_translations = true
42 | end
43 |
--------------------------------------------------------------------------------
/config/initializers/application_controller_renderer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # ApplicationController.renderer.defaults.merge!(
4 | # http_host: 'example.org',
5 | # https: false
6 | # )
7 |
--------------------------------------------------------------------------------
/config/initializers/assets.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Version of your assets, change this if you want to expire all your assets.
4 | Rails.application.config.assets.version = '1.0'
5 |
6 | # Add additional assets to the asset load path
7 | # Rails.application.config.assets.paths << Emoji.images_path
8 |
9 | # Precompile additional assets.
10 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11 | # Rails.application.config.assets.precompile += %w( search.js )
12 |
--------------------------------------------------------------------------------
/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5 |
6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7 | # Rails.backtrace_cleaner.remove_silencers!
8 |
--------------------------------------------------------------------------------
/config/initializers/cookies_serializer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Specify a serializer for the signed and encrypted cookie jars.
4 | # Valid options are :json, :marshal, and :hybrid.
5 | Rails.application.config.action_dispatch.cookies_serializer = :json
6 |
--------------------------------------------------------------------------------
/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure sensitive parameters which will be filtered from the log file.
4 | Rails.application.config.filter_parameters += [:password]
5 |
--------------------------------------------------------------------------------
/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format. Inflections
4 | # are locale specific, and you may define rules for as many different
5 | # locales as you wish. All of these examples are active by default:
6 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
7 | # inflect.plural /^(ox)$/i, '\1en'
8 | # inflect.singular /^(ox)en/i, '\1'
9 | # inflect.irregular 'person', 'people'
10 | # inflect.uncountable %w( fish sheep )
11 | # end
12 |
13 | # These inflection rules are supported but not enabled by default:
14 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
15 | # inflect.acronym 'RESTful'
16 | # end
17 |
--------------------------------------------------------------------------------
/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 |
--------------------------------------------------------------------------------
/config/initializers/new_framework_defaults.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 | #
3 | # This file contains migration options to ease your Rails 5.0 upgrade.
4 | #
5 | # Once upgraded flip defaults one by one to migrate to the new default.
6 | #
7 | # Read the Rails 5.0 release notes for more info on each option.
8 |
9 | # Enable per-form CSRF tokens. Previous versions had false.
10 | Rails.application.config.action_controller.per_form_csrf_tokens = false
11 |
12 | # Enable origin-checking CSRF mitigation. Previous versions had false.
13 | Rails.application.config.action_controller.forgery_protection_origin_check = false
14 |
15 | # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
16 | # Previous versions had false.
17 | ActiveSupport.to_time_preserves_timezone = false
18 |
19 | # Require `belongs_to` associations by default. Previous versions had false.
20 | Rails.application.config.active_record.belongs_to_required_by_default = false
21 |
22 | # Do not halt callback chains when a callback returns false. Previous versions had true.
23 | ActiveSupport.halt_callback_chains_on_return_false = true
24 |
--------------------------------------------------------------------------------
/config/initializers/session_store.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Rails.application.config.session_store :cookie_store, key: '_brisk_forms_session'
4 |
--------------------------------------------------------------------------------
/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # This file contains settings for ActionController::ParamsWrapper which
4 | # is enabled by default.
5 |
6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7 | ActiveSupport.on_load(:action_controller) do
8 | wrap_parameters format: [:json]
9 | end
10 |
11 | # To enable root element in JSON for ActiveRecord objects.
12 | # ActiveSupport.on_load(:active_record) do
13 | # self.include_root_in_json = true
14 | # end
15 |
--------------------------------------------------------------------------------
/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | # Files in the config/locales directory are used for internationalization
2 | # and are automatically loaded by Rails. If you want to use locales other
3 | # than English, add the necessary files in this directory.
4 | #
5 | # To use the locales, use `I18n.t`:
6 | #
7 | # I18n.t 'hello'
8 | #
9 | # In views, this is aliased to just `t`:
10 | #
11 | # <%= t('hello') %>
12 | #
13 | # To use a different locale, set it with `I18n.locale`:
14 | #
15 | # I18n.locale = :es
16 | #
17 | # This would use the information in config/locales/es.yml.
18 | #
19 | # To learn more, please read the Rails Internationalization guide
20 | # available at http://guides.rubyonrails.org/i18n.html.
21 |
22 | en:
23 | hello: "Hello world"
24 |
--------------------------------------------------------------------------------
/config/puma.rb:
--------------------------------------------------------------------------------
1 | # Puma can serve each request in a thread from an internal thread pool.
2 | # The `threads` method setting takes two numbers a minimum and maximum.
3 | # Any libraries that use thread pools should be configured to match
4 | # the maximum value specified for Puma. Default is set to 5 threads for minimum
5 | # and maximum, this matches the default thread size of Active Record.
6 | #
7 | threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
8 | threads threads_count, threads_count
9 |
10 | # Specifies the `port` that Puma will listen on to receive requests, default is 3000.
11 | #
12 | port ENV.fetch("PORT") { 3000 }
13 |
14 | # Specifies the `environment` that Puma will run in.
15 | #
16 | environment ENV.fetch("RAILS_ENV") { "development" }
17 |
18 | # Specifies the number of `workers` to boot in clustered mode.
19 | # Workers are forked webserver processes. If using threads and workers together
20 | # the concurrency of the application would be max `threads` * `workers`.
21 | # Workers do not work on JRuby or Windows (both of which do not support
22 | # processes).
23 | #
24 | # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
25 |
26 | # Use the `preload_app!` method when specifying a `workers` number.
27 | # This directive tells Puma to first boot the application and load code
28 | # before forking the application. This takes advantage of Copy On Write
29 | # process behavior so workers use less memory. If you use this option
30 | # you need to make sure to reconnect any threads in the `on_worker_boot`
31 | # block.
32 | #
33 | # preload_app!
34 |
35 | # The code in the `on_worker_boot` will be called if you are using
36 | # clustered mode by specifying a number of `workers`. After each worker
37 | # process is booted this block will be run, if you are using `preload_app!`
38 | # option you will want to use this block to reconnect to any threads
39 | # or connections that may have been created at application boot, Ruby
40 | # cannot share connections between processes.
41 | #
42 | # on_worker_boot do
43 | # ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
44 | # end
45 |
46 | # Allow puma to be restarted by `rails restart` command.
47 | plugin :tmp_restart
48 |
--------------------------------------------------------------------------------
/config/routes.rb:
--------------------------------------------------------------------------------
1 | Rails.application.routes.draw do
2 |
3 | get '/404' => 'errors#not_found'
4 | get '/403' => 'errors#forbidden'
5 | get '/500' => 'errors#error'
6 |
7 | get 'new' => 'form#new' #new form action form
8 | post 'new' => 'form#create' #create new form action
9 | get 'show/:id' => 'form#show' #form admin section
10 | get 'delete/:id' => 'form#delete' #form admin section
11 | get 'confirm/:id' => 'form#confirm'
12 | post 'go/:id' => 'form#submit' #external form submission
13 |
14 | get 'contact' => 'static_pages#contact'
15 | get 'guide' => 'static_pages#guide'
16 | get 'legal/terms' => 'static_pages#tos'
17 | get 'legal/privacy' => 'static_pages#privacy'
18 |
19 | root 'static_pages#home'
20 |
21 | end
22 |
--------------------------------------------------------------------------------
/config/secrets.yml:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Your secret key is used for verifying the integrity of signed cookies.
4 | # If you change this key, all old signed cookies will become invalid!
5 |
6 | # Make sure the secret is at least 30 characters and all random,
7 | # no regular words or you'll be exposed to dictionary attacks.
8 | # You can use `rake secret` to generate a secure secret key.
9 |
10 | # Make sure the secrets in this file are kept private
11 | # if you're sharing your code publicly.
12 |
13 | development:
14 | secret_key_base: 786c2dc9806ec5294cd1b547f198a4f09d1c752cd01bc19ed5db3fa099e3bbc1410895d7e74320cab6ab0d557d57d121a12ddb1a24f3dd76c7be909946bf9574
15 |
16 | test:
17 | secret_key_base: 08551069c9ad6f5866b9323f08b494192e021b6fa2b80713b6fc3eedaca8bea9120c62c9d13d8415b0873c70103b1145baa30ffb379288ac3d927137fb3ca494
18 |
19 | # Do not keep production secrets in the repository,
20 | # instead read values from the environment.
21 | production:
22 | secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
23 |
--------------------------------------------------------------------------------
/config/spring.rb:
--------------------------------------------------------------------------------
1 | %w(
2 | .ruby-version
3 | .rbenv-vars
4 | tmp/restart.txt
5 | tmp/caching-dev.txt
6 | ).each { |path| Spring.watch(path) }
7 |
--------------------------------------------------------------------------------
/db/migrate/20160217030833_create_forms.rb:
--------------------------------------------------------------------------------
1 | class CreateForms < ActiveRecord::Migration
2 | def change
3 | create_table :forms do |t|
4 | t.string :url, null: false
5 | t.string :email, null: false
6 | t.string :success_url, null: false
7 | t.string :failure_url, null: false
8 | t.timestamps null: false
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20160217032403_add_source_url_to_forms.rb:
--------------------------------------------------------------------------------
1 | class AddSourceUrlToForms < ActiveRecord::Migration
2 | def up
3 | add_column :forms, :source_url, :string
4 | change_column_null :forms, :source_url, false
5 | end
6 | def down
7 | remove_column :forms, :source_url, :string
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/20160217034011_add_admin_url_to_forms.rb:
--------------------------------------------------------------------------------
1 | class AddAdminUrlToForms < ActiveRecord::Migration
2 | def up
3 | add_column :forms, :admin_url, :string
4 | change_column_null :forms, :admin_url, false
5 | end
6 | def down
7 | remove_column :forms, :admin_url, :string
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/20160217231951_add_confirmed_to_form.rb:
--------------------------------------------------------------------------------
1 | class AddConfirmedToForm < ActiveRecord::Migration
2 | def up
3 | add_column :forms, :confirmed, :boolean
4 | change_column_default :forms, :confirmed, false
5 | change_column_null :forms, :confirmed, false
6 | end
7 | def down
8 | remove_column :forms, :confirmed, :boolean
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20160217232515_add_confirm_url_to_form.rb:
--------------------------------------------------------------------------------
1 | class AddConfirmUrlToForm < ActiveRecord::Migration
2 | def up
3 | add_column :forms, :confirm_url, :string
4 | change_column_null :forms, :confirm_url, false
5 | end
6 | def down
7 | remove_column :forms, :confirm_url, :string
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/20160225001048_remove_not_null_from_form_fields.rb:
--------------------------------------------------------------------------------
1 | class RemoveNotNullFromFormFields < ActiveRecord::Migration
2 | def change
3 | change_column_null :forms, :confirm_url, true
4 | change_column_null :forms, :source_url, true
5 | change_column_null :forms, :admin_url, true
6 | change_column_null :forms, :confirmed, true
7 | change_column_null :forms, :url, true
8 | change_column_null :forms, :email, true
9 | change_column_null :forms, :success_url, true
10 | change_column_null :forms, :failure_url, true
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/db/migrate/20160225001347_remove_not_null_from_timestamps.rb:
--------------------------------------------------------------------------------
1 | class RemoveNotNullFromTimestamps < ActiveRecord::Migration
2 | def change
3 | change_column_null :forms, :updated_at, true
4 | change_column_null :forms, :created_at, true
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20160225002208_remove_unused_fields_from_form.rb:
--------------------------------------------------------------------------------
1 | class RemoveUnusedFieldsFromForm < ActiveRecord::Migration
2 | def change
3 | remove_column :forms, :source_url, :string
4 | remove_column :forms, :failure_url, :string
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/schema.rb:
--------------------------------------------------------------------------------
1 | # This file is auto-generated from the current state of the database. Instead
2 | # of editing this file, please use the migrations feature of Active Record to
3 | # incrementally modify your database, and then regenerate this schema definition.
4 | #
5 | # Note that this schema.rb definition is the authoritative source for your
6 | # database schema. If you need to create the application database on another
7 | # system, you should be using db:schema:load, not running all the migrations
8 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9 | # you'll amass, the slower it'll run and the greater likelihood for issues).
10 | #
11 | # It's strongly recommended that you check this file into your version control system.
12 |
13 | ActiveRecord::Schema.define(version: 20160225002208) do
14 |
15 | create_table "forms", force: :cascade do |t|
16 | t.string "url"
17 | t.string "email"
18 | t.string "success_url"
19 | t.datetime "created_at"
20 | t.datetime "updated_at"
21 | t.string "admin_url"
22 | t.boolean "confirmed", default: false
23 | t.string "confirm_url"
24 | end
25 |
26 | end
27 |
--------------------------------------------------------------------------------
/db/seeds.rb:
--------------------------------------------------------------------------------
1 | # This file should contain all the record creation needed to seed the database with its default values.
2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3 | #
4 | # Examples:
5 | #
6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7 | # Mayor.create(name: 'Emanuel', city: cities.first)
8 |
--------------------------------------------------------------------------------
/lib/assets/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/lib/assets/.keep
--------------------------------------------------------------------------------
/lib/tasks/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/lib/tasks/.keep
--------------------------------------------------------------------------------
/log/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/log/.keep
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/public/favicon.ico
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2 | #
3 | # To ban all spiders from the entire site uncomment the next two lines:
4 | # User-agent: *
5 | # Disallow: /
6 |
--------------------------------------------------------------------------------
/test/controllers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/test/controllers/.keep
--------------------------------------------------------------------------------
/test/controllers/errors_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class ErrorsControllerTest < ActionController::TestCase
4 | test "should get not_found" do
5 | get :not_found
6 | assert_response :not_found
7 | end
8 |
9 | test "should get forbidden" do
10 | get :forbidden
11 | assert_response :forbidden
12 | end
13 |
14 | test "should get error" do
15 | get :error
16 | assert_response :internal_server_error
17 | end
18 |
19 | end
20 |
--------------------------------------------------------------------------------
/test/controllers/form_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class FormControllerTest < ActionController::TestCase
4 | test "should get new" do
5 | get :new
6 | assert_response :success
7 | end
8 |
9 | test "should get submit" do
10 | get :submit
11 | assert_response :success
12 | end
13 |
14 | end
15 |
--------------------------------------------------------------------------------
/test/controllers/static_pages_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class StaticPagesControllerTest < ActionController::TestCase
4 | test "should get home" do
5 | get :home
6 | assert_response :success
7 | end
8 |
9 | test "should get guide" do
10 | get :guide
11 | assert_response :success
12 | end
13 |
14 | test "should get contact" do
15 | get :contact
16 | assert_response :success
17 | end
18 |
19 | test "should get tos" do
20 | get :tos
21 | assert_response :success
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/test/fixtures/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/test/fixtures/.keep
--------------------------------------------------------------------------------
/test/fixtures/forms.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/test/helpers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/test/helpers/.keep
--------------------------------------------------------------------------------
/test/integration/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/test/integration/.keep
--------------------------------------------------------------------------------
/test/mailers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/test/mailers/.keep
--------------------------------------------------------------------------------
/test/mailers/form_mailer_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class FormMailerTest < ActionMailer::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/mailers/previews/form_mailer_preview.rb:
--------------------------------------------------------------------------------
1 | # Preview all emails at http://localhost:3000/rails/mailers/form_mailer
2 | class FormMailerPreview < ActionMailer::Preview
3 |
4 | end
5 |
--------------------------------------------------------------------------------
/test/models/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/test/models/.keep
--------------------------------------------------------------------------------
/test/models/form_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class FormTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/test_helper.rb:
--------------------------------------------------------------------------------
1 | ENV['RAILS_ENV'] ||= 'test'
2 | require File.expand_path('../../config/environment', __FILE__)
3 | require 'rails/test_help'
4 |
5 | class ActiveSupport::TestCase
6 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
7 | fixtures :all
8 |
9 | # Add more helper methods to be used by all tests here...
10 | end
11 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/vendor/assets/javascripts/.keep
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stevensona/briskforms/62f7ddfb2aedfe750fa0bef3fedaa01f59aac56c/vendor/assets/stylesheets/.keep
--------------------------------------------------------------------------------