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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 30ab64490eb076e3145a45d198b65778073979d6
4
- data.tar.gz: 318343bcd0ba889d85cef2c4a3e8cf7b95ac8d78
3
+ metadata.gz: 32b2be75e4a14bf3ce84ba1a49f3ae8b86e6fcf6
4
+ data.tar.gz: 40c8689393515ddd853df28130eace503b1327cb
5
5
  SHA512:
6
- metadata.gz: 08ac7419f74bb5282753cf8f5303de34eea8b6bb91c9c9a2483d40d9b23475864940db3f64f27887409ff7bb98676a0c685e0847a6064f068c4402e366fe222a
7
- data.tar.gz: 044f52924d4c36026360db12f36585517267ddeb3149a0858a8204c906966252144c6a9c4360aa6a03aba5aabf41ee0710e021bc026c927bac1a0b1045714b71
6
+ metadata.gz: 91931eacb3c34fdf4e9caa8c1ca98b62f0e3cbfd521a58ace103eec63177d28fcfe64646db79d25bb1daeac93dda0814c02dc8d665d2509ccaed30a00c230493
7
+ data.tar.gz: 1604cd40d0e73ac1e26a0ba5eebbeaba98e5efa03e23bb50dde6d279325302e8881852808470c3b170b98345d6f36f6d457fdebd4f578404c7b5620f3a1650fb
@@ -14,7 +14,7 @@ rvm:
14
14
  - 2.1
15
15
  - 2.2.2
16
16
  - 2.3.0
17
- - jruby-19mode
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-19mode
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)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vanity (2.2.7)
4
+ vanity (2.2.8)
5
5
  i18n
6
6
 
7
7
  GEM
@@ -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 many people signed up for our awesome service."
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>
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: ..
9
9
  specs:
10
- vanity (2.2.7)
10
+ vanity (2.2.8)
11
11
  i18n
12
12
 
13
13
  GEM
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: .././
9
9
  specs:
10
- vanity (2.2.7)
10
+ vanity (2.2.8)
11
11
  i18n
12
12
 
13
13
  GEM
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: ..
9
9
  specs:
10
- vanity (2.2.7)
10
+ vanity (2.2.8)
11
11
  i18n
12
12
 
13
13
  GEM
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: ../
9
9
  specs:
10
- vanity (2.2.7)
10
+ vanity (2.2.8)
11
11
  i18n
12
12
 
13
13
  GEM
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: ../
9
9
  specs:
10
- vanity (2.2.7)
10
+ vanity (2.2.8)
11
11
  i18n
12
12
 
13
13
  GEM
@@ -292,7 +292,7 @@ module Vanity
292
292
 
293
293
  # Deletes all information about this experiment.
294
294
  def destroy_experiment(experiment)
295
- VanityParticipant.delete_all(:experiment_id => experiment.to_s)
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
- around_filter :vanity_context_filter
48
- before_filter :vanity_reload_filter unless ::Rails.configuration.cache_classes
49
- before_filter :vanity_query_parameter_filter
50
- after_filter :vanity_track_filter
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
- render :status => 404, :nothing => true
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
- render :status => 404, :nothing => true
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
- render :status => 200, :nothing => true
337
+ head 200
337
338
  end
338
339
  end
339
340
 
@@ -1,5 +1,5 @@
1
1
  module Vanity
2
- VERSION = "2.2.7"
2
+ VERSION = "2.2.8"
3
3
 
4
4
  module Version
5
5
  version = VERSION.to_s.split(".").map { |i| i.to_i }
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.7
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: 2016-12-21 00:00:00.000000000 Z
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.7
293
+ - Vanity 2.2.8
294
294
  - "--main"
295
295
  - README.md
296
296
  - "--webcvs"