mvpkit 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +30 -0
  3. data/Gemfile.lock +329 -0
  4. data/LICENSE.txt +20 -0
  5. data/MIT-LICENSE +20 -0
  6. data/README.md +134 -0
  7. data/Rakefile +52 -0
  8. data/VERSION +1 -0
  9. data/app/assets/javascripts/mvp/application.js +1 -0
  10. data/app/assets/stylesheets/mvp/application.scss +0 -0
  11. data/app/controllers/concerns/mvp/analytics_concern.rb +78 -0
  12. data/app/controllers/concerns/mvp/seo_concern.rb +25 -0
  13. data/app/controllers/concerns/mvp/session_concern.rb +44 -0
  14. data/app/controllers/mvp/analytics_controller.rb +12 -0
  15. data/app/controllers/mvp/seo_controller.rb +11 -0
  16. data/app/controllers/mvp/styleguide_controller.rb +23 -0
  17. data/app/helpers/minimum_viable_product/body_helper.rb +14 -0
  18. data/app/helpers/minimum_viable_product/bootstrap_helper.rb +38 -0
  19. data/app/helpers/minimum_viable_product/styleguide_helper.rb +4 -0
  20. data/app/models/concerns/mvp/slugification.rb +24 -0
  21. data/app/views/layouts/minimum_viable_product/_instrumentation.html.erb +100 -0
  22. data/app/views/layouts/minimum_viable_product/_meta.html.erb +37 -0
  23. data/app/views/layouts/minimum_viable_product/application.html.erb +19 -0
  24. data/app/views/minimum_viable_product/styleguide/_example.html.erb +6 -0
  25. data/app/views/minimum_viable_product/styleguide/bootstrap/_buttons.html.erb +191 -0
  26. data/app/views/minimum_viable_product/styleguide/bootstrap/_forms.html.erb +192 -0
  27. data/app/views/minimum_viable_product/styleguide/bootstrap/_header.html.erb +48 -0
  28. data/app/views/minimum_viable_product/styleguide/bootstrap/_panels.html.erb +16 -0
  29. data/app/views/minimum_viable_product/styleguide/bootstrap/_tables.html.erb +34 -0
  30. data/app/views/minimum_viable_product/styleguide/bootstrap/_typography.html.erb +51 -0
  31. data/app/views/minimum_viable_product/styleguide/bootstrap.html.erb +43 -0
  32. data/app/views/minimum_viable_product/styleguide/elements/_grouping.html.erb +1 -0
  33. data/app/views/minimum_viable_product/styleguide/elements/partials/_row_groups_of.html.erb +7 -0
  34. data/app/views/minimum_viable_product/styleguide/index.html.erb +17 -0
  35. data/app/views/minimum_viable_product/styleguide/layouts/basic.html.erb +4 -0
  36. data/app/views/minimum_viable_product/styleguide/layouts/carousel.html.erb +120 -0
  37. data/app/views/minimum_viable_product/styleguide/layouts/cover.html.erb +34 -0
  38. data/assets/js/application.js +31 -0
  39. data/assets/js/init/controllers.js +26 -0
  40. data/assets/js/init/forms.js +12 -0
  41. data/bin/mvp +78 -0
  42. data/bin/rails +12 -0
  43. data/config/initializers/assets.rb +2 -0
  44. data/config/initializers/canonical_host.rb +3 -0
  45. data/config/initializers/cloudinary.rb +7 -0
  46. data/config/initializers/geocoder.rb +9 -0
  47. data/config/initializers/iteration.rb +33 -0
  48. data/config/initializers/project.rb +1 -0
  49. data/config/initializers/rollbar.rb +59 -0
  50. data/config/initializers/routing.rb +7 -0
  51. data/config/initializers/spoof_ip.rb +33 -0
  52. data/config/initializers/ssl.rb +14 -0
  53. data/config/routes.rb +6 -0
  54. data/lib/mvp/engine.rb +22 -0
  55. data/lib/mvp/ext/nil.rb +5 -0
  56. data/lib/mvp/ext/string.rb +7 -0
  57. data/lib/mvpkit.rb +6 -0
  58. data/lib/tasks/sitemap.rake +42 -0
  59. data/mvpkit.gemspec +245 -0
  60. data/package.json +43 -0
  61. data/project/.gitignore +45 -0
  62. data/project/Gemfile +33 -0
  63. data/project/Gemfile.lock +437 -0
  64. data/project/Procfile +2 -0
  65. data/project/README.md +117 -0
  66. data/project/Rakefile +14 -0
  67. data/project/app/controllers/application_controller.rb +12 -0
  68. data/project/app/controllers/conversions_controller.rb +24 -0
  69. data/project/app/controllers/examples_controller.rb +2 -0
  70. data/project/app/controllers/home_controller.rb +7 -0
  71. data/project/app/decorators/.keep +0 -0
  72. data/project/app/helpers/application_helper.rb +24 -0
  73. data/project/app/mailers/.keep +0 -0
  74. data/project/app/models/conversion.rb +4 -0
  75. data/project/app/views/examples/index.html.erb +1 -0
  76. data/project/app/views/examples/mustache/template.mustache +1 -0
  77. data/project/app/views/examples/mustache.html.erb +18 -0
  78. data/project/app/views/home/conversion.html.erb +12 -0
  79. data/project/app/views/home/index.html.erb +28 -0
  80. data/project/app/views/layouts/_header.html.erb +16 -0
  81. data/project/app/views/layouts/_includes.html.erb +7 -0
  82. data/project/app/views/layouts/application.html.erb +17 -0
  83. data/project/app/views/layouts/modal.html.erb +14 -0
  84. data/project/assets/images/.keep +0 -0
  85. data/project/assets/images/favicon.ico +0 -0
  86. data/project/assets/javascripts/controllers/home.coffee +15 -0
  87. data/project/assets/javascripts/pack.js +9 -0
  88. data/project/assets/stylesheets/config/variables.scss +876 -0
  89. data/project/assets/stylesheets/layout/basic.scss +6 -0
  90. data/project/assets/stylesheets/layout/carousel.scss +127 -0
  91. data/project/assets/stylesheets/layout/cover.scss +129 -0
  92. data/project/assets/stylesheets/lib/spacing.scss +55 -0
  93. data/project/assets/stylesheets/skin/style.scss +16 -0
  94. data/project/assets/stylesheets/style.scss +8 -0
  95. data/project/bin/bundle +3 -0
  96. data/project/bin/rails +9 -0
  97. data/project/bin/rake +9 -0
  98. data/project/bin/setup +32 -0
  99. data/project/bin/spring +15 -0
  100. data/project/config/application.rb +32 -0
  101. data/project/config/boot.rb +3 -0
  102. data/project/config/database.yml +19 -0
  103. data/project/config/environment.rb +5 -0
  104. data/project/config/environments/development.rb +67 -0
  105. data/project/config/environments/production.rb +93 -0
  106. data/project/config/environments/test.rb +42 -0
  107. data/project/config/initializers/assets.rb +11 -0
  108. data/project/config/initializers/backtrace_silencers.rb +7 -0
  109. data/project/config/initializers/cookies_serializer.rb +3 -0
  110. data/project/config/initializers/filter_parameter_logging.rb +4 -0
  111. data/project/config/initializers/inflections.rb +16 -0
  112. data/project/config/initializers/mime_types.rb +4 -0
  113. data/project/config/initializers/mustache.rb +7 -0
  114. data/project/config/initializers/rails_admin.rb +43 -0
  115. data/project/config/initializers/session_store.rb +3 -0
  116. data/project/config/initializers/simple_form.rb +177 -0
  117. data/project/config/initializers/wrap_parameters.rb +14 -0
  118. data/project/config/locales/en.yml +23 -0
  119. data/project/config/locales/simple_form.en.yml +31 -0
  120. data/project/config/routes.rb +13 -0
  121. data/project/config/secrets.yml +8 -0
  122. data/project/config/sitemap.rb +28 -0
  123. data/project/config.ru +4 -0
  124. data/project/db/migrate/20160728235100_create_conversions.rb +9 -0
  125. data/project/db/schema.rb +25 -0
  126. data/project/db/seeds.rb +7 -0
  127. data/project/lib/assets/.keep +0 -0
  128. data/project/lib/tasks/heroku.rake +70 -0
  129. data/project/log/.keep +0 -0
  130. data/project/log/development.log +48216 -0
  131. data/project/log/production.log +0 -0
  132. data/project/package.json +44 -0
  133. data/project/public/404.html +67 -0
  134. data/project/public/422.html +67 -0
  135. data/project/public/500.html +66 -0
  136. data/project/public/assets/javascripts/448c34a56d699c29117adc64c43affeb.woff2 +0 -0
  137. data/project/public/assets/javascripts/89889688147bd7575d6327160d64e760.svg +288 -0
  138. data/project/public/assets/javascripts/e18bbf611f2a2e43afc071aa2f4e1512.ttf +0 -0
  139. data/project/public/assets/javascripts/f4769f9bdb7466be65088239c12046d1.eot +0 -0
  140. data/project/public/assets/javascripts/fa2772327f55d8198301fdb8bcfc8158.woff +0 -0
  141. data/project/public/assets/javascripts/pack.js +31367 -0
  142. data/project/public/assets/javascripts/pack.js.map +1 -0
  143. data/project/public/assets/pack.js +17220 -0
  144. data/project/public/assets/style.css +7477 -0
  145. data/project/vendor/assets/javascripts/.keep +0 -0
  146. data/project/vendor/assets/stylesheets/.keep +0 -0
  147. data/project/webpack.config.js +67 -0
  148. data/test/helper.rb +34 -0
  149. data/test/test_minimum_viable_product.rb +7 -0
  150. metadata +473 -0
@@ -0,0 +1,24 @@
1
+ module ApplicationHelper
2
+ def render_partial(partial, locals={}, &block)
3
+ render(
4
+ partial: partial,
5
+ locals: locals.merge(block: block)
6
+ )
7
+ end
8
+
9
+ def render_mustache(template, object)
10
+ mustache = Mustache.new
11
+ mustache.template_extension = 'mustache'
12
+ # mustache.template_path = Rails.root.join("assets/templates")
13
+ # mustache.template_file = Rails.root.join("assets/templates/#{template}.mustache")
14
+ mustache.template_path = Rails.root.join("app/views")
15
+ mustache.template_file = Rails.root.join("app/views/#{template}.mustache")
16
+ mustache.instance_eval %%
17
+ def logged_in
18
+ #{!!current_user}
19
+ end
20
+ %
21
+ # mustache.template_extension = 'mustache'
22
+ mustache.render(object).html_safe
23
+ end
24
+ end
File without changes
@@ -0,0 +1,4 @@
1
+ class Conversion < ActiveRecord::Base
2
+ # validates :name, presence: true
3
+ validates :email, presence: true, uniqueness: true, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i }
4
+ end
@@ -0,0 +1 @@
1
+ <%= link_to "Mustache Rendering", mustache_example_path %>
@@ -0,0 +1 @@
1
+ This is <code>template.mustache</code>
@@ -0,0 +1,18 @@
1
+ <div class="row">
2
+ <div class="col-md-9">
3
+ <h1>Mustache Rendering</h1>
4
+ <p>
5
+ You can render mustache files by using <code>&lt;<%= "%= render_mustache 'examples/mustache/template', { some: 'value' } %" %>&gt;</code>.
6
+ </p>
7
+ <p>
8
+ Place your files into <code>app/views</code> and reference it relatively. You don't need the <code>.mustache</code> file suffix.
9
+ </p>
10
+ <p>
11
+ Here we render <code>examples/mustache/template</code>:
12
+ </p>
13
+
14
+ <div class="well">
15
+ <%= render_mustache 'examples/mustache/template', { some: 'value' } %>
16
+ </div>
17
+ </div>
18
+ </div>
@@ -0,0 +1,12 @@
1
+ <div class="row mt100">
2
+ <div class="col-sm-6 col-sm-push-3">
3
+ <div class="panel">
4
+ <div class="panel-heading">
5
+ <h4 class="panel-title">Conversion</h4>
6
+ </div>
7
+ <div class="panel-body">
8
+ Success Page
9
+ </div>
10
+ </div>
11
+ </div>
12
+ </div>
@@ -0,0 +1,28 @@
1
+ <div class="row mt100">
2
+ <div class="col-sm-8 offset-sm-2 col-md-6 offset-md-3">
3
+ <p class='text-center mb50'>
4
+ By default, this page is setup to accept an email submission and store in the database. Depending on your configuration, this will fire an conversion event and even submit to Slack.
5
+ </p>
6
+ <div class="card">
7
+ <div class="card-header">
8
+ <h4>Sign Up</h4>
9
+ </div>
10
+ <div class="card-block">
11
+ <%= simple_form_for Conversion.new, url: conversion_path, remote:true, validate: true, html: { class: 'disable-on-submit' } do |f| %>
12
+ <div class="row">
13
+ <div class="col-sm-7 pr10-sm">
14
+ <%= f.input :email, placeholder: 'joe@example.com', label: false, input_html: { class: "mb0" } %>
15
+ </div>
16
+ <div class="col-sm-5 pl0-sm">
17
+ <%= f.submit "Register for Free", class: 'btn btn-primary btn-block' %>
18
+ </div>
19
+ </div>
20
+
21
+ <p class="text-center mt10 mb0 text-grey">
22
+ <small>We hate spam, don't worry, we'll never try to sell you anything or your info to anyone.</small>
23
+ </p>
24
+ <% end %>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </div>
@@ -0,0 +1,16 @@
1
+ <nav class="navbar navbar-light bg-faded mt50">
2
+ <a class="navbar-brand" href="/">__PROJECT_NAME__</a>
3
+ <ul class="nav navbar-nav float-lg-right">
4
+ <li class="nav-item active">
5
+ <%= link_to 'Examples', examples_path, class: 'nav-link' %>
6
+ </li>
7
+ <li class="nav-item dropdown">
8
+ <a class="nav-link dropdown-toggle" href="http://example.com" id="supportedContentDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a>
9
+ <div class="dropdown-menu" aria-labelledby="supportedContentDropdown">
10
+ <a class="dropdown-item" href="#">Action</a>
11
+ <a class="dropdown-item" href="#">Another action</a>
12
+ <a class="dropdown-item" href="#">Something else here</a>
13
+ </div>
14
+ </li>
15
+ </ul>
16
+ </nav>
@@ -0,0 +1,7 @@
1
+ <%- content_for :javascripts do %>
2
+ <script src="/assets/pack.js" type="text/javascript"></script>
3
+ <% end %>
4
+
5
+ <%- content_for :stylesheets do %>
6
+ <link rel="stylesheet" href="/assets/style.css" media="screen" title="">
7
+ <% end %>
@@ -0,0 +1,17 @@
1
+ <% page.classes = "body-basic" %>
2
+ <%= render 'layouts/includes' %>
3
+
4
+ <%- content_for :body do %>
5
+ <% if content_for :header %>
6
+ <%= yield :header %>
7
+ <% else %>
8
+ <div class="container">
9
+ <%= render 'layouts/header' %>
10
+ </div>
11
+ <% end %>
12
+ <div class="container">
13
+ <%= yield %>
14
+ </div>
15
+ <% end %>
16
+
17
+ <%= render template: "layouts/minimum_viable_product/application" %>
@@ -0,0 +1,14 @@
1
+ <% page.classes = "body-cover" %>
2
+ <%= render 'layouts/includes' %>
3
+
4
+ <%- content_for :body do %>
5
+ <div class="site-wrapper">
6
+ <div class="site-wrapper-inner">
7
+ <div class="cover-container">
8
+ <%= yield %>
9
+ </div>
10
+ </div>
11
+ </div>
12
+ <% end %>
13
+
14
+ <%= render template: "layouts/minimum_viable_product/application" %>
File without changes
Binary file
@@ -0,0 +1,15 @@
1
+ class Controller
2
+ index: ()=>
3
+ # Registration page logic
4
+ $('#new_conversion').on('submit', (e)->
5
+ window.track("Conversion Submit", { source: "Registration Form" })
6
+ )
7
+
8
+ $('#new_conversion').on('ajax:success', ()->
9
+ top.location = "/conversion"
10
+ )
11
+
12
+ thanks: ()=>
13
+ # Conversion page logic
14
+
15
+ window.controllers['home'] = new Controller()
@@ -0,0 +1,9 @@
1
+ const is = require('is')
2
+
3
+ global.Tether = require('tether')
4
+ global.$ = global.jQuery = require('jquery')
5
+
6
+ require('minimum_viable_product/assets/js/application')
7
+ require('bootstrap/dist/js/bootstrap')
8
+
9
+ require('./controllers/home.coffee')