minimum_viable_product 0.0.17 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7b72c4c54dbc9c1ff3982b3b885b0bb9d84b2e4
4
- data.tar.gz: f49e5c480e1c4414bf02068a6efb2794e598a0c5
3
+ metadata.gz: 31737af10c467521f27292195ec86d64396fcc8e
4
+ data.tar.gz: f1b4b73d70eaf4a7b79e080e3fa5202353620e32
5
5
  SHA512:
6
- metadata.gz: 5be253561b4226cd9e4373840ce2b5c23d195e7beb4a725212dd94f8243c8ad3038b09b5a11a53795eeaa0e51fa381731c0e738884860e261997b6c1db43b403
7
- data.tar.gz: 8ec0367acf7f5df19d9c3ae1cfea855e0e818709943875c1ededeb3dc158d0992fc4c186348765db044fcd27485c21f82af41485fc2f9ffbb8728cc12556b801
6
+ metadata.gz: 69558bfe5e919f1b00722f980f4da59b28f41f937ce83b40395148e0dfb6b60a071093b94d48f7252408b60a96d5473c806aa066a08217a744b87557710fe398
7
+ data.tar.gz: 2d6dc3fe6a0494a75ff470387d09443b9d389e1fa4e96349ece35ce39485d298ae27066325b39458c7352fe6b7cd3047bf2165b20c726bff3b67bafd0bdade61
data/README.rdoc CHANGED
@@ -1,3 +1,116 @@
1
- = Minimum Viable Product
1
+ # Installation
2
2
 
3
- This project rocks and uses MIT-LICENSE.
3
+ Install the mvp gem:
4
+
5
+ ```
6
+ gem install minimum_viable_product
7
+ ```
8
+
9
+ Then setup your project:
10
+
11
+ ```
12
+ mvp new PROJECT
13
+ ```
14
+
15
+ # Setup
16
+
17
+ ## `.env`
18
+
19
+ Set your `.env` file up with your own variables
20
+
21
+ ```
22
+ ROLLBAR_CLIENT_ACCESS_TOKEN=
23
+ ROLLBAR_SERVER_ACCESS_TOKEN=
24
+ SEGMENT_WRITE_KEY=
25
+ FACEBOOK_TRACKING_ID=
26
+ CANONICAL_HOST=
27
+ GOOGLE_ANALYTICS_ID=
28
+ HOTJAR_ID=
29
+ AWS_ACCESS_KEY_ID=
30
+ AWS_SECRET_ACCESS_KEY=
31
+ AWS_S3_BUCKET=
32
+ SPOOF_IP=true
33
+ ```
34
+
35
+ ## Heroku
36
+
37
+ To setup deployment for heroku, first create the project:
38
+
39
+ ```
40
+ heroku create PROJECT
41
+ ```
42
+
43
+ You're probably going to want Database backups. This will let you use `rake db:import`
44
+
45
+ ```
46
+ heroku pg:backups capture
47
+ ```
48
+
49
+ You're also going to need to setup the buildpacks
50
+
51
+ ```
52
+ heroku buildpacks:set heroku/ruby
53
+ heroku buildpacks:add --index 1 heroku/nodejs
54
+ ```
55
+
56
+ Add a scheduled task to update your sitemaps: `rake sitemap:create_upload_and_ping`
57
+
58
+ # SEO
59
+
60
+ ## Meta Properties
61
+
62
+ All meta fields are controlled via the `page` object. Set attributes on this in order to get meta properties populated. This is best done at the controller level.
63
+
64
+ ### Available Properties
65
+
66
+ |Property|Description|Inheritance|
67
+ |---|---|---|
68
+ |`page.title`| | |
69
+ |`page.description`| | |
70
+ |`page.author`| | |
71
+ |`page.og_url`| | |
72
+ |`page.og_type`| | |
73
+ |`page.og_title`| |`page.title`|
74
+ |`page.og_description`| |`page.description`|
75
+ |`page.og_image`| | |
76
+ |`page.twitter_card`| | | |
77
+
78
+ ## Sitemaps
79
+
80
+ ### Setup
81
+
82
+ Edit `config/sitemap.rb` with your own custom routes.
83
+
84
+ ### Updating
85
+
86
+ Run `sitemap:refresh` in production to update Bing/Google with changes to the sitemap.
87
+
88
+ Put this in a `cron` task or in Heroku Scheduler.
89
+
90
+ # Helpers
91
+
92
+ ## Geolocation
93
+
94
+ By default, Geolocation of the session will automatically happen.
95
+
96
+ You can access the session's geolocation in `request.location`.
97
+
98
+ To test geolocation locally, set `SPOOF_IP=true` in your `.env`.
99
+
100
+ For more info see [Geocoder](https://github.com/alexreisner/geocoder).
101
+
102
+ ## Bootstrap
103
+
104
+ ### `row_groups_of`
105
+
106
+ Makes a series of row/col `div` elements based in group count.
107
+
108
+ ```
109
+ <% row_groups_of(3, [1,2,3,4,5,6,7,8,9]) do |i| %>
110
+ <div class="panel panel-default">
111
+ <div class="panel-heading">
112
+ <h2 class="text-center"><%= i %></h2>
113
+ </div>
114
+ </div>
115
+ <% end %>
116
+ ```
@@ -1,3 +1,3 @@
1
1
  module MinimumViableProduct
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
3
3
  end
data/test/dummy/bin/setup CHANGED
@@ -24,6 +24,6 @@ Dir.chdir APP_ROOT do
24
24
  system "rm -f log/*"
25
25
  system "rm -rf tmp/cache"
26
26
 
27
- puts "\n== Restarting application server =="
28
- system "touch tmp/restart.txt"
27
+ puts "\n== Installing NPM modules =="
28
+ system "npm install"
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minimum_viable_product
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Hunter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-15 00:00:00.000000000 Z
11
+ date: 2016-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: analytics-ruby