minimum_viable_product 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +37 -0
  5. data/app/assets/javascripts/minimum_viable_product/application.js.erb +38 -0
  6. data/app/assets/javascripts/minimum_viable_product/init/controllers.js +23 -0
  7. data/app/assets/stylesheets/minimum_viable_product/application.scss +23 -0
  8. data/app/assets/stylesheets/minimum_viable_product/components/buttons.scss +20 -0
  9. data/app/assets/stylesheets/minimum_viable_product/components/fonts.scss +15 -0
  10. data/app/assets/stylesheets/minimum_viable_product/components/spacing.scss +13 -0
  11. data/app/assets/stylesheets/minimum_viable_product/components/typography.scss +40 -0
  12. data/app/assets/stylesheets/minimum_viable_product/init/_reset.scss +43 -0
  13. data/app/assets/stylesheets/minimum_viable_product/init/layout.scss +42 -0
  14. data/app/assets/stylesheets/minimum_viable_product/layout/basic.scss +6 -0
  15. data/app/assets/stylesheets/minimum_viable_product/layout/carousel.scss +128 -0
  16. data/app/assets/stylesheets/minimum_viable_product/layout/cover.scss +111 -0
  17. data/app/assets/stylesheets/minimum_viable_product/pages/sample.scss +14 -0
  18. data/app/assets/stylesheets/minimum_viable_product/skin/style.scss +8 -0
  19. data/app/controllers/minimum_viable_product/analytics_controller.rb +14 -0
  20. data/app/controllers/minimum_viable_product/concerns/analytics_concern.rb +77 -0
  21. data/app/controllers/minimum_viable_product/concerns/seo_concern.rb +25 -0
  22. data/app/controllers/minimum_viable_product/concerns/session_concern.rb +40 -0
  23. data/app/controllers/minimum_viable_product/controller.rb +11 -0
  24. data/app/controllers/minimum_viable_product/seo_controller.rb +13 -0
  25. data/app/controllers/minimum_viable_product/styleguide_controller.rb +17 -0
  26. data/app/helpers/minimum_viable_product/analytics_helper.rb +4 -0
  27. data/app/helpers/minimum_viable_product/application_helper.rb +15 -0
  28. data/app/helpers/minimum_viable_product/bootstrap_helper.rb +38 -0
  29. data/app/helpers/minimum_viable_product/seo_helper.rb +4 -0
  30. data/app/helpers/minimum_viable_product/styleguide_helper.rb +4 -0
  31. data/app/models/concerns/slugification.rb +16 -0
  32. data/app/views/layouts/minimum_viable_product/_header.html.erb +48 -0
  33. data/app/views/layouts/minimum_viable_product/_instrumentation.html.erb +75 -0
  34. data/app/views/layouts/minimum_viable_product/_meta.html.erb +37 -0
  35. data/app/views/layouts/minimum_viable_product/application.html.erb +24 -0
  36. data/app/views/layouts/minimum_viable_product/basic.html.erb +10 -0
  37. data/app/views/layouts/minimum_viable_product/carousel.html.erb +13 -0
  38. data/app/views/layouts/minimum_viable_product/cover.html.erb +13 -0
  39. data/bin/mvp +68 -0
  40. data/config/initializers/canonical_host.rb +3 -0
  41. data/config/initializers/client_side_validations.rb +20 -0
  42. data/config/initializers/cloudinary.rb +6 -0
  43. data/config/initializers/geocoder.rb +9 -0
  44. data/config/initializers/iteration.rb +33 -0
  45. data/config/initializers/rollbar.rb +59 -0
  46. data/config/initializers/segment.rb +5 -0
  47. data/config/initializers/simple_form.rb +165 -0
  48. data/config/initializers/simple_form_bootstrap.rb +149 -0
  49. data/config/initializers/spoof_ip.rb +33 -0
  50. data/config/initializers/ssl.rb +3 -0
  51. data/config/routes.rb +16 -0
  52. data/lib/minimum_viable_product/engine.rb +20 -0
  53. data/lib/minimum_viable_product/ext/nil.rb +5 -0
  54. data/lib/minimum_viable_product/ext/string.rb +7 -0
  55. data/lib/minimum_viable_product/version.rb +3 -0
  56. data/lib/minimum_viable_product.rb +6 -0
  57. data/lib/tasks/sitemap.rake +42 -0
  58. data/test/dummy/README.rdoc +28 -0
  59. data/test/dummy/Rakefile +6 -0
  60. data/test/dummy/app/assets/javascripts/application.js +13 -0
  61. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  62. data/test/dummy/app/controllers/application_controller.rb +5 -0
  63. data/test/dummy/app/helpers/application_helper.rb +2 -0
  64. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  65. data/test/dummy/bin/bundle +3 -0
  66. data/test/dummy/bin/rails +4 -0
  67. data/test/dummy/bin/rake +4 -0
  68. data/test/dummy/bin/setup +29 -0
  69. data/test/dummy/config/application.rb +26 -0
  70. data/test/dummy/config/boot.rb +5 -0
  71. data/test/dummy/config/database.yml +25 -0
  72. data/test/dummy/config/environment.rb +5 -0
  73. data/test/dummy/config/environments/development.rb +41 -0
  74. data/test/dummy/config/environments/production.rb +79 -0
  75. data/test/dummy/config/environments/test.rb +42 -0
  76. data/test/dummy/config/initializers/assets.rb +11 -0
  77. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  78. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  79. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  80. data/test/dummy/config/initializers/inflections.rb +16 -0
  81. data/test/dummy/config/initializers/mime_types.rb +4 -0
  82. data/test/dummy/config/initializers/session_store.rb +3 -0
  83. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  84. data/test/dummy/config/locales/en.yml +23 -0
  85. data/test/dummy/config/routes.rb +4 -0
  86. data/test/dummy/config/secrets.yml +22 -0
  87. data/test/dummy/config.ru +4 -0
  88. data/test/dummy/public/404.html +67 -0
  89. data/test/dummy/public/422.html +67 -0
  90. data/test/dummy/public/500.html +66 -0
  91. data/test/dummy/public/favicon.ico +0 -0
  92. data/test/integration/navigation_test.rb +8 -0
  93. data/test/minimum_viable_product_test.rb +7 -0
  94. data/test/test_helper.rb +21 -0
  95. metadata +595 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 02a4450a6517649bf14786a202ee567f040d9071
4
+ data.tar.gz: 5124a07411bd2d1691e03ac3918f4c5bb9993eef
5
+ SHA512:
6
+ metadata.gz: 8c4ba875d1a15406ecb7a6432d8f504fe98f5de1a393bc46c2c1fb09395d7e8133f632778b6b4f27bc4d5d1ec3289cf2dbfd83c6d88f64b4852bd9038879f104
7
+ data.tar.gz: af320fda6b4cc38e004343ebf17da8daf615d444c29e23e53c663a3276aa30411b3651c742bbe3ef583c2b59882c4ca8414a743b6e3da2c876c5db1fd524626b
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2016 Ian Hunter
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,3 @@
1
+ = Minimum Viable Product
2
+
3
+ This project rocks and uses MIT-LICENSE.
data/Rakefile ADDED
@@ -0,0 +1,37 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'Minimum Viable Product'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+
21
+ load 'rails/tasks/statistics.rake'
22
+
23
+
24
+
25
+ Bundler::GemHelper.install_tasks
26
+
27
+ require 'rake/testtask'
28
+
29
+ Rake::TestTask.new(:test) do |t|
30
+ t.libs << 'lib'
31
+ t.libs << 'test'
32
+ t.pattern = 'test/**/*_test.rb'
33
+ t.verbose = false
34
+ end
35
+
36
+
37
+ task default: :test
@@ -0,0 +1,38 @@
1
+ //= require jquery
2
+ //= require jquery_ujs
3
+ //= require jquery.cookie
4
+ //= require lodash
5
+ //= require is
6
+ //= require bootstrap
7
+ //= require rails.validations
8
+ //= require rails.validations.simple_form
9
+ //
10
+ //= require_tree ./init
11
+ //
12
+ //= require_self
13
+
14
+ var is = require('is')
15
+ var _ = require('lodash')
16
+
17
+ track = function(event, attributes, fn){
18
+ console.log("Track: " + event + " " + JSON.stringify(attributes))
19
+
20
+ if (is.fn(attributes)) fn = attributes, attributes = null;
21
+ if (is.undefined(attributes)) { attributes = {} }
22
+ if ($.cookie('invisible') == "true") {
23
+ if (!is.undefined(fn)) { fn() }
24
+ return
25
+ }
26
+
27
+ if (typeof(analytics) == 'undefined') {
28
+ return
29
+ }
30
+
31
+ attrs = _.extend({
32
+ iteration: '<%= MVP::Iteration.version %>'
33
+ }, attributes)
34
+
35
+ analytics.track(event, attrs, fn)
36
+ }
37
+
38
+ window.track = track;
@@ -0,0 +1,23 @@
1
+ window.controllers = {}
2
+
3
+ $(function() {
4
+ var $body = $("body");
5
+ var controller = $body.data("controller").replace(/\//g, "_");
6
+ var action = $body.data("action");
7
+
8
+ var activeController = window.controllers[controller];
9
+
10
+ if (activeController !== undefined) {
11
+ if (window.env == "development") {
12
+ console.log("[Controllers] " + controller + "." + action + "()");
13
+ }
14
+
15
+ if ($.isFunction(activeController.init)) {
16
+ activeController.init();
17
+ }
18
+
19
+ if ($.isFunction(activeController[action])) {
20
+ activeController[action]();
21
+ }
22
+ }
23
+ });
@@ -0,0 +1,23 @@
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
+ *= require_tree ./init
14
+ *= require_tree ./layout
15
+ *= require_tree ./components
16
+ *= require_tree ./skin
17
+ *= require_tree ./pages
18
+ *
19
+ *= require_self
20
+ */
21
+
22
+ $modal-backdrop-bg: #FFF;
23
+ $modal-backdrop-opacity: 0.8;
@@ -0,0 +1,20 @@
1
+ $bc-facebook: #3b5998;
2
+
3
+ $bc-twitter: #1da1f2;
4
+ $bc-twitter-2: #14171a;
5
+ $bc-twitter-3: #657786;
6
+ $bc-twitter-4: #aab8c2;
7
+ $bc-twitter-5: #e1e8ed;
8
+ $bc-twitter-6: #f5f8fa;
9
+
10
+ $bc-youtube: #cd201f;
11
+
12
+ .btn-facebook {
13
+ background: $bc-facebook;
14
+ color: #FFF;
15
+
16
+ &:hover {
17
+ background: darken( $bc-facebook, 10% );
18
+ color: #FFF;
19
+ }
20
+ }
@@ -0,0 +1,15 @@
1
+ .font-slabo {
2
+ font-family: 'Slabo 27px', serif;
3
+ }
4
+
5
+ .font-serif {
6
+ font-family: 'Roboto Slab', serif;
7
+ }
8
+
9
+ .font-sans-serif {
10
+
11
+ }
12
+
13
+ .font-cursive {
14
+ font-family: 'Pacifico', cursive;
15
+ }
@@ -0,0 +1,13 @@
1
+ @for $i from 0 through 100 {
2
+ .mt#{$i} { margin-top: #{$i}px !important; }
3
+ .mb#{$i} { margin-bottom: #{$i}px !important; }
4
+ .ml#{$i} { margin-left: #{$i}px !important; }
5
+ .mr#{$i} { margin-right: #{$i}px !important; }
6
+ .m#{$i} { margin: #{$i}px !important; }
7
+
8
+ .pt#{$i} { padding-top: #{$i}px !important; }
9
+ .pb#{$i} { padding-bottom: #{$i}px !important; }
10
+ .pl#{$i} { padding-left: #{$i}px !important; }
11
+ .pr#{$i} { padding-right: #{$i}px !important; }
12
+ .p#{$i} { padding: #{$i}px !important; }
13
+ }
@@ -0,0 +1,40 @@
1
+ .text-white {
2
+ color: #FFF;
3
+ }
4
+
5
+ .text-grey {
6
+ color: #999;
7
+ }
8
+
9
+ .text-light-grey {
10
+ color: #EEE;
11
+ }
12
+
13
+ .text-dark-grey {
14
+ color: #666;
15
+ }
16
+
17
+ .text-green {
18
+ color: #58B957;
19
+ }
20
+
21
+ .text-black {
22
+ color: #000;
23
+ }
24
+
25
+ .text-shadow {
26
+ text-shadow: 0 1px 3px rgba(0,0,0,.5);
27
+ }
28
+
29
+ .text-light { font-weight: 300; }
30
+ .text-normal { font-weight: 400; }
31
+ .text-bold { font-weight: 700; }
32
+
33
+ @for $i from 1 through 99 {
34
+ .text-sm-#{$i} {
35
+ font-size: #{$i/100}em;
36
+ }
37
+ .text-lg-#{$i} {
38
+ font-size: #{$i/100 + 100}em;
39
+ }
40
+ }
@@ -0,0 +1,43 @@
1
+ html, body, div, span, applet, object, iframe,
2
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
3
+ a, abbr, acronym, address, big, cite, code,
4
+ del, dfn, em, img, ins, kbd, q, s, samp,
5
+ small, strike, strong, sub, sup, tt, var,
6
+ b, u, i, center,
7
+ dl, dt, dd, ol, ul, li,
8
+ fieldset, form, label, legend,
9
+ table, caption, tbody, tfoot, thead, tr, th, td,
10
+ article, aside, canvas, details, embed,
11
+ figure, figcaption, footer, header, hgroup,
12
+ menu, nav, output, ruby, section, summary,
13
+ time, mark, audio, video {
14
+ margin: 0;
15
+ padding: 0;
16
+ border: 0;
17
+ // font-size: 100%;
18
+ // font: inherit;
19
+ // vertical-align: baseline;
20
+ }
21
+ /* HTML5 display-role reset for older browsers */
22
+ article, aside, details, figcaption, figure,
23
+ footer, header, hgroup, menu, nav, section {
24
+ display: block;
25
+ }
26
+ body {
27
+ // line-height: 1;
28
+ }
29
+ ol, ul {
30
+ list-style: none;
31
+ }
32
+ blockquote, q {
33
+ quotes: none;
34
+ }
35
+ blockquote:before, blockquote:after,
36
+ q:before, q:after {
37
+ content: '';
38
+ content: none;
39
+ }
40
+ table {
41
+ border-collapse: collapse;
42
+ border-spacing: 0;
43
+ }
@@ -0,0 +1,42 @@
1
+ @import 'bootstrap';
2
+ @import "font-awesome-sprockets";
3
+ @import "font-awesome";
4
+
5
+ html,
6
+ body {
7
+ height: 100%;
8
+ }
9
+
10
+ .modal {
11
+ -webkit-transition: all 0.5s ease;
12
+ -moz-transition: all 0.5s ease;
13
+ -o-transition: all 0.5s ease;
14
+ transition: all 0.5s ease;
15
+ }
16
+
17
+ div.muted {
18
+ opacity: 0.5;
19
+ }
20
+
21
+ .navbar-transparent {
22
+ // @extend .navbar-default;
23
+ background-color: transparent;
24
+ border-color: transparent;
25
+ }
26
+
27
+ .overlay {
28
+ width: 100%;
29
+ height: 100%;
30
+ position: absolute;
31
+
32
+ @for $i from 1 through 99 {
33
+ &.white-#{$i} {
34
+ background-color: #FFF;
35
+ opacity: $i / 100;
36
+ }
37
+ &.black-#{$i} {
38
+ background-color: #000;
39
+ opacity: $i / 100;
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,6 @@
1
+ body.body-basic {
2
+ .starter-template {
3
+ padding: 40px 15px;
4
+ text-align: center;
5
+ }
6
+ }
@@ -0,0 +1,128 @@
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
+ margin-bottom: 60px;
36
+ }
37
+ /* Since positioning the image, we need to help out the caption */
38
+ .carousel-caption {
39
+ z-index: 10;
40
+ }
41
+
42
+ /* Declare heights because of positioning of img element */
43
+ .carousel .item {
44
+ height: 500px;
45
+ background-color: #777;
46
+ }
47
+ .carousel-inner > .item > img {
48
+ position: absolute;
49
+ top: 0;
50
+ left: 0;
51
+ min-width: 100%;
52
+ height: 500px;
53
+ }
54
+
55
+
56
+ /* MARKETING CONTENT
57
+ -------------------------------------------------- */
58
+
59
+ /* Center align the text within the three columns below the carousel */
60
+ .marketing .col-lg-4 {
61
+ margin-bottom: 20px;
62
+ text-align: center;
63
+ }
64
+ .marketing h2 {
65
+ font-weight: normal;
66
+ }
67
+ .marketing .col-lg-4 p {
68
+ margin-right: 10px;
69
+ margin-left: 10px;
70
+ }
71
+
72
+
73
+ /* Featurettes
74
+ ------------------------- */
75
+
76
+ .featurette-divider {
77
+ margin: 80px 0; /* Space out the Bootstrap <hr> more */
78
+ }
79
+
80
+ /* Thin out the marketing headings */
81
+ .featurette-heading {
82
+ font-weight: 300;
83
+ line-height: 1;
84
+ letter-spacing: -1px;
85
+ }
86
+
87
+
88
+ /* RESPONSIVE CSS
89
+ -------------------------------------------------- */
90
+
91
+ @media (min-width: 768px) {
92
+ /* Navbar positioning foo */
93
+ .navbar-wrapper {
94
+ margin-top: 20px;
95
+ }
96
+ .navbar-wrapper .container {
97
+ padding-right: 15px;
98
+ padding-left: 15px;
99
+ }
100
+ .navbar-wrapper .navbar {
101
+ padding-right: 0;
102
+ padding-left: 0;
103
+ }
104
+
105
+ /* The navbar becomes detached from the top, so we round the corners */
106
+ .navbar-wrapper .navbar {
107
+ border-radius: 4px;
108
+ }
109
+
110
+ /* Bump up size of carousel content */
111
+ .carousel-caption p {
112
+ margin-bottom: 20px;
113
+ font-size: 21px;
114
+ line-height: 1.4;
115
+ }
116
+
117
+ .featurette-heading {
118
+ font-size: 50px;
119
+ }
120
+ }
121
+
122
+ @media (min-width: 992px) {
123
+ .featurette-heading {
124
+ margin-top: 120px;
125
+ }
126
+ }
127
+
128
+ }