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,6 @@
1
+ body.body-basic {
2
+ .starter-template {
3
+ padding: 40px 15px;
4
+ text-align: center;
5
+ }
6
+ }
@@ -0,0 +1,127 @@
1
+ /* GLOBAL STYLES
2
+ -------------------------------------------------- */
3
+ /* Padding below the footer and lighter body text */
4
+
5
+ body.body-carousel {
6
+ /* Special class on .container surrounding .navbar, used for positioning it into place. */
7
+ .navbar-wrapper {
8
+ position: absolute;
9
+ top: 0;
10
+ right: 0;
11
+ left: 0;
12
+ z-index: 20;
13
+ }
14
+
15
+ /* Flip around the padding for proper display in narrow viewports */
16
+ .navbar-wrapper > .container {
17
+ padding-right: 0;
18
+ padding-left: 0;
19
+ }
20
+ .navbar-wrapper .navbar {
21
+ padding-right: 15px;
22
+ padding-left: 15px;
23
+ }
24
+ .navbar-wrapper .navbar .container {
25
+ width: auto;
26
+ }
27
+
28
+
29
+ /* CUSTOMIZE THE CAROUSEL
30
+ -------------------------------------------------- */
31
+
32
+ /* Carousel base class */
33
+ .carousel {
34
+ height: 500px;
35
+ }
36
+ /* Since positioning the image, we need to help out the caption */
37
+ .carousel-caption {
38
+ z-index: 10;
39
+ }
40
+
41
+ /* Declare heights because of positioning of img element */
42
+ .carousel .item {
43
+ height: 500px;
44
+ background-color: #777;
45
+ }
46
+ .carousel-inner > .item > img {
47
+ position: absolute;
48
+ top: 0;
49
+ left: 0;
50
+ min-width: 100%;
51
+ height: 500px;
52
+ }
53
+
54
+
55
+ /* MARKETING CONTENT
56
+ -------------------------------------------------- */
57
+
58
+ /* Center align the text within the three columns below the carousel */
59
+ .marketing .col-lg-4 {
60
+ margin-bottom: 20px;
61
+ text-align: center;
62
+ }
63
+ .marketing h2 {
64
+ font-weight: normal;
65
+ }
66
+ .marketing .col-lg-4 p {
67
+ margin-right: 10px;
68
+ margin-left: 10px;
69
+ }
70
+
71
+
72
+ /* Featurettes
73
+ ------------------------- */
74
+
75
+ .featurette-divider {
76
+ margin: 80px 0; /* Space out the Bootstrap <hr> more */
77
+ }
78
+
79
+ /* Thin out the marketing headings */
80
+ .featurette-heading {
81
+ font-weight: 300;
82
+ line-height: 1;
83
+ letter-spacing: -1px;
84
+ }
85
+
86
+
87
+ /* RESPONSIVE CSS
88
+ -------------------------------------------------- */
89
+
90
+ @media (min-width: 768px) {
91
+ /* Navbar positioning foo */
92
+ .navbar-wrapper {
93
+ margin-top: 20px;
94
+ }
95
+ .navbar-wrapper .container {
96
+ padding-right: 15px;
97
+ padding-left: 15px;
98
+ }
99
+ .navbar-wrapper .navbar {
100
+ padding-right: 0;
101
+ padding-left: 0;
102
+ }
103
+
104
+ /* The navbar becomes detached from the top, so we round the corners */
105
+ .navbar-wrapper .navbar {
106
+ border-radius: 4px;
107
+ }
108
+
109
+ /* Bump up size of carousel content */
110
+ .carousel-caption p {
111
+ margin-bottom: 20px;
112
+ font-size: 21px;
113
+ line-height: 1.4;
114
+ }
115
+
116
+ .featurette-heading {
117
+ font-size: 50px;
118
+ }
119
+ }
120
+
121
+ @media (min-width: 992px) {
122
+ .featurette-heading {
123
+ margin-top: 120px;
124
+ }
125
+ }
126
+
127
+ }
@@ -0,0 +1,129 @@
1
+ html {
2
+ height: 100%;
3
+ }
4
+
5
+ body.body-cover {
6
+ height: 100%;
7
+ text-align: center;
8
+
9
+ /* Extra markup and styles for table-esque vertical and horizontal centering */
10
+ .site-wrapper {
11
+ display: table;
12
+ width: 100%;
13
+ height: 100%; /* For at least Firefox */
14
+ min-height: 100%;
15
+ }
16
+ .site-wrapper-inner {
17
+ display: table-cell;
18
+ vertical-align: top;
19
+ }
20
+ .cover-container {
21
+ margin-right: auto;
22
+ margin-left: auto;
23
+ }
24
+
25
+ /* Padding for spacing */
26
+ .inner {
27
+ padding: 2rem;
28
+ }
29
+
30
+
31
+ /*
32
+ * Header
33
+ */
34
+
35
+ .masthead {
36
+ margin-bottom: 2rem;
37
+ }
38
+
39
+ .masthead-brand {
40
+ margin-bottom: 0;
41
+ }
42
+
43
+ .nav-masthead .nav-link {
44
+ padding: .25rem 0;
45
+ font-weight: bold;
46
+ background-color: transparent;
47
+ border-bottom: .25rem solid transparent;
48
+ }
49
+
50
+ .nav-masthead .nav-link:hover,
51
+ .nav-masthead .nav-link:focus {
52
+ border-bottom-color: rgba(155,155,155,.25);
53
+ }
54
+
55
+ .nav-masthead .nav-link + .nav-link {
56
+ margin-left: 1rem;
57
+ }
58
+
59
+ .nav-masthead .active {
60
+ // color: #fff;
61
+ // border-bottom-color: #fff;
62
+ }
63
+
64
+ @media (min-width: 48em) {
65
+ .masthead-brand {
66
+ float: left;
67
+ }
68
+ .nav-masthead {
69
+ float: right;
70
+ }
71
+ }
72
+
73
+
74
+ /*
75
+ * Cover
76
+ */
77
+
78
+ .cover {
79
+ padding: 0 1.5rem;
80
+ }
81
+ .cover .btn-lg {
82
+ padding: .75rem 1.25rem;
83
+ font-weight: bold;
84
+ }
85
+
86
+
87
+ /*
88
+ * Footer
89
+ */
90
+
91
+ .mastfoot {
92
+ // color: rgba(255,255,255,.5);
93
+ }
94
+
95
+
96
+ /*
97
+ * Affix and center
98
+ */
99
+
100
+ @media (min-width: 40em) {
101
+ /* Pull out the header and footer */
102
+ .masthead {
103
+ position: fixed;
104
+ top: 0;
105
+ }
106
+ .mastfoot {
107
+ position: fixed;
108
+ bottom: 0;
109
+ }
110
+ /* Start the vertical centering */
111
+ .site-wrapper-inner {
112
+ vertical-align: middle;
113
+ }
114
+ /* Handle the widths */
115
+ .masthead,
116
+ .mastfoot,
117
+ .cover-container {
118
+ width: 100%; /* Must be percentage or pixels for horizontal alignment */
119
+ }
120
+ }
121
+
122
+ @media (min-width: 62em) {
123
+ .masthead,
124
+ .mastfoot,
125
+ .cover-container {
126
+ width: 42rem;
127
+ }
128
+ }
129
+ }
@@ -0,0 +1,55 @@
1
+ @import 'bootstrap/scss/bootstrap';
2
+
3
+ @each $breakpoint in map-keys($grid-breakpoints) {
4
+ @include media-breakpoint-up($breakpoint) {
5
+ .block-#{$breakpoint}-up { display: block; width: 100% }
6
+ }
7
+
8
+ @include media-breakpoint-down($breakpoint) {
9
+ .block-#{$breakpoint}-down { display: block; width: 100% }
10
+ }
11
+ }
12
+
13
+ @for $i from 0 through 100 {
14
+ .mt#{$i} { margin-top: #{$i}px !important; }
15
+ .mb#{$i} { margin-bottom: #{$i}px !important; }
16
+ .ml#{$i} { margin-left: #{$i}px !important; }
17
+ .mr#{$i} { margin-right: #{$i}px !important; }
18
+ .m#{$i} { margin: #{$i}px !important; }
19
+
20
+ .pt#{$i} { padding-top: #{$i}px !important; }
21
+ .pb#{$i} { padding-bottom: #{$i}px !important; }
22
+ .pl#{$i} { padding-left: #{$i}px !important; }
23
+ .pr#{$i} { padding-right: #{$i}px !important; }
24
+ .p#{$i} { padding: #{$i}px !important; }
25
+
26
+ @each $breakpoint in map-keys($grid-breakpoints) {
27
+ @include media-breakpoint-up($breakpoint) {
28
+ .mt#{$i}-#{$breakpoint}-up { margin-top: #{$i}px !important; }
29
+ .mb#{$i}-#{$breakpoint}-up { margin-bottom: #{$i}px !important; }
30
+ .ml#{$i}-#{$breakpoint}-up { margin-left: #{$i}px !important; }
31
+ .mr#{$i}-#{$breakpoint}-up { margin-right: #{$i}px !important; }
32
+ .m#{$i}-#{$breakpoint}-up { margin: #{$i}px !important; }
33
+
34
+ .pt#{$i}-#{$breakpoint}-up { padding-top: #{$i}px !important; }
35
+ .pb#{$i}-#{$breakpoint}-up { padding-bottom: #{$i}px !important; }
36
+ .pl#{$i}-#{$breakpoint}-up { padding-left: #{$i}px !important; }
37
+ .pr#{$i}-#{$breakpoint}-up { padding-right: #{$i}px !important; }
38
+ .p#{$i}-#{$breakpoint}-up { padding: #{$i}px !important; }
39
+ }
40
+
41
+ @include media-breakpoint-down($breakpoint) {
42
+ .mt#{$i}-#{$breakpoint}-down { margin-top: #{$i}px !important; }
43
+ .mb#{$i}-#{$breakpoint}-down { margin-bottom: #{$i}px !important; }
44
+ .ml#{$i}-#{$breakpoint}-down { margin-left: #{$i}px !important; }
45
+ .mr#{$i}-#{$breakpoint}-down { margin-right: #{$i}px !important; }
46
+ .m#{$i}-#{$breakpoint}-down { margin: #{$i}px !important; }
47
+
48
+ .pt#{$i}-#{$breakpoint}-down { padding-top: #{$i}px !important; }
49
+ .pb#{$i}-#{$breakpoint}-down { padding-bottom: #{$i}px !important; }
50
+ .pl#{$i}-#{$breakpoint}-down { padding-left: #{$i}px !important; }
51
+ .pr#{$i}-#{$breakpoint}-down { padding-right: #{$i}px !important; }
52
+ .p#{$i}-#{$breakpoint}-down { padding: #{$i}px !important; }
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,16 @@
1
+ body {
2
+ background: #F3F3F3;
3
+ font-family: 'Open Sans', sans-serif;
4
+ }
5
+
6
+ h1,h2,h3,h4,h5,h6 {
7
+ font-weight: 700;
8
+ }
9
+
10
+ .panel {
11
+ box-shadow: 0 0 5px #CCC;
12
+ }
13
+
14
+ .form-group {
15
+ margin-bottom: 5px;
16
+ }
@@ -0,0 +1,8 @@
1
+ @import '~bootstrap/scss/bootstrap';
2
+
3
+ @import 'layout/basic';
4
+ @import 'layout/cover';
5
+
6
+ @import 'lib/spacing';
7
+
8
+ @import 'skin/style';
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
data/project/bin/rails ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ begin
3
+ load File.expand_path('../spring', __FILE__)
4
+ rescue LoadError => e
5
+ raise unless e.message.include?('spring')
6
+ end
7
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
8
+ require_relative '../config/boot'
9
+ require 'rails/commands'
data/project/bin/rake ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ begin
3
+ load File.expand_path('../spring', __FILE__)
4
+ rescue LoadError => e
5
+ raise unless e.message.include?('spring')
6
+ end
7
+ require_relative '../config/boot'
8
+ require 'rake'
9
+ Rake.application.run
data/project/bin/setup ADDED
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+
4
+ # path to your application root.
5
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
+
7
+ Dir.chdir APP_ROOT do
8
+ # This script is a starting point to setup your application.
9
+ # Add necessary setup steps to this file:
10
+
11
+ puts "== Installing dependencies =="
12
+ system "gem install bundler --conservative"
13
+ system "bundle check || bundle install"
14
+
15
+ # puts "\n== Copying sample files =="
16
+ # unless File.exist?("config/database.yml")
17
+ # system "cp config/database.yml.sample config/database.yml"
18
+ # end
19
+
20
+ puts "\n== Preparing database =="
21
+ system "bin/rake db:setup"
22
+
23
+ puts "\n== Removing old logs and tempfiles =="
24
+ system "rm -f log/*"
25
+ system "rm -rf tmp/cache"
26
+
27
+ puts "\n== Installing Node Modules =="
28
+ system "npm install"
29
+
30
+ puts "\n== Creating .env =="
31
+ system "touch .env"
32
+ end
@@ -0,0 +1,15 @@
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.join(Gem.path_separator) }
12
+ gem 'spring', match[1]
13
+ require 'spring/binstub'
14
+ end
15
+ end
@@ -0,0 +1,32 @@
1
+ require File.expand_path('../boot', __FILE__)
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 Project
10
+ class Application < Rails::Application
11
+ config.autoload_paths += %W(#{Rails.root}/lib)
12
+ config.active_record.raise_in_transactional_callbacks = true
13
+ config.generators do |g|
14
+ g.helper false
15
+ g.decorator false
16
+ g.controller_specs false
17
+ g.model_specs false
18
+ g.view_specs false
19
+ g.specs false
20
+ g.javascripts false
21
+ g.stylesheets false
22
+ g.test_framework false
23
+ end
24
+
25
+ config.assets.paths << Rails.root.join('node_modules')
26
+
27
+ _host = ENV['HOST_DOMAIN'] || "localhost"
28
+ _port = ENV['HOST_PORT'] || "3000"
29
+ routes.default_url_options = { host: _host, port: _port }
30
+ config.action_mailer.default_url_options = { host: _host, port: _port }
31
+ end
32
+ end
@@ -0,0 +1,3 @@
1
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
2
+
3
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
@@ -0,0 +1,19 @@
1
+ default: &default
2
+ adapter: postgresql
3
+ pool: 5
4
+ timeout: 5000
5
+
6
+ development:
7
+ <<: *default
8
+ database: __PROJECT_NAME_SLUG___development
9
+
10
+ # Warning: The database defined as "test" will be erased and
11
+ # re-generated from your development database when you run "rake".
12
+ # Do not set this db to the same as development or production.
13
+ test:
14
+ <<: *default
15
+ database: __PROJECT_NAME_SLUG___test
16
+
17
+ production:
18
+ <<: *default
19
+ database: __PROJECT_NAME_SLUG___development
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -0,0 +1,67 @@
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 and disable caching.
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send.
17
+ config.action_mailer.raise_delivery_errors = false
18
+ if ENV['DELIVER_MAIL']=='true'
19
+ puts
20
+ puts
21
+ puts "WARNING WARNING WARNING WARNING WARNING WARNING"
22
+ puts "Mailing turned on in development"
23
+ puts
24
+ puts
25
+ config.action_mailer.delivery_method = :postmark
26
+ config.action_mailer.postmark_settings = { :api_token => ENV['POSTMARK_API_TOKEN'] }
27
+ else
28
+ config.action_mailer.delivery_method = :letter_opener
29
+ end
30
+
31
+ # Print deprecation notices to the Rails logger.
32
+ config.active_support.deprecation = :log
33
+
34
+ # Raise an error on page load if there are pending migrations.
35
+ config.active_record.migration_error = :page_load
36
+
37
+ # Disable serving static files from the `/public` folder by default since
38
+ # Apache or NGINX already handles this.
39
+ config.serve_static_files = true
40
+
41
+ # Compress JavaScripts and CSS.
42
+ # config.assets.js_compressor = :uglifier
43
+ # config.assets.css_compressor = :sass
44
+
45
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
46
+ config.assets.compile = true
47
+
48
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
49
+ # yet still be able to expire them through the digest params.
50
+ config.assets.digest = true
51
+
52
+ # Debug mode disables concatenation and preprocessing of assets.
53
+ # This option may cause significant delays in view rendering with a large
54
+ # number of complex assets.
55
+ config.assets.debug = true
56
+
57
+ # Rails assets are so noisy. Quiet them down.
58
+ config.assets.quiet = true
59
+
60
+ # Adds additional error checking when serving assets at runtime.
61
+ # Checks for improperly declared sprockets dependencies.
62
+ # Raises helpful error messages.
63
+ config.assets.raise_runtime_errors = true
64
+
65
+ # Raises error for missing translations
66
+ # config.action_view.raise_on_missing_translations = true
67
+ end
@@ -0,0 +1,93 @@
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
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like
20
+ # NGINX, varnish or squid.
21
+ # config.action_dispatch.rack_cache = true
22
+
23
+ # Disable serving static files from the `/public` folder by default since
24
+ # Apache or NGINX already handles this.
25
+ config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
26
+
27
+ # Compress JavaScripts and CSS.
28
+ config.assets.js_compressor = :uglifier
29
+ # config.assets.css_compressor = :sass
30
+
31
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
32
+ config.assets.compile = false
33
+
34
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35
+ # yet still be able to expire them through the digest params.
36
+ config.assets.digest = true
37
+
38
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
39
+
40
+ # Specifies the header that your server uses for sending files.
41
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
43
+
44
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
45
+ # set FORCE_SSL=true in your .env
46
+
47
+ # Use the lowest log level to ensure availability of diagnostic information
48
+ # when problems arise.
49
+ config.log_level = :debug
50
+
51
+ # Prepend all log lines with the following tags.
52
+ # config.log_tags = [ :subdomain, :uuid ]
53
+
54
+ # Use a different logger for distributed setups.
55
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
56
+
57
+ # Use a different cache store in production.
58
+ # config.cache_store = :mem_cache_store
59
+
60
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61
+ # config.action_controller.asset_host = 'http://assets.example.com'
62
+
63
+ # Ignore bad email addresses and do not raise email delivery errors.
64
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
65
+ # config.action_mailer.raise_delivery_errors = false
66
+ if ENV['POSTMARK_API_TOKEN']
67
+ config.action_mailer.delivery_method = :postmark
68
+ config.action_mailer.postmark_settings = { :api_token => ENV['POSTMARK_API_TOKEN'] }
69
+ elsif ENV['MAILTRAP_USERNAME']
70
+ config.action_mailer.delivery_method = :smtp
71
+ config.action_mailer.smtp_settings = {
72
+ :user_name => ENV['MAILTRAP_USERNAME'],
73
+ :password => ENV['MAILTRAP_PASSWORD'],
74
+ :address => 'mailtrap.io',
75
+ :domain => 'mailtrap.io',
76
+ :port => '2525',
77
+ :authentication => :cram_md5
78
+ }
79
+ end
80
+
81
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
82
+ # the I18n.default_locale when a translation cannot be found).
83
+ config.i18n.fallbacks = true
84
+
85
+ # Send deprecation notices to registered listeners.
86
+ config.active_support.deprecation = :notify
87
+
88
+ # Use default logging formatter so that PID and timestamp are not suppressed.
89
+ config.log_formatter = ::Logger::Formatter.new
90
+
91
+ # Do not dump schema after migrations.
92
+ config.active_record.dump_schema_after_migration = false
93
+ end
@@ -0,0 +1,42 @@
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 static file server for tests with Cache-Control for performance.
16
+ config.serve_static_files = true
17
+ config.static_cache_control = 'public, max-age=3600'
18
+
19
+ # Show full error reports and disable caching.
20
+ config.consider_all_requests_local = true
21
+ config.action_controller.perform_caching = false
22
+
23
+ # Raise exceptions instead of rendering exception templates.
24
+ config.action_dispatch.show_exceptions = false
25
+
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
28
+
29
+ # Tell Action Mailer not to deliver emails to the real world.
30
+ # The :test delivery method accumulates sent emails in the
31
+ # ActionMailer::Base.deliveries array.
32
+ config.action_mailer.delivery_method = :test
33
+
34
+ # Randomize the order test cases are executed.
35
+ config.active_support.test_order = :random
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