vanity 2.2.10 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/test.yml +55 -0
- data/Appraisals +24 -20
- data/CHANGELOG +19 -1
- data/Gemfile +2 -1
- data/Gemfile.lock +23 -15
- data/README.md +14 -16
- data/gemfiles/rails42.gemfile +6 -6
- data/gemfiles/rails42.gemfile.lock +95 -86
- data/gemfiles/rails42_protected_attributes.gemfile +6 -6
- data/gemfiles/rails42_protected_attributes.gemfile.lock +90 -81
- data/gemfiles/{rails5.gemfile → rails51.gemfile} +6 -6
- data/gemfiles/rails51.gemfile.lock +285 -0
- data/gemfiles/{rails41.gemfile → rails52.gemfile} +6 -6
- data/gemfiles/rails52.gemfile.lock +295 -0
- data/gemfiles/{rails32.gemfile → rails60.gemfile} +6 -9
- data/gemfiles/rails60.gemfile.lock +293 -0
- data/gemfiles/rails61.gemfile +33 -0
- data/gemfiles/rails61.gemfile.lock +293 -0
- data/lib/generators/templates/{add_participants_unique_index_migration.rb → add_participants_unique_index_migration.rb.erb} +1 -1
- data/lib/generators/templates/{add_unique_indexes_migration.rb → add_unique_indexes_migration.rb.erb} +1 -1
- data/lib/generators/templates/{vanity_migration.rb → vanity_migration.rb.erb} +1 -1
- data/lib/generators/vanity/migration_generator.rb +34 -0
- data/lib/vanity/adapters/active_record_adapter.rb +1 -1
- data/lib/vanity/adapters/redis_adapter.rb +20 -20
- data/lib/vanity/commands/report.rb +4 -3
- data/lib/vanity/configuration.rb +4 -0
- data/lib/vanity/experiment/ab_test.rb +16 -11
- 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/adapters/redis_adapter_test.rb +8 -12
- data/test/adapters/shared_tests.rb +7 -6
- data/test/commands/report_test.rb +13 -1
- data/test/configuration_test.rb +15 -2
- data/test/dummy/app/mailers/vanity_mailer.rb +3 -1
- data/test/dummy/config/initializers/secret_token.rb +5 -2
- data/test/dummy/config/routes.rb +17 -3
- data/test/experiment/ab_test.rb +43 -3
- data/test/frameworks/rails/action_controller_test.rb +12 -6
- data/test/frameworks/rails/action_mailer_test.rb +0 -1
- data/test/metric/active_record_test.rb +8 -2
- data/test/playground_test.rb +0 -1
- data/test/test_helper.rb +57 -10
- data/test/web/rails/dashboard_test.rb +19 -10
- data/vanity.gemspec +1 -1
- metadata +20 -21
- data/.travis.yml +0 -33
- data/gemfiles/rails32.gemfile.lock +0 -242
- data/gemfiles/rails41.gemfile.lock +0 -230
- data/gemfiles/rails5.gemfile.lock +0 -256
- data/lib/generators/vanity/add_participants_unique_index_generator.rb +0 -15
- data/lib/generators/vanity/add_unique_indexes_generator.rb +0 -15
- data/lib/generators/vanity_generator.rb +0 -15
@@ -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.1.0)
|
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
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "rack"
|
6
|
+
gem "redis", ">= 3.2.1"
|
7
|
+
gem "redis-namespace", ">= 1.1.0"
|
8
|
+
gem "mongo", "~> 2.1"
|
9
|
+
gem "integration", "<= 0.1.0"
|
10
|
+
gem "rubystats", ">= 0.2.5"
|
11
|
+
gem "garb", "< 0.9.2", require: false
|
12
|
+
gem "mocha", "~> 1.0", require: false
|
13
|
+
gem "rails", "~>5.2.0"
|
14
|
+
gem "fastthread", platforms: :mri_20, git: "https://github.com/zoltankiss/fastthread.git"
|
15
|
+
gem "passenger", "~>3.0"
|
16
|
+
|
17
|
+
group :development do
|
18
|
+
gem "rake"
|
19
|
+
gem "RedCloth"
|
20
|
+
gem "yard"
|
21
|
+
end
|
22
|
+
|
23
|
+
platforms :ruby do
|
24
|
+
gem "sqlite3", "~> 1.3.10"
|
25
|
+
gem "jekyll", "~> 2.5.3"
|
26
|
+
end
|
27
|
+
|
28
|
+
platforms :jruby do
|
29
|
+
gem "activerecord-jdbc-adapter"
|
30
|
+
gem "jdbc-sqlite3"
|
31
|
+
end
|
32
|
+
|
33
|
+
gemspec development_group: :test, path: "../"
|
@@ -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.1.0)
|
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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require "vanity/adapters/active_record_adapter"
|
2
2
|
|
3
|
-
class
|
3
|
+
class AddParticipantsUniqueIndexMigration < ActiveRecord::Migration<%= migration_version %>
|
4
4
|
# Helper methods to ensure we're connecting to the right database, see
|
5
5
|
# https://github.com/assaf/vanity/issues/295.
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require "vanity/adapters/active_record_adapter"
|
2
2
|
|
3
|
-
class AddVanityUniqueIndexes < ActiveRecord::Migration
|
3
|
+
class AddVanityUniqueIndexes < ActiveRecord::Migration<%= migration_version %>
|
4
4
|
# Helper methods to ensure we're connecting to the right database, see
|
5
5
|
# https://github.com/assaf/vanity/issues/295.
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require "vanity/adapters/active_record_adapter"
|
2
2
|
|
3
|
-
class VanityMigration < ActiveRecord::Migration
|
3
|
+
class VanityMigration < ActiveRecord::Migration<%= migration_version %>
|
4
4
|
# Helper methods to ensure we're connecting to the right database, see
|
5
5
|
# https://github.com/assaf/vanity/issues/295.
|
6
6
|
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
require 'rails/generators/migration'
|
3
|
+
require 'rails/generators/active_record'
|
4
|
+
|
5
|
+
class VanityGenerator < Rails::Generators::Base
|
6
|
+
include Rails::Generators::Migration
|
7
|
+
source_root File.expand_path('../../templates', __FILE__)
|
8
|
+
|
9
|
+
def self.next_migration_number(path)
|
10
|
+
::ActiveRecord::Generators::Base.next_migration_number(path)
|
11
|
+
end
|
12
|
+
|
13
|
+
def create_migration_file
|
14
|
+
migration_template "vanity_migration.rb.erb", destination("vanity_migration.rb"), :migration_version=>migration_version
|
15
|
+
migration_template "add_unique_indexes_migration.rb.erb", destination("add_vanity_unique_indexes.rb"), :migration_version=>migration_version
|
16
|
+
migration_template "add_participants_unique_index_migration.rb.erb", destination("add_participants_unique_index_migration.rb"), :migration_version=>migration_version
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def destination(name)
|
22
|
+
File.join(Rails.root, 'db', 'migrate', name)
|
23
|
+
end
|
24
|
+
|
25
|
+
def versioned?
|
26
|
+
ActiveRecord::VERSION::MAJOR >= 5
|
27
|
+
end
|
28
|
+
|
29
|
+
def migration_version
|
30
|
+
if versioned?
|
31
|
+
"[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -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
|