vanity 1.8.3 → 1.8.4

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.
data/.travis.yml CHANGED
@@ -20,7 +20,7 @@ gemfile:
20
20
  - gemfiles/rails32.gemfile
21
21
  - gemfiles/rails4.gemfile
22
22
  before_script:
23
- - if [[ "`basename $BUNDLE_GEMFILE`" == "Gemfile" ]]; then rvm rubygems 1.8.25; fi # Rubygems 2.0.x fails with Rails 2.3
23
+ - if [[ "`basename $BUNDLE_GEMFILE`" == "Gemfile" ]]; then rvm rubygems --force 1.8.25; fi # Rubygems 2.0.x fails with Rails 2.3
24
24
  - "mysql -e 'create database vanity_test;' >/dev/null"
25
25
  #- if [[ "$DB" == "pgsql" ]]; then psql -c 'create database vanity_test;' -U postgres >/dev/null; fi
26
26
  matrix:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vanity (1.8.3)
4
+ vanity (1.8.4)
5
5
  redis (>= 2.1)
6
6
  redis-namespace (>= 1.1.0)
7
7
 
@@ -72,9 +72,9 @@ GEM
72
72
  activesupport (= 2.3.14)
73
73
  rake (>= 0.8.3)
74
74
  rake (10.1.0)
75
- redis (3.0.6)
76
- redis-namespace (1.3.2)
77
- redis (~> 3.0.4)
75
+ redis (3.2.0)
76
+ redis-namespace (1.5.1)
77
+ redis (~> 3.0, >= 3.0.4)
78
78
  rubystats (0.2.3)
79
79
  shoulda (3.0.1)
80
80
  shoulda-context (~> 1.0.0)
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: /Users/phill/Development/ruby/vanity
9
9
  specs:
10
- vanity (1.8.3)
10
+ vanity (1.8.4)
11
11
  redis (>= 2.1)
12
12
  redis-namespace (>= 1.1.0)
13
13
 
@@ -103,9 +103,9 @@ GEM
103
103
  rake (0.9.2.2)
104
104
  rdoc (3.12)
105
105
  json (~> 1.4)
106
- redis (3.0.6)
107
- redis-namespace (1.3.2)
108
- redis (~> 3.0.4)
106
+ redis (3.2.0)
107
+ redis-namespace (1.5.1)
108
+ redis (~> 3.0, >= 3.0.4)
109
109
  rubystats (0.2.3)
110
110
  shoulda (3.0.1)
111
111
  shoulda-context (~> 1.0.0)
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: /Users/phill/Development/ruby/vanity
9
9
  specs:
10
- vanity (1.8.3)
10
+ vanity (1.8.4)
11
11
  redis (>= 2.1)
12
12
  redis-namespace (>= 1.1.0)
13
13
 
@@ -108,9 +108,9 @@ GEM
108
108
  rake (0.9.2.2)
109
109
  rdoc (3.12)
110
110
  json (~> 1.4)
111
- redis (3.0.6)
112
- redis-namespace (1.3.2)
113
- redis (~> 3.0.4)
111
+ redis (3.2.0)
112
+ redis-namespace (1.5.1)
113
+ redis (~> 3.0, >= 3.0.4)
114
114
  rubystats (0.2.3)
115
115
  shoulda (3.0.1)
116
116
  shoulda-context (~> 1.0.0)
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: /Users/phill/Development/ruby/vanity
9
9
  specs:
10
- vanity (1.8.3)
10
+ vanity (1.8.4)
11
11
  redis (>= 2.1)
12
12
  redis-namespace (>= 1.1.0)
13
13
 
@@ -107,9 +107,9 @@ GEM
107
107
  rake (0.9.2.2)
108
108
  rdoc (3.12)
109
109
  json (~> 1.4)
110
- redis (3.0.6)
111
- redis-namespace (1.3.2)
112
- redis (~> 3.0.4)
110
+ redis (3.2.0)
111
+ redis-namespace (1.5.1)
112
+ redis (~> 3.0, >= 3.0.4)
113
113
  rubystats (0.2.3)
114
114
  shoulda (3.0.1)
115
115
  shoulda-context (~> 1.0.0)
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: /Users/phill/Development/ruby/vanity
9
9
  specs:
10
- vanity (1.8.3)
10
+ vanity (1.8.4)
11
11
  redis (>= 2.1)
12
12
  redis-namespace (>= 1.1.0)
13
13
 
@@ -96,9 +96,9 @@ GEM
96
96
  rake (>= 0.8.7)
97
97
  thor (>= 0.18.1, < 2.0)
98
98
  rake (10.1.0)
99
- redis (3.0.6)
100
- redis-namespace (1.3.2)
101
- redis (~> 3.0.4)
99
+ redis (3.2.0)
100
+ redis-namespace (1.5.1)
101
+ redis (~> 3.0, >= 3.0.4)
102
102
  rubystats (0.2.3)
103
103
  safe_yaml (0.9.7)
104
104
  shoulda (3.5.0)
data/lib/vanity.rb CHANGED
@@ -26,8 +26,6 @@ require "vanity/experiment/base"
26
26
  require "vanity/experiment/ab_test"
27
27
  # Database adapters
28
28
  require "vanity/adapters/abstract_adapter"
29
- require "vanity/adapters/redis_adapter"
30
- require "vanity/adapters/mongodb_adapter"
31
29
  require "vanity/adapters/mock_adapter"
32
30
  # Playground.
33
31
  require "vanity/playground"
@@ -27,7 +27,8 @@ module Vanity
27
27
  # Metric model
28
28
  class VanityMetric < VanityRecord
29
29
  self.table_name = :vanity_metrics
30
- has_many :vanity_metric_values
30
+ has_many :vanity_metric_values,
31
+ :class_name => 'Vanity::Adapters::ActiveRecordAdapter::VanityMetricValue'
31
32
 
32
33
  def self.retrieve(metric)
33
34
  find_or_create_by_metric_id(metric.to_s)
@@ -39,13 +40,15 @@ module Vanity
39
40
  attr_accessible :date, :index, :value if needs_attr_accessible?
40
41
 
41
42
  self.table_name = :vanity_metric_values
42
- belongs_to :vanity_metric
43
+ belongs_to :vanity_metric,
44
+ :class_name => 'Vanity::Adapters::ActiveRecordAdapter::VanityMetric'
43
45
  end
44
46
 
45
47
  # Experiment model
46
48
  class VanityExperiment < VanityRecord
47
49
  self.table_name = :vanity_experiments
48
- has_many :vanity_conversions, :dependent => :destroy
50
+ has_many :vanity_conversions, :dependent => :destroy,
51
+ :class_name => 'Vanity::Adapters::ActiveRecordAdapter::VanityConversion'
49
52
  attr_accessible :experiment_id if needs_attr_accessible?
50
53
 
51
54
  # Finds or creates the experiment
@@ -62,7 +65,8 @@ module Vanity
62
65
  # Conversion model
63
66
  class VanityConversion < VanityRecord
64
67
  self.table_name = :vanity_conversions
65
- belongs_to :vanity_experiment
68
+ belongs_to :vanity_experiment,
69
+ :class_name => 'Vanity::Adapters::ActiveRecordAdapter::VanityExperiment'
66
70
  end
67
71
 
68
72
  # Participant model
@@ -1,5 +1,5 @@
1
1
  module Vanity
2
- VERSION = "1.8.3"
2
+ VERSION = "1.8.4"
3
3
 
4
4
  module Version
5
5
  version = VERSION.to_s.split(".").map { |i| i.to_i }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vanity
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.3
4
+ version: 1.8.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-20 00:00:00.000000000 Z
12
+ date: 2015-06-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis
@@ -196,7 +196,7 @@ licenses:
196
196
  post_install_message: To get started run vanity --help
197
197
  rdoc_options:
198
198
  - --title
199
- - Vanity 1.8.3
199
+ - Vanity 1.8.4
200
200
  - --main
201
201
  - README.rdoc
202
202
  - --webcvs