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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1176e281fa49b43b9d7a50c5dae95eacf278da29
4
- data.tar.gz: cdbb256c81f5bfe09cf01a418ee23ae7e5a21144
3
+ metadata.gz: 9d7ffc0cf1ae587642c64d639efc0c16b8b522dc
4
+ data.tar.gz: de95a502ed0daf9f184d85c59d3e12c232d66530
5
5
  SHA512:
6
- metadata.gz: a62292a761233c6e371c3c615e56ca36cc92ae2757af2cc958f100578098979928411e4e231a7a21dc013184de5afccfc9775d792446e927b1770ba197ebc715
7
- data.tar.gz: 755a655879f6d733be7ba4eb07bbdb7ff13d80c0da04221df6bd09e8dabd5875806600d9fd9eccaba9722ac9e4ce8334103a44e8e020943b656d40444db0feb8
6
+ metadata.gz: 8fcb337788def91b2109f8053a858ffc6a42df585746e9c7fe9f8c627ce1a9c2d80026150dd4a5c8cc62bc12942e7ba72680b23caefd079a03ae127c68d7986e
7
+ data.tar.gz: 91712fa30b0c34f9806cb49c9ac1d829bdc9258a4758a41014d96db45ebde4cc2f69d4ecde658bcb3c210195fe590b75822bd123aa84233a7859cda99b0f08bd
data/README.rdoc CHANGED
@@ -1,3 +1,3 @@
1
- = Mvp
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 = 'Mvp'
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')
@@ -29,7 +29,7 @@ track = function(event, attributes, fn){
29
29
  }
30
30
 
31
31
  attrs = _.extend({
32
- iteration: '<%= Mvp::Iteration.version %>'
32
+ iteration: '<%= MVP::Iteration.version %>'
33
33
  }, attributes)
34
34
 
35
35
  analytics.track(event, attrs, fn)
@@ -1,6 +1,6 @@
1
1
  require_dependency "mvp/application_controller"
2
2
 
3
- module Mvp
3
+ module MinimumViableProduct
4
4
  class AnalyticsController < ApplicationController
5
5
  def optout
6
6
  cookies[AnalyticsConcern::INVISIBLE_SESSION_COOKIE] = {
@@ -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 Mvp
5
+ module MinimumViableProduct
6
6
  class ApplicationController < ActionController::Base
7
- include Mvp::AnalyticsConcern
8
- include Mvp::SEOConcern
9
- include Mvp::SessionConcern
7
+ include MinimumViableProduct::AnalyticsConcern
8
+ include MinimumViableProduct::SEOConcern
9
+ include MinimumViableProduct::SessionConcern
10
10
  end
11
11
  end
@@ -1,4 +1,4 @@
1
- module Mvp
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: Mvp::Iteration.version,
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: Mvp::Iteration.version
45
+ iteration: MVP::Iteration.version
46
46
  }
47
47
  )
48
48
  end
@@ -1,4 +1,4 @@
1
- module Mvp
1
+ module MinimumViableProduct
2
2
  module SEOConcern
3
3
  extend ActiveSupport::Concern
4
4
 
@@ -1,4 +1,4 @@
1
- module Mvp
1
+ module MinimumViableProduct
2
2
  module SessionConcern
3
3
  extend ActiveSupport::Concern
4
4
 
@@ -1,6 +1,6 @@
1
1
  require_dependency "mvp/application_controller"
2
2
 
3
- module Mvp
3
+ module MinimumViableProduct
4
4
  class SeoController < ApplicationController
5
5
  def robots
6
6
  render text: %%
@@ -1,6 +1,6 @@
1
1
  require_dependency "mvp/application_controller"
2
2
 
3
- module Mvp
3
+ module MinimumViableProduct
4
4
  class StyleguideController < ApplicationController
5
5
  def layout_basic
6
6
  render template: 'styleguide/layouts/basic', layout: 'basic'
@@ -1,4 +1,4 @@
1
- module Mvp
1
+ module MinimumViableProduct
2
2
  module AnalyticsHelper
3
3
  end
4
4
  end
@@ -1,4 +1,4 @@
1
- module Mvp
1
+ module MinimumViableProduct
2
2
  module ApplicationHelper
3
3
  def body_id
4
4
  "#{controller_name}-#{action_name}-page"
@@ -1,4 +1,4 @@
1
- module Mvp
1
+ module MinimumViableProduct
2
2
  module BootstrapHelper
3
3
  def col_groups_of(count, collection, opts={})
4
4
  return if collection.blank?
@@ -1,4 +1,4 @@
1
- module Mvp
1
+ module MinimumViableProduct
2
2
  module SeoHelper
3
3
  end
4
4
  end
@@ -1,4 +1,4 @@
1
- module Mvp
1
+ module MinimumViableProduct
2
2
  module StyleguideHelper
3
3
  end
4
4
  end
@@ -14,7 +14,7 @@ var _rollbarConfig = {
14
14
  </script>
15
15
  <% end %>
16
16
 
17
- <% unless cookies[Mvp::AnalyticsConcern::INVISIBLE_SESSION_COOKIE].to_b == true %>
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: "<%= Mvp::Iteration.version %>"
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="<%= Mvp::Iteration.version %>">
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 ARGV[1].downcase
11
+ case command.downcase
12
12
  when 'project'
13
- `curl -s https://raw.githubusercontent.com/ian/product-validation-mvp/master/install.rb | ruby`
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 message
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
  }
@@ -1,4 +1,4 @@
1
- module Mvp
1
+ module MinimumViableProduct
2
2
  module Iteration
3
3
  CONFIG_FILE = File.join(Rails.root, '.iteration')
4
4
 
data/config/routes.rb CHANGED
@@ -1,4 +1,4 @@
1
- Mvp::Engine.routes.draw do
1
+ MinimumViableProduct::Engine.routes.draw do
2
2
  # mount RailsAdmin::Engine => '/admin', as: 'rails_admin'
3
3
 
4
4
  if Rails.env.development?
@@ -12,9 +12,9 @@ require "simple_form"
12
12
  require_relative './ext/nil'
13
13
  require_relative './ext/string'
14
14
 
15
- module Mvp
15
+ module MinimumViableProduct
16
16
  class Engine < ::Rails::Engine
17
- isolate_namespace Mvp
17
+ isolate_namespace MinimumViableProduct
18
18
  config.autoload_paths << "#{Rails.root}/lib"
19
19
  end
20
20
  end
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ module MinimumViableProduct
2
+ VERSION = "0.0.4"
3
+ end
data/lib/mvp.rb CHANGED
@@ -1,6 +1,6 @@
1
- require "mvp/engine"
1
+ require "minimum-viable-product/engine"
2
2
 
3
- module Mvp
3
+ module MinimumViableProduct
4
4
  end
5
5
 
6
- MVP = Mvp
6
+ MVP = Mvp = MinimumViableProduct
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.2
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
@@ -1,3 +0,0 @@
1
- module Mvp
2
- VERSION = "0.0.2"
3
- end