vanity 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +55 -0
- data/Appraisals +18 -4
- data/CHANGELOG +4 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +9 -9
- data/README.md +3 -3
- data/gemfiles/rails42.gemfile +5 -5
- data/gemfiles/rails42.gemfile.lock +15 -11
- data/gemfiles/rails42_protected_attributes.gemfile +5 -5
- data/gemfiles/rails42_protected_attributes.gemfile.lock +15 -11
- data/gemfiles/rails51.gemfile +6 -6
- data/gemfiles/rails51.gemfile.lock +33 -10
- data/gemfiles/rails52.gemfile +4 -4
- data/gemfiles/rails52.gemfile.lock +37 -12
- data/gemfiles/rails60.gemfile +33 -0
- data/gemfiles/rails60.gemfile.lock +293 -0
- data/gemfiles/rails61.gemfile +33 -0
- data/gemfiles/rails61.gemfile.lock +293 -0
- data/lib/vanity/adapters/active_record_adapter.rb +1 -1
- data/lib/vanity/adapters/redis_adapter.rb +2 -2
- data/lib/vanity/commands/report.rb +4 -3
- data/lib/vanity/frameworks/rails.rb +20 -9
- data/lib/vanity/locales/vanity.ru.yml +50 -0
- data/lib/vanity/templates/_experiment.erb +3 -3
- data/lib/vanity/templates/_experiments.erb +1 -1
- data/lib/vanity/templates/_metrics.erb +1 -1
- data/lib/vanity/templates/_report.erb +2 -2
- data/lib/vanity/version.rb +1 -1
- data/test/dummy/config/initializers/secret_token.rb +5 -2
- data/vanity.gemspec +1 -1
- metadata +12 -7
- data/.travis.yml +0 -31
@@ -0,0 +1,293 @@
|
|
1
|
+
GIT
|
2
|
+
remote: https://github.com/zoltankiss/fastthread.git
|
3
|
+
revision: cefbca3009b9c68df5e473d840462ebcc7fa1504
|
4
|
+
specs:
|
5
|
+
fastthread (1.0.7)
|
6
|
+
|
7
|
+
PATH
|
8
|
+
remote: ..
|
9
|
+
specs:
|
10
|
+
vanity (3.0.1)
|
11
|
+
i18n
|
12
|
+
|
13
|
+
GEM
|
14
|
+
remote: https://rubygems.org/
|
15
|
+
specs:
|
16
|
+
RedCloth (4.2.9)
|
17
|
+
RedCloth (4.2.9-java)
|
18
|
+
actioncable (5.2.0)
|
19
|
+
actionpack (= 5.2.0)
|
20
|
+
nio4r (~> 2.0)
|
21
|
+
websocket-driver (>= 0.6.1)
|
22
|
+
actionmailer (5.2.0)
|
23
|
+
actionpack (= 5.2.0)
|
24
|
+
actionview (= 5.2.0)
|
25
|
+
activejob (= 5.2.0)
|
26
|
+
mail (~> 2.5, >= 2.5.4)
|
27
|
+
rails-dom-testing (~> 2.0)
|
28
|
+
actionpack (5.2.0)
|
29
|
+
actionview (= 5.2.0)
|
30
|
+
activesupport (= 5.2.0)
|
31
|
+
rack (~> 2.0)
|
32
|
+
rack-test (>= 0.6.3)
|
33
|
+
rails-dom-testing (~> 2.0)
|
34
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
35
|
+
actionview (5.2.0)
|
36
|
+
activesupport (= 5.2.0)
|
37
|
+
builder (~> 3.1)
|
38
|
+
erubi (~> 1.4)
|
39
|
+
rails-dom-testing (~> 2.0)
|
40
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
41
|
+
activejob (5.2.0)
|
42
|
+
activesupport (= 5.2.0)
|
43
|
+
globalid (>= 0.3.6)
|
44
|
+
activemodel (5.2.0)
|
45
|
+
activesupport (= 5.2.0)
|
46
|
+
activerecord (5.2.0)
|
47
|
+
activemodel (= 5.2.0)
|
48
|
+
activesupport (= 5.2.0)
|
49
|
+
arel (>= 9.0)
|
50
|
+
activerecord-jdbc-adapter (52.8-java)
|
51
|
+
activerecord (~> 5.2.0)
|
52
|
+
activestorage (5.2.0)
|
53
|
+
actionpack (= 5.2.0)
|
54
|
+
activerecord (= 5.2.0)
|
55
|
+
marcel (~> 0.3.1)
|
56
|
+
activesupport (5.2.0)
|
57
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
58
|
+
i18n (>= 0.7, < 2)
|
59
|
+
minitest (~> 5.1)
|
60
|
+
tzinfo (~> 1.1)
|
61
|
+
addressable (2.5.2)
|
62
|
+
public_suffix (>= 2.0.2, < 4.0)
|
63
|
+
appraisal (2.0.2)
|
64
|
+
bundler
|
65
|
+
rake
|
66
|
+
thor (>= 0.14.0)
|
67
|
+
arel (9.0.0)
|
68
|
+
blankslate (2.1.2.4)
|
69
|
+
bson (4.3.0)
|
70
|
+
bson (4.3.0-java)
|
71
|
+
builder (3.2.3)
|
72
|
+
classifier-reborn (2.2.0)
|
73
|
+
fast-stemmer (~> 1.0)
|
74
|
+
coderay (1.1.2)
|
75
|
+
coffee-script (2.4.1)
|
76
|
+
coffee-script-source
|
77
|
+
execjs
|
78
|
+
coffee-script-source (1.11.1)
|
79
|
+
colorator (0.1)
|
80
|
+
concurrent-ruby (1.0.5)
|
81
|
+
concurrent-ruby (1.0.5-java)
|
82
|
+
crack (0.4.3)
|
83
|
+
safe_yaml (~> 1.0.0)
|
84
|
+
crass (1.0.4)
|
85
|
+
daemon_controller (1.2.0)
|
86
|
+
erubi (1.7.1)
|
87
|
+
execjs (2.7.0)
|
88
|
+
fakefs (0.18.0)
|
89
|
+
faraday (0.15.2)
|
90
|
+
multipart-post (>= 1.2, < 3)
|
91
|
+
fast-stemmer (1.0.2)
|
92
|
+
ffi (1.15.5)
|
93
|
+
ffi (1.15.5-java)
|
94
|
+
garb (0.9.1)
|
95
|
+
activesupport (>= 2.2.0)
|
96
|
+
crack (>= 0.1.6)
|
97
|
+
globalid (0.4.1)
|
98
|
+
activesupport (>= 4.2.0)
|
99
|
+
hashdiff (0.3.7)
|
100
|
+
i18n (1.0.1)
|
101
|
+
concurrent-ruby (~> 1.0)
|
102
|
+
integration (0.1.0)
|
103
|
+
jdbc-sqlite3 (3.28.0)
|
104
|
+
jekyll (2.5.3)
|
105
|
+
classifier-reborn (~> 2.0)
|
106
|
+
colorator (~> 0.1)
|
107
|
+
jekyll-coffeescript (~> 1.0)
|
108
|
+
jekyll-gist (~> 1.0)
|
109
|
+
jekyll-paginate (~> 1.0)
|
110
|
+
jekyll-sass-converter (~> 1.0)
|
111
|
+
jekyll-watch (~> 1.1)
|
112
|
+
kramdown (~> 1.3)
|
113
|
+
liquid (~> 2.6.1)
|
114
|
+
mercenary (~> 0.3.3)
|
115
|
+
pygments.rb (~> 0.6.0)
|
116
|
+
redcarpet (~> 3.1)
|
117
|
+
safe_yaml (~> 1.0)
|
118
|
+
toml (~> 0.1.0)
|
119
|
+
jekyll-coffeescript (1.1.1)
|
120
|
+
coffee-script (~> 2.2)
|
121
|
+
coffee-script-source (~> 1.11.1)
|
122
|
+
jekyll-gist (1.5.0)
|
123
|
+
octokit (~> 4.2)
|
124
|
+
jekyll-paginate (1.1.0)
|
125
|
+
jekyll-sass-converter (1.5.2)
|
126
|
+
sass (~> 3.4)
|
127
|
+
jekyll-watch (1.5.1)
|
128
|
+
listen (~> 3.0)
|
129
|
+
kramdown (1.17.0)
|
130
|
+
liquid (2.6.3)
|
131
|
+
listen (3.1.5)
|
132
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
133
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
134
|
+
ruby_dep (~> 1.2)
|
135
|
+
loofah (2.2.2)
|
136
|
+
crass (~> 1.0.2)
|
137
|
+
nokogiri (>= 1.5.9)
|
138
|
+
mail (2.7.0)
|
139
|
+
mini_mime (>= 0.1.1)
|
140
|
+
marcel (0.3.3)
|
141
|
+
mimemagic (~> 0.3.2)
|
142
|
+
mercenary (0.3.6)
|
143
|
+
method_source (0.9.0)
|
144
|
+
mimemagic (0.3.10)
|
145
|
+
nokogiri (~> 1)
|
146
|
+
rake
|
147
|
+
mini_mime (1.0.0)
|
148
|
+
mini_portile2 (2.6.1)
|
149
|
+
minitest (5.11.3)
|
150
|
+
mocha (1.13.0)
|
151
|
+
mongo (2.6.1)
|
152
|
+
bson (>= 4.3.0, < 5.0.0)
|
153
|
+
multipart-post (2.0.0)
|
154
|
+
nio4r (2.3.1)
|
155
|
+
nio4r (2.3.1-java)
|
156
|
+
nokogiri (1.12.5)
|
157
|
+
mini_portile2 (~> 2.6.1)
|
158
|
+
racc (~> 1.4)
|
159
|
+
nokogiri (1.12.5-java)
|
160
|
+
racc (~> 1.4)
|
161
|
+
octokit (4.9.0)
|
162
|
+
sawyer (~> 0.8.0, >= 0.5.3)
|
163
|
+
parslet (1.5.0)
|
164
|
+
blankslate (~> 2.0)
|
165
|
+
passenger (3.0.21)
|
166
|
+
daemon_controller (>= 1.0.0)
|
167
|
+
fastthread (>= 1.0.1)
|
168
|
+
rack
|
169
|
+
rake (>= 0.8.1)
|
170
|
+
posix-spawn (0.3.13)
|
171
|
+
pry (0.11.3)
|
172
|
+
coderay (~> 1.1.0)
|
173
|
+
method_source (~> 0.9.0)
|
174
|
+
pry (0.11.3-java)
|
175
|
+
coderay (~> 1.1.0)
|
176
|
+
method_source (~> 0.9.0)
|
177
|
+
spoon (~> 0.0)
|
178
|
+
public_suffix (3.0.2)
|
179
|
+
pygments.rb (0.6.3)
|
180
|
+
posix-spawn (~> 0.3.6)
|
181
|
+
yajl-ruby (~> 1.2.0)
|
182
|
+
racc (1.6.0)
|
183
|
+
racc (1.6.0-java)
|
184
|
+
rack (2.0.5)
|
185
|
+
rack-test (1.1.0)
|
186
|
+
rack (>= 1.0, < 3)
|
187
|
+
rails (5.2.0)
|
188
|
+
actioncable (= 5.2.0)
|
189
|
+
actionmailer (= 5.2.0)
|
190
|
+
actionpack (= 5.2.0)
|
191
|
+
actionview (= 5.2.0)
|
192
|
+
activejob (= 5.2.0)
|
193
|
+
activemodel (= 5.2.0)
|
194
|
+
activerecord (= 5.2.0)
|
195
|
+
activestorage (= 5.2.0)
|
196
|
+
activesupport (= 5.2.0)
|
197
|
+
bundler (>= 1.3.0)
|
198
|
+
railties (= 5.2.0)
|
199
|
+
sprockets-rails (>= 2.0.0)
|
200
|
+
rails-dom-testing (2.0.3)
|
201
|
+
activesupport (>= 4.2.0)
|
202
|
+
nokogiri (>= 1.6)
|
203
|
+
rails-html-sanitizer (1.0.4)
|
204
|
+
loofah (~> 2.2, >= 2.2.2)
|
205
|
+
railties (5.2.0)
|
206
|
+
actionpack (= 5.2.0)
|
207
|
+
activesupport (= 5.2.0)
|
208
|
+
method_source
|
209
|
+
rake (>= 0.8.7)
|
210
|
+
thor (>= 0.18.1, < 2.0)
|
211
|
+
rake (12.3.1)
|
212
|
+
rb-fsevent (0.10.3)
|
213
|
+
rb-inotify (0.9.10)
|
214
|
+
ffi (>= 0.5.0, < 2)
|
215
|
+
redcarpet (3.4.0)
|
216
|
+
redis (4.0.1)
|
217
|
+
redis-namespace (1.6.0)
|
218
|
+
redis (>= 3.0.4)
|
219
|
+
ruby_dep (1.5.0)
|
220
|
+
rubystats (0.3.0)
|
221
|
+
safe_yaml (1.0.4)
|
222
|
+
sass (3.5.7)
|
223
|
+
sass-listen (~> 4.0.0)
|
224
|
+
sass-listen (4.0.0)
|
225
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
226
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
227
|
+
sawyer (0.8.1)
|
228
|
+
addressable (>= 2.3.5, < 2.6)
|
229
|
+
faraday (~> 0.8, < 1.0)
|
230
|
+
spoon (0.0.6)
|
231
|
+
ffi
|
232
|
+
sprockets (3.7.2)
|
233
|
+
concurrent-ruby (~> 1.0)
|
234
|
+
rack (> 1, < 3)
|
235
|
+
sprockets-rails (3.2.1)
|
236
|
+
actionpack (>= 4.0)
|
237
|
+
activesupport (>= 4.0)
|
238
|
+
sprockets (>= 3.0.0)
|
239
|
+
sqlite3 (1.3.10)
|
240
|
+
thor (0.20.0)
|
241
|
+
thread_safe (0.3.6)
|
242
|
+
thread_safe (0.3.6-java)
|
243
|
+
timecop (0.9.1)
|
244
|
+
toml (0.1.2)
|
245
|
+
parslet (~> 1.5.0)
|
246
|
+
tzinfo (1.2.5)
|
247
|
+
thread_safe (~> 0.1)
|
248
|
+
webmock (3.4.2)
|
249
|
+
addressable (>= 2.3.6)
|
250
|
+
crack (>= 0.3.2)
|
251
|
+
hashdiff
|
252
|
+
websocket-driver (0.7.0)
|
253
|
+
websocket-extensions (>= 0.1.0)
|
254
|
+
websocket-driver (0.7.0-java)
|
255
|
+
websocket-extensions (>= 0.1.0)
|
256
|
+
websocket-extensions (0.1.3)
|
257
|
+
yajl-ruby (1.2.3)
|
258
|
+
yard (0.9.15)
|
259
|
+
|
260
|
+
PLATFORMS
|
261
|
+
java
|
262
|
+
ruby
|
263
|
+
|
264
|
+
DEPENDENCIES
|
265
|
+
RedCloth
|
266
|
+
activerecord-jdbc-adapter
|
267
|
+
appraisal (~> 2.0)
|
268
|
+
bundler (>= 1.8.0)
|
269
|
+
fakefs
|
270
|
+
fastthread!
|
271
|
+
garb (< 0.9.2)
|
272
|
+
integration (<= 0.1.0)
|
273
|
+
jdbc-sqlite3
|
274
|
+
jekyll (~> 2.5.3)
|
275
|
+
minitest (>= 4.2)
|
276
|
+
mocha (~> 1.0)
|
277
|
+
mongo (~> 2.1)
|
278
|
+
passenger (~> 3.0)
|
279
|
+
pry
|
280
|
+
rack
|
281
|
+
rails (~> 5.2.0)
|
282
|
+
rake
|
283
|
+
redis (>= 3.2.1)
|
284
|
+
redis-namespace (>= 1.1.0)
|
285
|
+
rubystats (>= 0.2.5)
|
286
|
+
sqlite3 (~> 1.3.10)
|
287
|
+
timecop
|
288
|
+
vanity!
|
289
|
+
webmock
|
290
|
+
yard
|
291
|
+
|
292
|
+
BUNDLED WITH
|
293
|
+
1.17.2
|
@@ -105,7 +105,7 @@ module Vanity
|
|
105
105
|
retried = false
|
106
106
|
begin
|
107
107
|
if record = VanityParticipant.where(:experiment_id => experiment.to_s, :identity => identity.to_s).first
|
108
|
-
record.
|
108
|
+
record.update(update_with) if update_with
|
109
109
|
elsif create
|
110
110
|
record = VanityParticipant.create({ :experiment_id => experiment.to_s, :identity => identity.to_s }.merge(update_with || {}))
|
111
111
|
end
|
@@ -18,7 +18,7 @@ module Vanity
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def valid_redis_namespace_version?
|
21
|
-
Gem.loaded_specs['redis'].version >= Gem::Version.create('1.1.0')
|
21
|
+
Gem.loaded_specs['redis-namespace'].version >= Gem::Version.create('1.1.0')
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -141,7 +141,7 @@ module Vanity
|
|
141
141
|
def ab_counts(experiment, alternative)
|
142
142
|
{
|
143
143
|
:participants => @experiments.scard("#{experiment}:alts:#{alternative}:participants").to_i,
|
144
|
-
|
144
|
+
:converted => @experiments.scard("#{experiment}:alts:#{alternative}:converted").to_i,
|
145
145
|
:conversions => @experiments.get("#{experiment}:alts:#{alternative}:conversions").to_i
|
146
146
|
}
|
147
147
|
end
|
@@ -11,7 +11,7 @@ module Vanity
|
|
11
11
|
def render(path_or_options, locals = {})
|
12
12
|
if path_or_options.respond_to?(:keys)
|
13
13
|
render_erb(
|
14
|
-
path_or_options[:
|
14
|
+
path_or_options[:template] || path_or_options[:partial],
|
15
15
|
path_or_options[:locals]
|
16
16
|
)
|
17
17
|
else
|
@@ -54,9 +54,10 @@ module Vanity
|
|
54
54
|
struct = Struct.new(*keys)
|
55
55
|
struct.send :include, Render
|
56
56
|
locals = struct.new(*locals.values_at(*keys))
|
57
|
+
path = "#{Vanity.template(path)}.erb" unless path =~ /\/.*\.erb\z/
|
57
58
|
dir, base = File.split(path)
|
58
59
|
path = File.join(dir, partialize(base))
|
59
|
-
erb = ERB.new(File.read(
|
60
|
+
erb = ERB.new(File.read(path), nil, '<>')
|
60
61
|
erb.filename = path
|
61
62
|
erb.result(locals.instance_eval { binding })
|
62
63
|
end
|
@@ -78,7 +79,7 @@ module Vanity
|
|
78
79
|
# Generate an HTML report. Outputs to the named file, or stdout with no
|
79
80
|
# arguments.
|
80
81
|
def report(output = nil)
|
81
|
-
html = render(Vanity.template("
|
82
|
+
html = render(Vanity.template("_report.erb"),
|
82
83
|
:experiments=>Vanity.playground.experiments,
|
83
84
|
:experiments_persisted=>Vanity.playground.experiments_persisted?,
|
84
85
|
:metrics=>Vanity.playground.metrics
|
@@ -251,7 +251,7 @@ module Vanity
|
|
251
251
|
def vanity_js
|
252
252
|
return if Vanity.context.vanity_active_experiments.nil? || Vanity.context.vanity_active_experiments.empty?
|
253
253
|
javascript_tag do
|
254
|
-
render :file => Vanity.template("_vanity"), :formats => [:js]
|
254
|
+
render :file => Vanity.template("_vanity.js.erb"), :formats => [:js]
|
255
255
|
end
|
256
256
|
end
|
257
257
|
|
@@ -348,8 +348,13 @@ module Vanity
|
|
348
348
|
#
|
349
349
|
# Step 3: Open your browser to http://localhost:3000/vanity
|
350
350
|
module Dashboard
|
351
|
+
def set_vanity_view_path
|
352
|
+
prepend_view_path Vanity.template('')
|
353
|
+
end
|
354
|
+
|
351
355
|
def index
|
352
|
-
|
356
|
+
set_vanity_view_path
|
357
|
+
render :template=>"_report", :content_type=>Mime[:html], :locals=>{
|
353
358
|
:experiments=>Vanity.playground.experiments,
|
354
359
|
:experiments_persisted=>Vanity.playground.experiments_persisted?,
|
355
360
|
:metrics=>Vanity.playground.metrics
|
@@ -357,46 +362,52 @@ module Vanity
|
|
357
362
|
end
|
358
363
|
|
359
364
|
def participant
|
360
|
-
|
365
|
+
set_vanity_view_path
|
366
|
+
render :template=>"_participant", :locals=>{:participant_id => params[:id], :participant_info => Vanity.playground.participant_info(params[:id])}, :content_type=>Mime[:html]
|
361
367
|
end
|
362
368
|
|
363
369
|
def complete
|
370
|
+
set_vanity_view_path
|
364
371
|
exp = Vanity.playground.experiment(params[:e].to_sym)
|
365
372
|
alt = exp.alternatives[params[:a].to_i]
|
366
373
|
confirmed = params[:confirmed]
|
367
374
|
# make the user confirm before completing an experiment
|
368
375
|
if confirmed && confirmed.to_i==alt.id && exp.active?
|
369
376
|
exp.complete!(alt.id)
|
370
|
-
render :
|
377
|
+
render :template=>"_experiment", :locals=>{:experiment=>exp}
|
371
378
|
else
|
372
379
|
@to_confirm = alt.id
|
373
|
-
render :
|
380
|
+
render :template=>"_experiment", :locals=>{:experiment=>exp}
|
374
381
|
end
|
375
382
|
end
|
376
383
|
|
377
384
|
def disable
|
385
|
+
set_vanity_view_path
|
378
386
|
exp = Vanity.playground.experiment(params[:e].to_sym)
|
379
387
|
exp.enabled = false
|
380
|
-
render :
|
388
|
+
render :template=>"_experiment", :locals=>{:experiment=>exp}
|
381
389
|
end
|
382
390
|
|
383
391
|
def enable
|
392
|
+
set_vanity_view_path
|
384
393
|
exp = Vanity.playground.experiment(params[:e].to_sym)
|
385
394
|
exp.enabled = true
|
386
|
-
render :
|
395
|
+
render :template=>"_experiment", :locals=>{:experiment=>exp}
|
387
396
|
end
|
388
397
|
|
389
398
|
def chooses
|
399
|
+
set_vanity_view_path
|
390
400
|
exp = Vanity.playground.experiment(params[:e].to_sym)
|
391
401
|
exp.chooses(exp.alternatives[params[:a].to_i].value)
|
392
|
-
render :
|
402
|
+
render :template=>"_experiment", :locals=>{:experiment=>exp}
|
393
403
|
end
|
394
404
|
|
395
405
|
def reset
|
406
|
+
set_vanity_view_path
|
396
407
|
exp = Vanity.playground.experiment(params[:e].to_sym)
|
397
408
|
exp.reset
|
398
409
|
flash[:notice] = I18n.t 'vanity.experiment_has_been_reset', name: exp.name
|
399
|
-
render :
|
410
|
+
render :template=>"_experiment", :locals=>{:experiment=>exp}
|
400
411
|
end
|
401
412
|
|
402
413
|
include AddParticipant
|
@@ -0,0 +1,50 @@
|
|
1
|
+
ru:
|
2
|
+
vanity:
|
3
|
+
act_on_this_experiment:
|
4
|
+
enable: 'Включить этот эксперимент'
|
5
|
+
disable: 'Выключить этот эксперимент'
|
6
|
+
best_alternative: '(%{probability}% это лучшая альтернатива)'
|
7
|
+
best_alternative_is_significant: 'С %{probability}% вероятностью этот результат является статистически значимым.'
|
8
|
+
best_alternative_probability: 'С %{probability}% вероятностью этот результат является самым лучшим.'
|
9
|
+
best_alternative_measure: 'Самый лучший выбор %{best_alternative}: он конвертирован в %{measure}% %{better_than}.'
|
10
|
+
better_alternative_than: '(%{probability}% лучше чем %{alternative})'
|
11
|
+
choose_experiment: 'Показать мне этот вариант прямо сейчас'
|
12
|
+
complete_and_confirm_experiment: 'Подтвердите завершение эксперимента и назначение всех нынешних и будущих участников, %{name}'
|
13
|
+
complete_and_confirm_experiment_label: 'Завершить этот эксперимент и назначить всех нынешних и будущих участников %{name}?'
|
14
|
+
complete_experiment: 'Завершить эксперимент и назначить всех нынешних и будущих участников %{name}'
|
15
|
+
completed_at: 'Завершено %{timestamp}'
|
16
|
+
confirm: 'подтвердить'
|
17
|
+
converted: '%{count} конвертировано'
|
18
|
+
converted_percentage: '%{alternative} конвертировано в %{percentage}%.'
|
19
|
+
currently_shown: 'сейчас отображено'
|
20
|
+
default: '(Default)'
|
21
|
+
didnt_convert: '%{alternative} невозможно конвертировать.'
|
22
|
+
disable: 'Отключить'
|
23
|
+
disabled: 'Отключено'
|
24
|
+
enable: 'Включить'
|
25
|
+
enabled: 'Включено'
|
26
|
+
experiment_has_been_reset: '%{name} эксперимент был сброшен.'
|
27
|
+
experiment_has_been_disabled: 'Этот эксперимент в данное время отключен и всегда будет выбираться по умолчанию %{name}.'
|
28
|
+
experiment_participants:
|
29
|
+
one: 'В этом эксперименте один участник.'
|
30
|
+
other: 'В этом эксперименте %{count} участников.'
|
31
|
+
experiments: 'Эксперименты'
|
32
|
+
experiments_out_of_sync: "Кэшированные эксперименты Vanity не синхронизированы с экспериментами в файловой системе и / или в хранилище данных. Перезапустите сервер и / или включите сбор."
|
33
|
+
generated_by: 'Создан с помощью %{link}'
|
34
|
+
low_result_confidence: 'Полученный результат не является надежным, предлагаю продолжить этот эксперимент.'
|
35
|
+
make_permanent: 'сделать постоянным'
|
36
|
+
metrics: 'Метрики'
|
37
|
+
no_clear_winner: 'Этот эксперимент не длился достаточно долго, чтобы найти явного победителя.'
|
38
|
+
no_participants: 'В этом эксперименте пока нет участников.'
|
39
|
+
not_collecting_data: 'Vanity в данный момент не собирает данные и метрики. Чтобы включить сбор данных, установите %{setting} в %{file}.'
|
40
|
+
option_number: 'выбор %{char}'
|
41
|
+
participant_taking_part_on: 'Участник с идентификатором %{participant_id} принимает участие в следующих экспериментах:'
|
42
|
+
participants:
|
43
|
+
one: '1 участник'
|
44
|
+
other: '%{count} участников'
|
45
|
+
reset: 'Сбросить'
|
46
|
+
report: 'Отчет Vanity: %{timestamp}'
|
47
|
+
result_isnt_significant: 'Полученный результат не является статистически важным, предлагаю продолжить этот эксперимент.'
|
48
|
+
selected_as_best: '%{alternative} выбран в качестве лучшей альтернативы.'
|
49
|
+
show_me: 'показать мне'
|
50
|
+
started_at: 'Начато %{timestamp}'
|
@@ -9,13 +9,13 @@
|
|
9
9
|
<% if experiment.type == 'ab_test' && experiment.active? && experiment.playground.collecting? %>
|
10
10
|
<span class='enabled-links'>
|
11
11
|
<% action = experiment.enabled? ? :disable : :enable %>
|
12
|
-
|
12
|
+
|
13
13
|
<% if experiment.enabled? %> <%= I18n.t( 'vanity.enabled' ) %> | <% end %>
|
14
14
|
<a title='<%=I18n.t( action, scope: 'vanity.act_on_this_experiment' )%>' href='#'
|
15
15
|
data-id='<%= experiment.id %>' data-url='<%= url_for(:action=>action, :e => experiment.id) %>'>
|
16
16
|
<%= action %></a>
|
17
17
|
<% if !experiment.enabled? %> | <%= I18n.t( 'vanity.disabled' ) %> <% end %>
|
18
|
-
|
18
|
+
|
19
19
|
</span>
|
20
20
|
<% end %>
|
21
21
|
</h3>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
</p>
|
27
27
|
<% end %>
|
28
28
|
<a class="button reset" title="<%= I18n.t('vanity.reset') %>" href="#" data-id="<%= experiment.id %>" data-url="<%= url_for(:action=>:reset, :e=>experiment.id) %>"><%= I18n.t 'vanity.reset' %></a>
|
29
|
-
<%= render :
|
29
|
+
<%= render :template => "_" + experiment.type, :locals => {:experiment => experiment} %>
|
30
30
|
<p class="meta">
|
31
31
|
<%= I18n.t('vanity.started_at', :timestamp=>I18n.l(experiment.created_at, :format=>'%a, %b %d')) %>
|
32
32
|
<%= ' | '+I18n.t('vanity.completed_at', :timestamp=>I18n.l(experiment.completed_at, :format=>'%a, %b %d')) unless experiment.active? %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<ul class="experiments">
|
2
2
|
<% experiments.sort_by{|id, experiment| experiment.created_at}.sort_by{ |id, experiment| experiment.name }.reverse.each do |id, experiment| %>
|
3
3
|
<li class="experiment <%= experiment.type %>" id="experiment_<%=vanity_h id.to_s %>">
|
4
|
-
<%= render :
|
4
|
+
<%= render :template=>"_experiment", :locals => { :id => id, :experiment => experiment } %>
|
5
5
|
</li>
|
6
6
|
<% end %>
|
7
7
|
</ul>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<ul class="metrics">
|
2
2
|
<% metrics.sort_by { |id, metric| metric.name }.each do |id, metric| %>
|
3
3
|
<li class="metric" id="metric_<%= id %>">
|
4
|
-
<%= render :
|
4
|
+
<%= render :template=>"_metric", :locals=>{:id=>id, :metric=>metric} %>
|
5
5
|
</li>
|
6
6
|
<% end %>
|
7
7
|
</ul>
|
@@ -22,12 +22,12 @@
|
|
22
22
|
<% if experiments_persisted %>
|
23
23
|
<% if experiments.present? %>
|
24
24
|
<h2><%= I18n.t 'vanity.experiments' %></h2>
|
25
|
-
<%= render :
|
25
|
+
<%= render :template=>"_experiments", :locals=>{:experiments=>experiments} %>
|
26
26
|
<% end %>
|
27
27
|
|
28
28
|
<% unless metrics.empty? %>
|
29
29
|
<h2><%= I18n.t 'vanity.metrics' %></h2>
|
30
|
-
<%= render :
|
30
|
+
<%= render :template=>"_metrics", :locals=>{:metrics=>metrics, :experiments=>experiments} %>
|
31
31
|
<% end %>
|
32
32
|
<% else %>
|
33
33
|
<div class="alert persistance">
|
data/lib/vanity/version.rb
CHANGED
@@ -4,5 +4,8 @@
|
|
4
4
|
# If you change this key, all old signed cookies will become invalid!
|
5
5
|
# Make sure the secret is at least 30 characters and all random,
|
6
6
|
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
-
Dummy::Application.config.
|
8
|
-
Dummy::Application.config.secret_key_base = 'secret'
|
7
|
+
if Dummy::Application.config.respond_to?(:secret_key_base=)
|
8
|
+
Dummy::Application.config.secret_key_base = 'secret'
|
9
|
+
else
|
10
|
+
Dummy::Application.config.secret_token = '33ccbc9a29f3b02e87c08904505b1c9a3a1e97dd01f02e598e65ee9e7b96fff2ca4a6d0dd7c4a8d3682d8c64f84d372661e141264e70697dc576c722c72d80d0'
|
11
|
+
end
|
data/vanity.gemspec
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
|
28
28
|
spec.add_development_dependency "bundler", ">= 1.8.0"
|
29
29
|
spec.add_development_dependency "minitest", ">= 4.2"
|
30
|
-
spec.add_development_dependency "appraisal", "~> 2.0
|
30
|
+
spec.add_development_dependency "appraisal", "~> 2.0"
|
31
31
|
spec.add_development_dependency "timecop"
|
32
32
|
spec.add_development_dependency "webmock"
|
33
33
|
spec.add_development_dependency "fakefs"
|
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: 3.0.
|
4
|
+
version: 3.0.1
|
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: 2022-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.0
|
61
|
+
version: '2.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 2.0
|
68
|
+
version: '2.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: timecop
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,8 +131,8 @@ extra_rdoc_files:
|
|
131
131
|
- README.md
|
132
132
|
- CHANGELOG
|
133
133
|
files:
|
134
|
+
- ".github/workflows/test.yml"
|
134
135
|
- ".gitignore"
|
135
|
-
- ".travis.yml"
|
136
136
|
- Appraisals
|
137
137
|
- CHANGELOG
|
138
138
|
- Gemfile
|
@@ -175,6 +175,10 @@ files:
|
|
175
175
|
- gemfiles/rails51.gemfile.lock
|
176
176
|
- gemfiles/rails52.gemfile
|
177
177
|
- gemfiles/rails52.gemfile.lock
|
178
|
+
- gemfiles/rails60.gemfile
|
179
|
+
- gemfiles/rails60.gemfile.lock
|
180
|
+
- gemfiles/rails61.gemfile
|
181
|
+
- gemfiles/rails61.gemfile.lock
|
178
182
|
- lib/generators/templates/add_participants_unique_index_migration.rb.erb
|
179
183
|
- lib/generators/templates/add_unique_indexes_migration.rb.erb
|
180
184
|
- lib/generators/templates/vanity_migration.rb.erb
|
@@ -204,6 +208,7 @@ files:
|
|
204
208
|
- lib/vanity/locales/vanity.en.yml
|
205
209
|
- lib/vanity/locales/vanity.nb.yml
|
206
210
|
- lib/vanity/locales/vanity.pt-BR.yml
|
211
|
+
- lib/vanity/locales/vanity.ru.yml
|
207
212
|
- lib/vanity/metric/active_record.rb
|
208
213
|
- lib/vanity/metric/base.rb
|
209
214
|
- lib/vanity/metric/google_analytics.rb
|
@@ -290,7 +295,7 @@ metadata: {}
|
|
290
295
|
post_install_message: To get started run vanity --help
|
291
296
|
rdoc_options:
|
292
297
|
- "--title"
|
293
|
-
- Vanity 3.0.
|
298
|
+
- Vanity 3.0.1
|
294
299
|
- "--main"
|
295
300
|
- README.md
|
296
301
|
- "--webcvs"
|
@@ -309,7 +314,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
309
314
|
version: '0'
|
310
315
|
requirements: []
|
311
316
|
rubyforge_project:
|
312
|
-
rubygems_version: 2.7.
|
317
|
+
rubygems_version: 2.7.6.3
|
313
318
|
signing_key:
|
314
319
|
specification_version: 4
|
315
320
|
summary: Experience Driven Development framework for Ruby
|