bananasplit 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +102 -0
- data/MIT-LICENSE +20 -0
- data/README.md +129 -0
- data/Rakefile +24 -0
- data/bananasplit.gemspec +20 -0
- data/generators/bananasplit_migration/bananasplit_migration_generator.rb +24 -0
- data/generators/bananasplit_migration/templates/abingo_migration.rb +31 -0
- data/lib/bananasplit.rb +325 -0
- data/lib/bananasplit/alternative.rb +22 -0
- data/lib/bananasplit/controller/dashboard.rb +25 -0
- data/lib/bananasplit/conversion_rate.rb +9 -0
- data/lib/bananasplit/experiment.rb +103 -0
- data/lib/bananasplit/rails/controller/dashboard.rb +13 -0
- data/lib/bananasplit/statistics.rb +90 -0
- data/lib/bananasplit/version.rb +3 -0
- data/lib/bananasplit/views/dashboard/_experiment.erb +43 -0
- data/lib/bananasplit/views/dashboard/index.erb +20 -0
- data/lib/bananasplit_sugar.rb +48 -0
- data/lib/bananasplit_view_helper.rb +40 -0
- data/test/abingo_test.rb +220 -0
- data/test/test_helper.rb +32 -0
- metadata +108 -0
data/test/test_helper.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'contest'
|
3
|
+
require 'pg'
|
4
|
+
require 'active_support/cache'
|
5
|
+
require 'active_support/cache/memory_store'
|
6
|
+
require_relative '../lib/bananasplit'
|
7
|
+
ActiveRecord::Base.establish_connection(
|
8
|
+
:adapter => "postgresql",
|
9
|
+
:database => "bananasplit-test")
|
10
|
+
ActiveRecord::Schema.define do
|
11
|
+
create_table "experiments", :force => true do |t|
|
12
|
+
t.string "test_name"
|
13
|
+
t.string "status"
|
14
|
+
t.timestamps
|
15
|
+
end
|
16
|
+
|
17
|
+
add_index "experiments", "test_name"
|
18
|
+
#add_index "experiments", "created_on"
|
19
|
+
|
20
|
+
create_table "alternatives", :force => true do |t|
|
21
|
+
t.integer :experiment_id
|
22
|
+
t.string :content
|
23
|
+
t.string :lookup, :limit => 32
|
24
|
+
t.integer :weight, :default => 1
|
25
|
+
t.integer :participants, :default => 0
|
26
|
+
t.integer :conversions, :default => 0
|
27
|
+
end
|
28
|
+
|
29
|
+
add_index "alternatives", "experiment_id"
|
30
|
+
add_index "alternatives", "lookup" #Critical for speed, since we'll primarily be updating by that.
|
31
|
+
end
|
32
|
+
BananaSplit.cache = ActiveSupport::Cache::MemoryStore.new
|
metadata
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bananasplit
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.3
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Glenn Gillen
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-06-14 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rails
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3.0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3.0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - '='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 0.8.7
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - '='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.8.7
|
46
|
+
description: A split testing framework for Rails 3.x.x
|
47
|
+
email:
|
48
|
+
- me@glenngillen.com
|
49
|
+
executables: []
|
50
|
+
extensions: []
|
51
|
+
extra_rdoc_files: []
|
52
|
+
files:
|
53
|
+
- .gitignore
|
54
|
+
- Gemfile
|
55
|
+
- Gemfile.lock
|
56
|
+
- MIT-LICENSE
|
57
|
+
- README.md
|
58
|
+
- Rakefile
|
59
|
+
- bananasplit.gemspec
|
60
|
+
- generators/bananasplit_migration/bananasplit_migration_generator.rb
|
61
|
+
- generators/bananasplit_migration/templates/abingo_migration.rb
|
62
|
+
- lib/bananasplit.rb
|
63
|
+
- lib/bananasplit/alternative.rb
|
64
|
+
- lib/bananasplit/controller/dashboard.rb
|
65
|
+
- lib/bananasplit/conversion_rate.rb
|
66
|
+
- lib/bananasplit/experiment.rb
|
67
|
+
- lib/bananasplit/rails/controller/dashboard.rb
|
68
|
+
- lib/bananasplit/statistics.rb
|
69
|
+
- lib/bananasplit/version.rb
|
70
|
+
- lib/bananasplit/views/dashboard/_experiment.erb
|
71
|
+
- lib/bananasplit/views/dashboard/index.erb
|
72
|
+
- lib/bananasplit_sugar.rb
|
73
|
+
- lib/bananasplit_view_helper.rb
|
74
|
+
- test/abingo_test.rb
|
75
|
+
- test/test_helper.rb
|
76
|
+
homepage: https://github.com/glenngillen/bananasplit
|
77
|
+
licenses: []
|
78
|
+
post_install_message:
|
79
|
+
rdoc_options: []
|
80
|
+
require_paths:
|
81
|
+
- lib
|
82
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
segments:
|
89
|
+
- 0
|
90
|
+
hash: 104428531140550283
|
91
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
|
+
none: false
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
segments:
|
98
|
+
- 0
|
99
|
+
hash: 104428531140550283
|
100
|
+
requirements: []
|
101
|
+
rubyforge_project:
|
102
|
+
rubygems_version: 1.8.25
|
103
|
+
signing_key:
|
104
|
+
specification_version: 3
|
105
|
+
summary: The ABingo split testing framework for Rails 3.x.x from Patrick McKenzie
|
106
|
+
test_files:
|
107
|
+
- test/abingo_test.rb
|
108
|
+
- test/test_helper.rb
|