field_test 0.4.0 → 0.4.1

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
  SHA256:
3
- metadata.gz: 96def1c6805d880a03c141a421570a3e4b9f912e9427c385b132ffae646bc74b
4
- data.tar.gz: b6eb3262d522544a40db7169364ebef0f6d9f4d2f1f4c82712c91fec5a617a4f
3
+ metadata.gz: 25a516eac00c5ded25aa203d9e3feb89196c7641868e5575938bf223ee8d20d2
4
+ data.tar.gz: 89dc335addf645088c5251ccd7a99b0d5348857a210c520350a3d39a9244fc3f
5
5
  SHA512:
6
- metadata.gz: 35765af19297887bae1e807aeff9f4f741687b4c3fc961b6b91a6aa9c3060098f42bb677d1055309b2698377dd6694c24770e8ab0418fa4c675146c1661559c0
7
- data.tar.gz: 786390b24efece6a99b5db602b6b0162a2b398b319f42e61c8b0db4aca021fb4b80fba65ecfa5c5d94ebb451b7b1c852c25983e72246a3aa4640dc41613963a1
6
+ metadata.gz: 97c5900ff54996e5b31250b882300104c991e93ab4582b30e1a2ada4fb0c8f191ddbac9240941fce9d2160bf01a66ca1ed73cd3e4a5a734de99e487b9c0c3772
7
+ data.tar.gz: 765b5fbb1928889ff40b576b710b93ffe14adc38d6153715b89d806cbcfa46021fb4d0cc780754a1e794d3ad2ccbcb8f939dff72a148392ae95a0b968cb7d443
@@ -1,6 +1,10 @@
1
+ ## 0.4.1 (2020-09-07)
2
+
3
+ - Use `datetime` type in migration
4
+
1
5
  ## 0.4.0 (2020-08-04)
2
6
 
3
- - Fixed CSRF vulnerability with non-session based authentication
7
+ - Fixed CSRF vulnerability with non-session based authentication - [more info](https://github.com/ankane/field_test/issues/28)
4
8
  - Fixed cache key for requests
5
9
 
6
10
  ## 0.3.2 (2020-04-16)
@@ -16,7 +20,7 @@
16
20
 
17
21
  Security
18
22
 
19
- - Fixed arbitrary variants via query parameters - see [#17](https://github.com/ankane/field_test/issues/17)
23
+ - Fixed arbitrary variants via query parameters - [more info](https://github.com/ankane/field_test/issues/17)
20
24
 
21
25
  ## 0.3.0 (2019-06-02)
22
26
 
data/README.md CHANGED
@@ -160,7 +160,7 @@ experiment = FieldTest::Experiment.find(:button_color)
160
160
  button_color = experiment.variant(user)
161
161
  ```
162
162
 
163
- ## Config
163
+ ## Exclusions
164
164
 
165
165
  By default, bots are returned the first variant and excluded from metrics. Change this with:
166
166
 
@@ -178,6 +178,14 @@ exclude:
178
178
  - 10.0.0.0/8
179
179
  ```
180
180
 
181
+ You can also use custom logic:
182
+
183
+ ```ruby
184
+ field_test(:button_color, exclude: request.user_agent == "Test")
185
+ ```
186
+
187
+ ## Config
188
+
181
189
  Keep track of when experiments started and ended. Use any format `Time.parse` accepts. Variants assigned outside this window are not included in metrics.
182
190
 
183
191
  ```yml
@@ -1,3 +1,3 @@
1
1
  module FieldTest
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -3,7 +3,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version
3
3
  create_table :field_test_events do |t|
4
4
  t.references :field_test_membership
5
5
  t.string :name
6
- t.timestamp :created_at
6
+ t.datetime :created_at
7
7
  end
8
8
  end
9
9
  end
@@ -5,7 +5,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version
5
5
  t.string :participant_id
6
6
  t.string :experiment
7
7
  t.string :variant
8
- t.timestamp :created_at
8
+ t.datetime :created_at
9
9
  t.boolean :converted, default: false
10
10
  end
11
11
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: field_test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-04 00:00:00.000000000 Z
11
+ date: 2020-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties