minimum-viable-product 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +2 -2
- data/Rakefile +1 -1
- data/app/assets/javascripts/mvp/application.js.erb +1 -1
- data/app/controllers/mvp/analytics_controller.rb +1 -1
- data/app/controllers/mvp/application_controller.rb +4 -4
- data/app/controllers/mvp/concerns/analytics_concern.rb +3 -3
- data/app/controllers/mvp/concerns/seo_concern.rb +1 -1
- data/app/controllers/mvp/concerns/session_concern.rb +1 -1
- data/app/controllers/mvp/seo_controller.rb +1 -1
- data/app/controllers/mvp/styleguide_controller.rb +1 -1
- data/app/helpers/mvp/analytics_helper.rb +1 -1
- data/app/helpers/mvp/application_helper.rb +1 -1
- data/app/helpers/mvp/bootstrap_helper.rb +1 -1
- data/app/helpers/mvp/seo_helper.rb +1 -1
- data/app/helpers/mvp/styleguide_helper.rb +1 -1
- data/app/views/layouts/mvp/_instrumentation.html.erb +2 -2
- data/app/views/layouts/mvp/application.html.erb +1 -1
- data/bin/mvp +41 -3
- data/config/initializers/iteration.rb +1 -1
- data/config/routes.rb +1 -1
- data/lib/{mvp → minimum-viable-product}/engine.rb +2 -2
- data/lib/{mvp → minimum-viable-product}/ext/nil.rb +0 -0
- data/lib/{mvp → minimum-viable-product}/ext/string.rb +0 -0
- data/lib/minimum-viable-product/version.rb +3 -0
- data/lib/mvp.rb +3 -3
- metadata +5 -5
- data/lib/mvp/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d7ffc0cf1ae587642c64d639efc0c16b8b522dc
|
4
|
+
data.tar.gz: de95a502ed0daf9f184d85c59d3e12c232d66530
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fcb337788def91b2109f8053a858ffc6a42df585746e9c7fe9f8c627ce1a9c2d80026150dd4a5c8cc62bc12942e7ba72680b23caefd079a03ae127c68d7986e
|
7
|
+
data.tar.gz: 91712fa30b0c34f9806cb49c9ac1d829bdc9258a4758a41014d96db45ebde4cc2f69d4ecde658bcb3c210195fe590b75822bd123aa84233a7859cda99b0f08bd
|
data/README.rdoc
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
=
|
1
|
+
= Minimum Viable Product
|
2
2
|
|
3
|
-
This project rocks and uses MIT-LICENSE.
|
3
|
+
This project rocks and uses MIT-LICENSE.
|
data/Rakefile
CHANGED
@@ -8,7 +8,7 @@ require 'rdoc/task'
|
|
8
8
|
|
9
9
|
RDoc::Task.new(:rdoc) do |rdoc|
|
10
10
|
rdoc.rdoc_dir = 'rdoc'
|
11
|
-
rdoc.title = '
|
11
|
+
rdoc.title = 'Minimum Viable Product'
|
12
12
|
rdoc.options << '--line-numbers'
|
13
13
|
rdoc.rdoc_files.include('README.rdoc')
|
14
14
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
@@ -2,10 +2,10 @@ require_relative 'concerns/analytics_concern'
|
|
2
2
|
require_relative 'concerns/seo_concern'
|
3
3
|
require_relative 'concerns/session_concern'
|
4
4
|
|
5
|
-
module
|
5
|
+
module MinimumViableProduct
|
6
6
|
class ApplicationController < ActionController::Base
|
7
|
-
include
|
8
|
-
include
|
9
|
-
include
|
7
|
+
include MinimumViableProduct::AnalyticsConcern
|
8
|
+
include MinimumViableProduct::SEOConcern
|
9
|
+
include MinimumViableProduct::SessionConcern
|
10
10
|
end
|
11
11
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module MinimumViableProduct
|
2
2
|
module AnalyticsConcern
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
@@ -16,7 +16,7 @@ module Mvp
|
|
16
16
|
user_id: analytics_id,
|
17
17
|
event: event,
|
18
18
|
properties: properties.reverse_merge({
|
19
|
-
iteration:
|
19
|
+
iteration: MVP::Iteration.version,
|
20
20
|
user: current_user.try(:name),
|
21
21
|
url: request.fullpath
|
22
22
|
})
|
@@ -42,7 +42,7 @@ module Mvp
|
|
42
42
|
category: opts[:category],
|
43
43
|
properties: {
|
44
44
|
url: opts[:url],
|
45
|
-
iteration:
|
45
|
+
iteration: MVP::Iteration.version
|
46
46
|
}
|
47
47
|
)
|
48
48
|
end
|
@@ -14,7 +14,7 @@ var _rollbarConfig = {
|
|
14
14
|
</script>
|
15
15
|
<% end %>
|
16
16
|
|
17
|
-
<% unless cookies[
|
17
|
+
<% unless cookies[MVP::AnalyticsConcern::INVISIBLE_SESSION_COOKIE].to_b == true %>
|
18
18
|
<% if ENV['FACEBOOK_TRACKING_ID'] %>
|
19
19
|
<script>
|
20
20
|
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
@@ -43,7 +43,7 @@ var _rollbarConfig = {
|
|
43
43
|
analytics.identify('<%= analytics_id %>');
|
44
44
|
<% end %>
|
45
45
|
analytics.page('<%= controller.controller_path %>.<%= controller.action_name %>', {
|
46
|
-
iteration: "<%=
|
46
|
+
iteration: "<%= MVP::Iteration.version %>"
|
47
47
|
});
|
48
48
|
}}();
|
49
49
|
</script>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
<%= render 'layouts/mvp/instrumentation' %>
|
16
16
|
</head>
|
17
|
-
<body id="<%= body_id %>" class="<%= body_classes %>" data-controller="<%= controller.controller_path %>" data-action="<%= controller.action_name %>" data-iteration="<%=
|
17
|
+
<body id="<%= body_id %>" class="<%= body_classes %>" data-controller="<%= controller.controller_path %>" data-action="<%= controller.action_name %>" data-iteration="<%= MVP::Iteration.version %>">
|
18
18
|
<% if content_for? :body %>
|
19
19
|
<%= yield :body %>
|
20
20
|
<% else %>
|
data/bin/mvp
CHANGED
@@ -8,16 +8,54 @@ No command specified, please use one of the following
|
|
8
8
|
update: update mvp inside current project
|
9
9
|
%) unless command
|
10
10
|
|
11
|
-
case
|
11
|
+
case command.downcase
|
12
12
|
when 'project'
|
13
|
-
|
13
|
+
$stdin.reopen(File.open("/dev/tty", "r"))
|
14
|
+
|
15
|
+
print "Project name? "
|
16
|
+
project = STDIN.gets.chomp
|
17
|
+
error('Must specify a project name') if project == ""
|
18
|
+
slug = slugify(project)
|
19
|
+
|
20
|
+
puts
|
21
|
+
run "git clone git@github.com:ian/harness.git #{slug}"
|
22
|
+
|
23
|
+
puts
|
24
|
+
puts "Initializing Project"
|
25
|
+
files = Dir.glob("#{slug}/**/*").select { |f| File.file?(f) }
|
26
|
+
files.each do |file_name|
|
27
|
+
text = File.read(file_name)
|
28
|
+
new_contents = text.gsub(/__PROJECT_NAME__/, project)
|
29
|
+
.gsub(/__PROJECT_NAME_SLUG__/, slug)
|
30
|
+
|
31
|
+
File.open(file_name, "w") {|file| file.puts new_contents }
|
32
|
+
end
|
33
|
+
run "cd #{slug} && rm -rf .git && rm install.rb && git init"
|
34
|
+
|
35
|
+
run "cd #{slug}; bin/setup", "Project Setup"
|
14
36
|
when 'update'
|
15
37
|
puts "TBD"
|
16
38
|
end
|
17
39
|
|
18
40
|
BEGIN {
|
41
|
+
def slugify(name)
|
42
|
+
slug = name.gsub(/'/, '').gsub(/[^a-z0-9]+/, '_')
|
43
|
+
slug.chop! if slug[-1] == '-'
|
44
|
+
slug
|
45
|
+
end
|
46
|
+
|
19
47
|
def error(message)
|
20
|
-
puts
|
48
|
+
puts
|
49
|
+
puts "Error: #{message}"
|
21
50
|
exit 1
|
22
51
|
end
|
52
|
+
|
53
|
+
def run(cmd, message=nil)
|
54
|
+
if message
|
55
|
+
puts
|
56
|
+
puts message
|
57
|
+
end
|
58
|
+
|
59
|
+
system cmd
|
60
|
+
end
|
23
61
|
}
|
data/config/routes.rb
CHANGED
@@ -12,9 +12,9 @@ require "simple_form"
|
|
12
12
|
require_relative './ext/nil'
|
13
13
|
require_relative './ext/string'
|
14
14
|
|
15
|
-
module
|
15
|
+
module MinimumViableProduct
|
16
16
|
class Engine < ::Rails::Engine
|
17
|
-
isolate_namespace
|
17
|
+
isolate_namespace MinimumViableProduct
|
18
18
|
config.autoload_paths << "#{Rails.root}/lib"
|
19
19
|
end
|
20
20
|
end
|
File without changes
|
File without changes
|
data/lib/mvp.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minimum-viable-product
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian Hunter
|
@@ -488,11 +488,11 @@ files:
|
|
488
488
|
- config/initializers/spoof_ip.rb
|
489
489
|
- config/initializers/ssl.rb
|
490
490
|
- config/routes.rb
|
491
|
+
- lib/minimum-viable-product/engine.rb
|
492
|
+
- lib/minimum-viable-product/ext/nil.rb
|
493
|
+
- lib/minimum-viable-product/ext/string.rb
|
494
|
+
- lib/minimum-viable-product/version.rb
|
491
495
|
- lib/mvp.rb
|
492
|
-
- lib/mvp/engine.rb
|
493
|
-
- lib/mvp/ext/nil.rb
|
494
|
-
- lib/mvp/ext/string.rb
|
495
|
-
- lib/mvp/version.rb
|
496
496
|
- lib/tasks/sitemap.rake
|
497
497
|
homepage: http://github.com/ian/mvp
|
498
498
|
licenses:
|
data/lib/mvp/version.rb
DELETED