mountain-goat 0.0.16 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,40 @@
1
+ class MgGenerator < Rails::Generator::Base
2
+ def add_options!(opt)
3
+ opt.on('-p', '--password=password', String, "Your password to access Mountain Goat") { |v| options[:password] = v}
4
+ puts <<-HELPFUL_INSTRUCTIONS
5
+
6
+ Mountain Goat is your home for A/B testing in-house.
7
+
8
+ We have installed your configuration file to config/mountain-goat.yml
9
+ Please choose a password for each environment in this file. Make
10
+ sure this password is secure.
11
+
12
+ This will copy necessary migrations to your db/migrate folder. Please migrate
13
+ your database before running mountain-goat.
14
+
15
+ To access mountain-goat, navigate to /mg in your project. Everything else
16
+ should be handled by the gem. Enjoy!
17
+
18
+ 1) Choose an admin-password in config/mountain-goat.yml
19
+ 2) Run `rake db:migrate`
20
+ 3) Start your server and navigate to 'http://mydomain.com/mg'
21
+ 4) Play around, read the docs, A/B test, enjoy.
22
+
23
+ HELPFUL_INSTRUCTIONS
24
+ end
25
+
26
+ def manifest
27
+ if options[:password].blank?
28
+ password = ""
29
+ else
30
+ password = options[:password]
31
+ end
32
+ record do |m|
33
+ #m.template 'mountain-goat.yml', 'config/mountain-goat.yml', :assigns => {:password => password}
34
+ m.migration_template 'create_mountain_goat_tables.rb', 'db/migrate', { :migration_file_name => "create_mountain_goat_tables" }
35
+ end
36
+ end
37
+
38
+ private
39
+
40
+ end
@@ -0,0 +1,3 @@
1
+
2
+
3
+ #geoff
@@ -0,0 +1,15 @@
1
+
2
+ #################
3
+ # Mountain Goat #
4
+ #################
5
+
6
+ # Add your access passwords for each environment
7
+ #
8
+ test:
9
+ password: <%= password %>
10
+ development:
11
+ password: <%= password %>
12
+ staging:
13
+ password: <%= password %>
14
+ production:
15
+ password: <%= password %>
data/lib/mountain-goat.rb CHANGED
@@ -19,6 +19,9 @@ require File.join([File.dirname(__FILE__), 'mountain-goat/models/cs_meta'])
19
19
  require File.join([File.dirname(__FILE__), 'mountain-goat/models/ci_meta'])
20
20
  require File.join([File.dirname(__FILE__), 'mountain-goat/models/rally'])
21
21
 
22
+ #$VERBOSE = nil
23
+ #Dir["#{Gem.searcher.find('mountain-goat').full_gem_path}/lib/tasks/*.rake"].each { |ext| load ext }
24
+
22
25
  module MountainGoat
23
26
 
24
27
  end
@@ -1,3 +1,3 @@
1
1
  class MountainGoat
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mountain-goat
3
3
  version: !ruby/object:Gem::Version
4
- hash: 63
4
+ hash: 61
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 16
10
- version: 0.0.16
9
+ - 17
10
+ version: 0.0.17
11
11
  platform: ruby
12
12
  authors:
13
13
  - Geoffrey Hayes
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-07-13 00:00:00 -05:00
19
+ date: 2011-07-14 00:00:00 -05:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -68,6 +68,10 @@ files:
68
68
  - POST_INSTALL
69
69
  - README.md
70
70
  - Rakefile
71
+ - generators/mg/mg_generator.rb
72
+ - generators/mg/templates/create_mountain_goat_tables.rb
73
+ - generators/mg/templates/initializer.rb
74
+ - generators/mg/templates/mountain-goat.yml
71
75
  - init.rb
72
76
  - install.rb
73
77
  - lib/flotilla.rb
@@ -114,10 +118,7 @@ files:
114
118
  - lib/mountain-goat/views/mountain_goat/mountain_goat_metrics/index.html.erb
115
119
  - lib/mountain-goat/views/mountain_goat/mountain_goat_metrics/new.html.erb
116
120
  - lib/mountain-goat/views/mountain_goat/mountain_goat_metrics/show.html.erb
117
- - lib/mountain-goat/views/mountain_goat/mountain_goat_rallies/.tmp_index.html.erb.12762~
118
121
  - lib/mountain-goat/views/mountain_goat/mountain_goat_rallies/index.html.erb
119
- - migrations/20090716093747_create_metric_tracking_tables.rb
120
- - migrations/20110710193220_mountain_goat_add_mg_options_table.rb
121
122
  - mountain-goat.gemspec
122
123
  - test/fixtures/ci_metas.yml
123
124
  - test/fixtures/convert_meta_types.yml
@@ -1,22 +0,0 @@
1
-
2
-
3
- <div id="container-main" class="mt-rallies">
4
- <div class="mountain-goat-panel">
5
- <h1>Rallies <% if @convert %>for <%=h @convert.name %><% else %>for all Goals<% end %></h1>
6
-
7
- <% if @rallies.count > 0 %>
8
- <ul>
9
- <% @rallies.each do |rally| %>
10
- <li><%= rally.convert.name %> at <%= rally.created_at.to_s %></li>
11
- (
12
- <% rally.all_metas do |k,v| %>
13
- <%= k %>: <%= v %>
14
- <% end %>
15
- )
16
- <% end %>
17
- </ul>
18
- <% else %>
19
- <h2>No rallies for yet this goal.</h2>
20
- <% end %>
21
- </div>
22
- </div>
@@ -1,10 +0,0 @@
1
- class MountainGoatAddMgOptionsTable < ActiveRecord::Migration
2
- def self.up
3
- create_table :mountain_goat_options do |t|
4
- end
5
- end
6
-
7
- def self.down
8
- drop_table :mountain_goat_options
9
- end
10
- end