vanity 2.2.7 → 2.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/CHANGELOG +3 -0
- data/Gemfile.lock +1 -1
- data/doc/metrics.textile +2 -2
- data/gemfiles/rails32.gemfile.lock +1 -1
- data/gemfiles/rails41.gemfile.lock +1 -1
- data/gemfiles/rails42.gemfile.lock +1 -1
- data/gemfiles/rails42_protected_attributes.gemfile.lock +1 -1
- data/gemfiles/rails5.gemfile.lock +1 -1
- data/lib/vanity/adapters/active_record_adapter.rb +1 -1
- data/lib/vanity/frameworks/rails.rb +8 -7
- data/lib/vanity/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32b2be75e4a14bf3ce84ba1a49f3ae8b86e6fcf6
|
4
|
+
data.tar.gz: 40c8689393515ddd853df28130eace503b1327cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91931eacb3c34fdf4e9caa8c1ca98b62f0e3cbfd521a58ace103eec63177d28fcfe64646db79d25bb1daeac93dda0814c02dc8d665d2509ccaed30a00c230493
|
7
|
+
data.tar.gz: 1604cd40d0e73ac1e26a0ba5eebbeaba98e5efa03e23bb50dde6d279325302e8881852808470c3b170b98345d6f36f6d457fdebd4f578404c7b5620f3a1650fb
|
data/.travis.yml
CHANGED
@@ -14,7 +14,7 @@ rvm:
|
|
14
14
|
- 2.1
|
15
15
|
- 2.2.2
|
16
16
|
- 2.3.0
|
17
|
-
- jruby-
|
17
|
+
- jruby-9.1.7.0
|
18
18
|
env:
|
19
19
|
- DB=mongodb
|
20
20
|
- DB=redis
|
@@ -29,5 +29,5 @@ matrix:
|
|
29
29
|
exclude:
|
30
30
|
- rvm: 2.1
|
31
31
|
gemfile: gemfiles/rails5.gemfile
|
32
|
-
- rvm: jruby-
|
32
|
+
- rvm: jruby-9.1.7.0
|
33
33
|
gemfile: gemfiles/rails5.gemfile
|
data/CHANGELOG
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
== Unreleased
|
2
2
|
|
3
|
+
== 2.2.8 (2017-09-26)
|
4
|
+
* Rails 5.1 compatibility (#326, #327, #330, @sebjacobs, @bensheldon, @terracatta)
|
5
|
+
|
3
6
|
== 2.2.7 (2016-12-21)
|
4
7
|
* Fix 'base 17' typo, correct id bucketing (#308, @bazzargh)
|
5
8
|
* Update docs about `rebalance_frequency` (#310, @sdhull)
|
data/Gemfile.lock
CHANGED
data/doc/metrics.textile
CHANGED
@@ -93,7 +93,7 @@ Some metrics measure values, not occurrences. For example, this metric measures
|
|
93
93
|
|
94
94
|
<pre>
|
95
95
|
metric "Satisfaction Survey" do
|
96
|
-
description "Measures how
|
96
|
+
description "Measures how satisfied people are with our service."
|
97
97
|
model Survey, :average=>:rating
|
98
98
|
end
|
99
99
|
</pre>
|
@@ -128,7 +128,7 @@ This example tracks when accounts were created or upgraded to unlimited plan:
|
|
128
128
|
metric "Signups (Unlimited)" do
|
129
129
|
description "Signups to our All You Can Eat and Burp Unlimited plan (including upgrades)."
|
130
130
|
Account.after_save do |account|
|
131
|
-
track! if account.plan_type_changed? && account.plan_type == 'unlimited'
|
131
|
+
Vanity.track!(:signup) if account.plan_type_changed? && account.plan_type == 'unlimited'
|
132
132
|
end
|
133
133
|
end
|
134
134
|
</pre>
|
@@ -292,7 +292,7 @@ module Vanity
|
|
292
292
|
|
293
293
|
# Deletes all information about this experiment.
|
294
294
|
def destroy_experiment(experiment)
|
295
|
-
VanityParticipant.
|
295
|
+
VanityParticipant.where(:experiment_id => experiment.to_s).delete_all
|
296
296
|
record = VanityExperiment.find_by_experiment_id(experiment.to_s)
|
297
297
|
record && record.destroy
|
298
298
|
end
|
@@ -44,10 +44,11 @@ module Vanity
|
|
44
44
|
define_method(:vanity_identity_block) { block }
|
45
45
|
define_method(:vanity_identity_method) { method_name }
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
47
|
+
callback_method_name = respond_to?(:before_action) ? :action : :filter
|
48
|
+
send(:"around_#{callback_method_name}", :vanity_context_filter)
|
49
|
+
send(:"before_#{callback_method_name}", :vanity_reload_filter) unless ::Rails.configuration.cache_classes
|
50
|
+
send(:"before_#{callback_method_name}", :vanity_query_parameter_filter)
|
51
|
+
send(:"after_#{callback_method_name}", :vanity_track_filter)
|
51
52
|
end
|
52
53
|
protected :use_vanity
|
53
54
|
end
|
@@ -315,7 +316,7 @@ module Vanity
|
|
315
316
|
# JS callback action used by vanity_js
|
316
317
|
def add_participant
|
317
318
|
if params[:v].nil?
|
318
|
-
|
319
|
+
head 404
|
319
320
|
return
|
320
321
|
end
|
321
322
|
|
@@ -326,14 +327,14 @@ module Vanity
|
|
326
327
|
answer = answer.to_i
|
327
328
|
|
328
329
|
if !exp || !exp.alternatives[answer]
|
329
|
-
|
330
|
+
head 404
|
330
331
|
return
|
331
332
|
end
|
332
333
|
h[exp] = exp.alternatives[answer].value
|
333
334
|
end
|
334
335
|
|
335
336
|
h.each{ |e,a| e.chooses(a, request) }
|
336
|
-
|
337
|
+
head 200
|
337
338
|
end
|
338
339
|
end
|
339
340
|
|
data/lib/vanity/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vanity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Assaf Arkin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -290,7 +290,7 @@ metadata: {}
|
|
290
290
|
post_install_message: To get started run vanity --help
|
291
291
|
rdoc_options:
|
292
292
|
- "--title"
|
293
|
-
- Vanity 2.2.
|
293
|
+
- Vanity 2.2.8
|
294
294
|
- "--main"
|
295
295
|
- README.md
|
296
296
|
- "--webcvs"
|