vanity 2.2.8 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/test.yml +55 -0
  3. data/Appraisals +24 -20
  4. data/CHANGELOG +20 -1
  5. data/Gemfile +2 -1
  6. data/Gemfile.lock +24 -14
  7. data/README.md +118 -34
  8. data/gemfiles/rails42.gemfile +6 -6
  9. data/gemfiles/rails42.gemfile.lock +94 -85
  10. data/gemfiles/rails42_protected_attributes.gemfile +6 -6
  11. data/gemfiles/rails42_protected_attributes.gemfile.lock +96 -74
  12. data/gemfiles/{rails5.gemfile → rails51.gemfile} +6 -6
  13. data/gemfiles/rails51.gemfile.lock +285 -0
  14. data/gemfiles/{rails41.gemfile → rails52.gemfile} +6 -6
  15. data/gemfiles/rails52.gemfile.lock +295 -0
  16. data/gemfiles/{rails32.gemfile → rails60.gemfile} +6 -9
  17. data/gemfiles/rails60.gemfile.lock +293 -0
  18. data/gemfiles/rails61.gemfile +33 -0
  19. data/gemfiles/rails61.gemfile.lock +293 -0
  20. data/lib/generators/templates/add_participants_unique_index_migration.rb.erb +24 -0
  21. data/lib/generators/templates/add_unique_indexes_migration.rb.erb +28 -0
  22. data/lib/generators/templates/{vanity_migration.rb → vanity_migration.rb.erb} +6 -4
  23. data/lib/generators/vanity/migration_generator.rb +34 -0
  24. data/lib/vanity/adapters/active_record_adapter.rb +29 -9
  25. data/lib/vanity/adapters/redis_adapter.rb +20 -20
  26. data/lib/vanity/commands/report.rb +4 -3
  27. data/lib/vanity/frameworks/rails.rb +20 -9
  28. data/lib/vanity/locales/vanity.ru.yml +50 -0
  29. data/lib/vanity/templates/_experiment.erb +3 -3
  30. data/lib/vanity/templates/_experiments.erb +1 -1
  31. data/lib/vanity/templates/_metrics.erb +1 -1
  32. data/lib/vanity/templates/_report.erb +2 -2
  33. data/lib/vanity/templates/vanity.css +5 -5
  34. data/lib/vanity/version.rb +1 -1
  35. data/test/adapters/redis_adapter_test.rb +8 -12
  36. data/test/adapters/shared_tests.rb +7 -6
  37. data/test/commands/report_test.rb +13 -1
  38. data/test/configuration_test.rb +15 -2
  39. data/test/dummy/app/mailers/vanity_mailer.rb +3 -1
  40. data/test/dummy/config/initializers/secret_token.rb +5 -2
  41. data/test/dummy/config/routes.rb +17 -3
  42. data/test/experiment/ab_test.rb +3 -3
  43. data/test/frameworks/rails/action_controller_test.rb +12 -6
  44. data/test/frameworks/rails/action_mailer_test.rb +0 -1
  45. data/test/metric/active_record_test.rb +8 -2
  46. data/test/test_helper.rb +57 -10
  47. data/test/web/rails/dashboard_test.rb +19 -10
  48. data/vanity.gemspec +1 -1
  49. metadata +20 -16
  50. data/.travis.yml +0 -33
  51. data/gemfiles/rails32.gemfile.lock +0 -242
  52. data/gemfiles/rails41.gemfile.lock +0 -230
  53. data/gemfiles/rails5.gemfile.lock +0 -256
  54. 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.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
@@ -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.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
@@ -0,0 +1,24 @@
1
+ require "vanity/adapters/active_record_adapter"
2
+
3
+ class AddParticipantsUniqueIndexMigration < ActiveRecord::Migration<%= migration_version %>
4
+ # Helper methods to ensure we're connecting to the right database, see
5
+ # https://github.com/assaf/vanity/issues/295.
6
+
7
+ def connection
8
+ @connection ||= ActiveRecord::Base.connection
9
+ end
10
+ alias_method :default_connection, :connection
11
+
12
+ def with_vanity_connection
13
+ @connection = Vanity::Adapters::ActiveRecordAdapter::VanityRecord.connection
14
+ yield
15
+ @connection = default_connection
16
+ end
17
+
18
+ def change
19
+ with_vanity_connection do
20
+ remove_index :vanity_participants, :name => "by_experiment_id_and_identity"
21
+ add_index :vanity_participants, [:experiment_id, :identity], :name => "by_experiment_id_and_identity", :unique => true
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,28 @@
1
+ require "vanity/adapters/active_record_adapter"
2
+
3
+ class AddVanityUniqueIndexes < ActiveRecord::Migration<%= migration_version %>
4
+ # Helper methods to ensure we're connecting to the right database, see
5
+ # https://github.com/assaf/vanity/issues/295.
6
+
7
+ def connection
8
+ @connection ||= ActiveRecord::Base.connection
9
+ end
10
+ alias_method :default_connection, :connection
11
+
12
+ def with_vanity_connection
13
+ @connection = Vanity::Adapters::ActiveRecordAdapter::VanityRecord.connection
14
+ yield
15
+ @connection = default_connection
16
+ end
17
+
18
+ def change
19
+ with_vanity_connection do
20
+ remove_index :vanity_experiments, [:experiment_id]
21
+ add_index :vanity_experiments, [:experiment_id], :unique => true
22
+
23
+ remove_index :vanity_conversions, :name => "by_experiment_id_and_alternative", :unique => true
24
+ add_index :vanity_conversions, [:vanity_experiment_id, :alternative], :name => "by_experiment_id_and_alternative", :unique => true
25
+ end
26
+ end
27
+
28
+ end
@@ -1,4 +1,6 @@
1
- class VanityMigration < ActiveRecord::Migration
1
+ require "vanity/adapters/active_record_adapter"
2
+
3
+ class VanityMigration < ActiveRecord::Migration<%= migration_version %>
2
4
  # Helper methods to ensure we're connecting to the right database, see
3
5
  # https://github.com/assaf/vanity/issues/295.
4
6
 
@@ -36,14 +38,14 @@ class VanityMigration < ActiveRecord::Migration
36
38
  t.datetime :created_at
37
39
  t.datetime :completed_at
38
40
  end
39
- add_index :vanity_experiments, [:experiment_id]
41
+ add_index :vanity_experiments, [:experiment_id], :unique => true
40
42
 
41
43
  create_table :vanity_conversions do |t|
42
44
  t.integer :vanity_experiment_id
43
45
  t.integer :alternative
44
46
  t.integer :conversions
45
47
  end
46
- add_index :vanity_conversions, [:vanity_experiment_id, :alternative], :name => "by_experiment_id_and_alternative"
48
+ add_index :vanity_conversions, [:vanity_experiment_id, :alternative], :name => "by_experiment_id_and_alternative", :unique => true
47
49
 
48
50
  create_table :vanity_participants do |t|
49
51
  t.string :experiment_id
@@ -54,7 +56,7 @@ class VanityMigration < ActiveRecord::Migration
54
56
  t.timestamps null: false
55
57
  end
56
58
  add_index :vanity_participants, [:experiment_id]
57
- add_index :vanity_participants, [:experiment_id, :identity], :name => "by_experiment_id_and_identity"
59
+ add_index :vanity_participants, [:experiment_id, :identity], :name => "by_experiment_id_and_identity", :unique => true
58
60
  add_index :vanity_participants, [:experiment_id, :shown], :name => "by_experiment_id_and_shown"
59
61
  add_index :vanity_participants, [:experiment_id, :seen], :name => "by_experiment_id_and_seen"
60
62
  add_index :vanity_participants, [:experiment_id, :converted], :name => "by_experiment_id_and_converted"