vanity 4.0.2 → 4.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/linting.yml +6 -1
- data/.github/workflows/test.yml +7 -1
- data/Appraisals +3 -3
- data/CHANGELOG +8 -0
- data/Gemfile +3 -2
- data/Gemfile.lock +20 -17
- data/README.md +3 -1
- data/gemfiles/rails52.gemfile +4 -3
- data/gemfiles/rails52.gemfile.lock +152 -153
- data/gemfiles/rails60.gemfile +4 -3
- data/gemfiles/rails60.gemfile.lock +173 -156
- data/gemfiles/rails61.gemfile +4 -3
- data/gemfiles/rails61.gemfile.lock +183 -163
- data/lib/vanity/configuration.rb +1 -1
- data/lib/vanity/frameworks/rails.rb +2 -1
- data/lib/vanity/safe_yaml.rb +21 -0
- data/lib/vanity/version.rb +1 -1
- data/lib/vanity.rb +1 -0
- data/test/metric/active_record_test.rb +3 -3
- data/test/test_helper.rb +5 -1
- data/vanity.gemspec +0 -1
- metadata +6 -65
@@ -7,100 +7,132 @@ GIT
|
|
7
7
|
PATH
|
8
8
|
remote: ..
|
9
9
|
specs:
|
10
|
-
vanity (4.0.
|
10
|
+
vanity (4.0.4)
|
11
11
|
i18n
|
12
12
|
|
13
13
|
GEM
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
|
-
RedCloth (4.2
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
RedCloth (4.3.2)
|
17
|
+
actioncable (6.1.6.1)
|
18
|
+
actionpack (= 6.1.6.1)
|
19
|
+
activesupport (= 6.1.6.1)
|
20
20
|
nio4r (~> 2.0)
|
21
21
|
websocket-driver (>= 0.6.1)
|
22
|
-
|
23
|
-
actionpack (=
|
24
|
-
|
25
|
-
|
22
|
+
actionmailbox (6.1.6.1)
|
23
|
+
actionpack (= 6.1.6.1)
|
24
|
+
activejob (= 6.1.6.1)
|
25
|
+
activerecord (= 6.1.6.1)
|
26
|
+
activestorage (= 6.1.6.1)
|
27
|
+
activesupport (= 6.1.6.1)
|
28
|
+
mail (>= 2.7.1)
|
29
|
+
actionmailer (6.1.6.1)
|
30
|
+
actionpack (= 6.1.6.1)
|
31
|
+
actionview (= 6.1.6.1)
|
32
|
+
activejob (= 6.1.6.1)
|
33
|
+
activesupport (= 6.1.6.1)
|
26
34
|
mail (~> 2.5, >= 2.5.4)
|
27
35
|
rails-dom-testing (~> 2.0)
|
28
|
-
actionpack (
|
29
|
-
actionview (=
|
30
|
-
activesupport (=
|
31
|
-
rack (~> 2.0)
|
36
|
+
actionpack (6.1.6.1)
|
37
|
+
actionview (= 6.1.6.1)
|
38
|
+
activesupport (= 6.1.6.1)
|
39
|
+
rack (~> 2.0, >= 2.0.9)
|
32
40
|
rack-test (>= 0.6.3)
|
33
41
|
rails-dom-testing (~> 2.0)
|
34
|
-
rails-html-sanitizer (~> 1.0, >= 1.0
|
35
|
-
|
36
|
-
|
42
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
43
|
+
actiontext (6.1.6.1)
|
44
|
+
actionpack (= 6.1.6.1)
|
45
|
+
activerecord (= 6.1.6.1)
|
46
|
+
activestorage (= 6.1.6.1)
|
47
|
+
activesupport (= 6.1.6.1)
|
48
|
+
nokogiri (>= 1.8.5)
|
49
|
+
actionview (6.1.6.1)
|
50
|
+
activesupport (= 6.1.6.1)
|
37
51
|
builder (~> 3.1)
|
38
52
|
erubi (~> 1.4)
|
39
53
|
rails-dom-testing (~> 2.0)
|
40
|
-
rails-html-sanitizer (~> 1.
|
41
|
-
activejob (
|
42
|
-
activesupport (=
|
54
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
55
|
+
activejob (6.1.6.1)
|
56
|
+
activesupport (= 6.1.6.1)
|
43
57
|
globalid (>= 0.3.6)
|
44
|
-
activemodel (
|
45
|
-
activesupport (=
|
46
|
-
activerecord (
|
47
|
-
activemodel (=
|
48
|
-
activesupport (=
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
activesupport (
|
58
|
+
activemodel (6.1.6.1)
|
59
|
+
activesupport (= 6.1.6.1)
|
60
|
+
activerecord (6.1.6.1)
|
61
|
+
activemodel (= 6.1.6.1)
|
62
|
+
activesupport (= 6.1.6.1)
|
63
|
+
activestorage (6.1.6.1)
|
64
|
+
actionpack (= 6.1.6.1)
|
65
|
+
activejob (= 6.1.6.1)
|
66
|
+
activerecord (= 6.1.6.1)
|
67
|
+
activesupport (= 6.1.6.1)
|
68
|
+
marcel (~> 1.0)
|
69
|
+
mini_mime (>= 1.1.0)
|
70
|
+
activesupport (6.1.6.1)
|
57
71
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
58
|
-
i18n (>=
|
59
|
-
minitest (
|
60
|
-
tzinfo (~>
|
61
|
-
|
62
|
-
|
63
|
-
|
72
|
+
i18n (>= 1.6, < 2)
|
73
|
+
minitest (>= 5.1)
|
74
|
+
tzinfo (~> 2.0)
|
75
|
+
zeitwerk (~> 2.3)
|
76
|
+
addressable (2.8.0)
|
77
|
+
public_suffix (>= 2.0.2, < 5.0)
|
78
|
+
appraisal (2.4.1)
|
64
79
|
bundler
|
65
80
|
rake
|
66
81
|
thor (>= 0.14.0)
|
67
|
-
arel (9.0.0)
|
68
82
|
ast (2.4.2)
|
69
83
|
blankslate (2.1.2.4)
|
70
|
-
bson (4.
|
71
|
-
|
72
|
-
|
73
|
-
classifier-reborn (2.2.0)
|
84
|
+
bson (4.15.0)
|
85
|
+
builder (3.2.4)
|
86
|
+
classifier-reborn (2.3.0)
|
74
87
|
fast-stemmer (~> 1.0)
|
75
|
-
|
88
|
+
matrix (~> 0.4)
|
89
|
+
coderay (1.1.3)
|
76
90
|
coffee-script (2.4.1)
|
77
91
|
coffee-script-source
|
78
92
|
execjs
|
79
|
-
coffee-script-source (1.
|
93
|
+
coffee-script-source (1.12.2)
|
80
94
|
colorator (0.1)
|
81
|
-
concurrent-ruby (1.
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
95
|
+
concurrent-ruby (1.1.10)
|
96
|
+
crack (0.4.5)
|
97
|
+
rexml
|
98
|
+
crass (1.0.6)
|
99
|
+
erubi (1.10.0)
|
100
|
+
execjs (2.8.1)
|
101
|
+
fakefs (1.8.0)
|
102
|
+
faraday (1.10.0)
|
103
|
+
faraday-em_http (~> 1.0)
|
104
|
+
faraday-em_synchrony (~> 1.0)
|
105
|
+
faraday-excon (~> 1.1)
|
106
|
+
faraday-httpclient (~> 1.0)
|
107
|
+
faraday-multipart (~> 1.0)
|
108
|
+
faraday-net_http (~> 1.0)
|
109
|
+
faraday-net_http_persistent (~> 1.0)
|
110
|
+
faraday-patron (~> 1.0)
|
111
|
+
faraday-rack (~> 1.0)
|
112
|
+
faraday-retry (~> 1.0)
|
113
|
+
ruby2_keywords (>= 0.0.4)
|
114
|
+
faraday-em_http (1.0.0)
|
115
|
+
faraday-em_synchrony (1.0.0)
|
116
|
+
faraday-excon (1.1.0)
|
117
|
+
faraday-httpclient (1.0.1)
|
118
|
+
faraday-multipart (1.0.4)
|
119
|
+
multipart-post (~> 2)
|
120
|
+
faraday-net_http (1.0.1)
|
121
|
+
faraday-net_http_persistent (1.2.0)
|
122
|
+
faraday-patron (1.0.0)
|
123
|
+
faraday-rack (1.0.0)
|
124
|
+
faraday-retry (1.0.3)
|
91
125
|
fast-stemmer (1.0.2)
|
92
126
|
ffi (1.15.5)
|
93
|
-
ffi (1.15.5-java)
|
94
127
|
garb (0.9.1)
|
95
128
|
activesupport (>= 2.2.0)
|
96
129
|
crack (>= 0.1.6)
|
97
|
-
globalid (0.
|
98
|
-
activesupport (>=
|
99
|
-
hashdiff (0.
|
100
|
-
i18n (1.0
|
130
|
+
globalid (1.0.0)
|
131
|
+
activesupport (>= 5.0)
|
132
|
+
hashdiff (1.0.1)
|
133
|
+
i18n (1.11.0)
|
101
134
|
concurrent-ruby (~> 1.0)
|
102
135
|
integration (0.1.0)
|
103
|
-
jdbc-sqlite3 (3.28.0)
|
104
136
|
jekyll (2.5.3)
|
105
137
|
classifier-reborn (~> 2.0)
|
106
138
|
colorator (~> 0.1)
|
@@ -116,9 +148,9 @@ GEM
|
|
116
148
|
redcarpet (~> 3.1)
|
117
149
|
safe_yaml (~> 1.0)
|
118
150
|
toml (~> 0.1.0)
|
119
|
-
jekyll-coffeescript (1.
|
151
|
+
jekyll-coffeescript (1.2.2)
|
120
152
|
coffee-script (~> 2.2)
|
121
|
-
coffee-script-source (~> 1.
|
153
|
+
coffee-script-source (~> 1.12)
|
122
154
|
jekyll-gist (1.5.0)
|
123
155
|
octokit (~> 4.2)
|
124
156
|
jekyll-paginate (1.1.0)
|
@@ -128,97 +160,88 @@ GEM
|
|
128
160
|
listen (~> 3.0)
|
129
161
|
kramdown (1.17.0)
|
130
162
|
liquid (2.6.3)
|
131
|
-
listen (3.1
|
132
|
-
rb-fsevent (~> 0.
|
133
|
-
rb-inotify (~> 0.9, >= 0.9.
|
134
|
-
|
135
|
-
loofah (2.2.2)
|
163
|
+
listen (3.7.1)
|
164
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
165
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
166
|
+
loofah (2.18.0)
|
136
167
|
crass (~> 1.0.2)
|
137
168
|
nokogiri (>= 1.5.9)
|
138
|
-
mail (2.7.
|
169
|
+
mail (2.7.1)
|
139
170
|
mini_mime (>= 0.1.1)
|
140
|
-
marcel (0.
|
141
|
-
|
171
|
+
marcel (1.0.2)
|
172
|
+
matrix (0.4.2)
|
142
173
|
mercenary (0.3.6)
|
143
|
-
method_source (0.
|
144
|
-
|
145
|
-
nokogiri (~> 1)
|
146
|
-
rake
|
147
|
-
mini_mime (1.0.0)
|
174
|
+
method_source (1.0.0)
|
175
|
+
mini_mime (1.1.2)
|
148
176
|
mini_portile2 (2.6.1)
|
149
|
-
minitest (5.
|
150
|
-
mocha (1.
|
151
|
-
mongo (2.
|
152
|
-
bson (>= 4.
|
153
|
-
multipart-post (2.
|
154
|
-
nio4r (2.
|
155
|
-
nio4r (2.3.1-java)
|
177
|
+
minitest (5.15.0)
|
178
|
+
mocha (1.14.0)
|
179
|
+
mongo (2.17.1)
|
180
|
+
bson (>= 4.8.2, < 5.0.0)
|
181
|
+
multipart-post (2.2.3)
|
182
|
+
nio4r (2.5.8)
|
156
183
|
nokogiri (1.12.5)
|
157
184
|
mini_portile2 (~> 2.6.1)
|
158
185
|
racc (~> 1.4)
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
parser (3.1.1.0)
|
186
|
+
octokit (4.25.1)
|
187
|
+
faraday (>= 1, < 3)
|
188
|
+
sawyer (~> 0.9)
|
189
|
+
parallel (1.22.1)
|
190
|
+
parser (3.1.2.0)
|
165
191
|
ast (~> 2.4.1)
|
166
192
|
parslet (1.5.0)
|
167
193
|
blankslate (~> 2.0)
|
168
|
-
passenger (6.0.
|
194
|
+
passenger (6.0.14)
|
169
195
|
rack
|
170
196
|
rake (>= 0.8.1)
|
171
|
-
posix-spawn (0.3.
|
172
|
-
pry (0.
|
173
|
-
coderay (~> 1.1
|
174
|
-
method_source (~>
|
175
|
-
|
176
|
-
coderay (~> 1.1.0)
|
177
|
-
method_source (~> 0.9.0)
|
178
|
-
spoon (~> 0.0)
|
179
|
-
public_suffix (3.0.2)
|
197
|
+
posix-spawn (0.3.15)
|
198
|
+
pry (0.14.1)
|
199
|
+
coderay (~> 1.1)
|
200
|
+
method_source (~> 1.0)
|
201
|
+
public_suffix (4.0.7)
|
180
202
|
pygments.rb (0.6.3)
|
181
203
|
posix-spawn (~> 0.3.6)
|
182
204
|
yajl-ruby (~> 1.2.0)
|
183
205
|
racc (1.6.0)
|
184
|
-
|
185
|
-
rack (2.2
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
actionmailer (=
|
191
|
-
actionpack (=
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
206
|
+
rack (2.2.4)
|
207
|
+
rack-test (2.0.2)
|
208
|
+
rack (>= 1.3)
|
209
|
+
rails (6.1.6.1)
|
210
|
+
actioncable (= 6.1.6.1)
|
211
|
+
actionmailbox (= 6.1.6.1)
|
212
|
+
actionmailer (= 6.1.6.1)
|
213
|
+
actionpack (= 6.1.6.1)
|
214
|
+
actiontext (= 6.1.6.1)
|
215
|
+
actionview (= 6.1.6.1)
|
216
|
+
activejob (= 6.1.6.1)
|
217
|
+
activemodel (= 6.1.6.1)
|
218
|
+
activerecord (= 6.1.6.1)
|
219
|
+
activestorage (= 6.1.6.1)
|
220
|
+
activesupport (= 6.1.6.1)
|
221
|
+
bundler (>= 1.15.0)
|
222
|
+
railties (= 6.1.6.1)
|
200
223
|
sprockets-rails (>= 2.0.0)
|
201
224
|
rails-dom-testing (2.0.3)
|
202
225
|
activesupport (>= 4.2.0)
|
203
226
|
nokogiri (>= 1.6)
|
204
|
-
rails-html-sanitizer (1.
|
205
|
-
loofah (~> 2.
|
206
|
-
railties (
|
207
|
-
actionpack (=
|
208
|
-
activesupport (=
|
227
|
+
rails-html-sanitizer (1.4.3)
|
228
|
+
loofah (~> 2.3)
|
229
|
+
railties (6.1.6.1)
|
230
|
+
actionpack (= 6.1.6.1)
|
231
|
+
activesupport (= 6.1.6.1)
|
209
232
|
method_source
|
210
|
-
rake (>=
|
211
|
-
thor (
|
233
|
+
rake (>= 12.2)
|
234
|
+
thor (~> 1.0)
|
212
235
|
rainbow (3.1.1)
|
213
236
|
rake (13.0.6)
|
214
|
-
rb-fsevent (0.
|
215
|
-
rb-inotify (0.
|
216
|
-
ffi (
|
217
|
-
redcarpet (3.
|
218
|
-
redis (4.
|
237
|
+
rb-fsevent (0.11.1)
|
238
|
+
rb-inotify (0.10.1)
|
239
|
+
ffi (~> 1.0)
|
240
|
+
redcarpet (3.5.1)
|
241
|
+
redis (4.7.1)
|
219
242
|
redis-namespace (1.8.2)
|
220
243
|
redis (>= 3.0.4)
|
221
|
-
regexp_parser (2.
|
244
|
+
regexp_parser (2.5.0)
|
222
245
|
rexml (3.2.5)
|
223
246
|
rubocop (1.25.1)
|
224
247
|
parallel (~> 1.10)
|
@@ -231,56 +254,52 @@ GEM
|
|
231
254
|
unicode-display_width (>= 1.4.0, < 3.0)
|
232
255
|
rubocop-ast (1.15.2)
|
233
256
|
parser (>= 3.0.1.1)
|
234
|
-
rubocop-performance (1.13.
|
257
|
+
rubocop-performance (1.13.3)
|
235
258
|
rubocop (>= 1.7.0, < 2.0)
|
236
259
|
rubocop-ast (>= 0.4.0)
|
237
|
-
rubocop-rspec (2.
|
260
|
+
rubocop-rspec (2.10.0)
|
238
261
|
rubocop (~> 1.19)
|
239
262
|
ruby-progressbar (1.11.0)
|
240
|
-
|
263
|
+
ruby2_keywords (0.0.5)
|
241
264
|
rubystats (0.3.0)
|
242
|
-
safe_yaml (1.0.
|
243
|
-
sass (3.
|
265
|
+
safe_yaml (1.0.5)
|
266
|
+
sass (3.7.4)
|
244
267
|
sass-listen (~> 4.0.0)
|
245
268
|
sass-listen (4.0.0)
|
246
269
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
247
270
|
rb-inotify (~> 0.9, >= 0.9.7)
|
248
|
-
sawyer (0.
|
249
|
-
addressable (>= 2.3.5
|
250
|
-
faraday (
|
251
|
-
|
252
|
-
ffi
|
253
|
-
sprockets (3.7.2)
|
271
|
+
sawyer (0.9.2)
|
272
|
+
addressable (>= 2.3.5)
|
273
|
+
faraday (>= 0.17.3, < 3)
|
274
|
+
sprockets (4.1.1)
|
254
275
|
concurrent-ruby (~> 1.0)
|
255
276
|
rack (> 1, < 3)
|
256
|
-
sprockets-rails (3.2
|
257
|
-
actionpack (>=
|
258
|
-
activesupport (>=
|
277
|
+
sprockets-rails (3.4.2)
|
278
|
+
actionpack (>= 5.2)
|
279
|
+
activesupport (>= 5.2)
|
259
280
|
sprockets (>= 3.0.0)
|
260
|
-
sqlite3 (1.
|
261
|
-
thor (
|
262
|
-
|
263
|
-
thread_safe (0.3.6-java)
|
264
|
-
timecop (0.9.1)
|
281
|
+
sqlite3 (1.4.4)
|
282
|
+
thor (1.2.1)
|
283
|
+
timecop (0.9.5)
|
265
284
|
toml (0.1.2)
|
266
285
|
parslet (~> 1.5.0)
|
267
|
-
tzinfo (
|
268
|
-
|
269
|
-
unicode-display_width (2.
|
270
|
-
webmock (3.
|
271
|
-
addressable (>= 2.
|
286
|
+
tzinfo (2.0.4)
|
287
|
+
concurrent-ruby (~> 1.0)
|
288
|
+
unicode-display_width (2.2.0)
|
289
|
+
webmock (3.14.0)
|
290
|
+
addressable (>= 2.8.0)
|
272
291
|
crack (>= 0.3.2)
|
273
|
-
hashdiff
|
274
|
-
|
275
|
-
|
276
|
-
websocket-driver (0.7.0-java)
|
292
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
293
|
+
webrick (1.7.0)
|
294
|
+
websocket-driver (0.7.5)
|
277
295
|
websocket-extensions (>= 0.1.0)
|
278
|
-
websocket-extensions (0.1.
|
296
|
+
websocket-extensions (0.1.5)
|
279
297
|
yajl-ruby (1.2.3)
|
280
|
-
yard (0.9.
|
298
|
+
yard (0.9.28)
|
299
|
+
webrick (~> 1.7.0)
|
300
|
+
zeitwerk (2.6.0)
|
281
301
|
|
282
302
|
PLATFORMS
|
283
|
-
java
|
284
303
|
ruby
|
285
304
|
|
286
305
|
DEPENDENCIES
|
@@ -300,19 +319,20 @@ DEPENDENCIES
|
|
300
319
|
passenger
|
301
320
|
pry
|
302
321
|
rack
|
303
|
-
rails (~>
|
322
|
+
rails (~> 6.1.0)
|
304
323
|
rake
|
305
324
|
redis (>= 3.2.1)
|
306
325
|
redis-namespace (>= 1.1.0)
|
307
|
-
rubocop
|
326
|
+
rubocop (~> 1.25.1)
|
327
|
+
rubocop-ast (~> 1.15.2)
|
308
328
|
rubocop-performance
|
309
329
|
rubocop-rspec
|
310
330
|
rubystats (>= 0.2.5)
|
311
|
-
sqlite3 (~> 1.
|
331
|
+
sqlite3 (~> 1.4.0)
|
312
332
|
timecop
|
313
333
|
vanity!
|
314
334
|
webmock
|
315
335
|
yard
|
316
336
|
|
317
337
|
BUNDLED WITH
|
318
|
-
|
338
|
+
2.3.26
|
data/lib/vanity/configuration.rb
CHANGED
@@ -213,7 +213,7 @@ module Vanity
|
|
213
213
|
file_path = File.join(config_path, file_name)
|
214
214
|
|
215
215
|
if File.exist?(file_path) # rubocop:todo Style/GuardClause
|
216
|
-
config =
|
216
|
+
config = SafeYAML.load(ERB.new(File.read(file_path)).result)
|
217
217
|
config ||= {}
|
218
218
|
params_for_environment = config[environment.to_s]
|
219
219
|
|
@@ -249,8 +249,9 @@ module Vanity
|
|
249
249
|
def vanity_js
|
250
250
|
return if Vanity.context.vanity_active_experiments.nil? || Vanity.context.vanity_active_experiments.empty?
|
251
251
|
|
252
|
+
template = File.read(Vanity.template("_vanity.js.erb"))
|
252
253
|
javascript_tag do
|
253
|
-
|
254
|
+
ERB.new(template).result(binding)
|
254
255
|
end
|
255
256
|
end
|
256
257
|
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require "yaml"
|
2
|
+
|
3
|
+
module Vanity
|
4
|
+
module SafeYAML
|
5
|
+
begin
|
6
|
+
YAML.safe_load("---", permitted_classes: [])
|
7
|
+
rescue ArgumentError
|
8
|
+
SUPPORTS_PERMITTED_CLASSES = false
|
9
|
+
else
|
10
|
+
SUPPORTS_PERMITTED_CLASSES = true
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.load(payload)
|
14
|
+
if SUPPORTS_PERMITTED_CLASSES
|
15
|
+
YAML.safe_load(payload, permitted_classes: [], permitted_symbols: [], aliases: true)
|
16
|
+
else
|
17
|
+
YAML.safe_load(payload, [], [], true)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/vanity/version.rb
CHANGED
data/lib/vanity.rb
CHANGED
@@ -203,7 +203,7 @@ if ENV["DB"] == "active_record"
|
|
203
203
|
once = true
|
204
204
|
end
|
205
205
|
Sky.create!
|
206
|
-
Sky.last.
|
206
|
+
Sky.last.update height: 4
|
207
207
|
end
|
208
208
|
|
209
209
|
it "with after_save" do
|
@@ -226,7 +226,7 @@ if ENV["DB"] == "active_record"
|
|
226
226
|
end
|
227
227
|
Sky.create!
|
228
228
|
(1..5).each do |height|
|
229
|
-
Sky.last.
|
229
|
+
Sky.last.update! height: height
|
230
230
|
end
|
231
231
|
assert_equal 2, times
|
232
232
|
end
|
@@ -279,7 +279,7 @@ if ENV["DB"] == "active_record"
|
|
279
279
|
(1..5).each do |height|
|
280
280
|
Sky.create! height: height
|
281
281
|
end
|
282
|
-
Sky.first.
|
282
|
+
Sky.first.update! height: 4
|
283
283
|
assert_equal 3, Vanity::Metric.data(metric(:sky_is_limit)).last.last
|
284
284
|
end
|
285
285
|
|
data/test/test_helper.rb
CHANGED
@@ -263,7 +263,11 @@ if ENV["DB"] == "active_record"
|
|
263
263
|
|
264
264
|
migrate_path = File.expand_path('dummy/db/migrate', __dir__)
|
265
265
|
if defined?(ActiveRecord::MigrationContext)
|
266
|
-
ActiveRecord::
|
266
|
+
if ActiveRecord.version.release >= Gem::Version.new('6.0')
|
267
|
+
ActiveRecord::MigrationContext.new(migrate_path, ActiveRecord::SchemaMigration).migrate
|
268
|
+
else
|
269
|
+
ActiveRecord::MigrationContext.new(migrate_path).migrate
|
270
|
+
end
|
267
271
|
else
|
268
272
|
ActiveRecord::Migrator.migrate(migrate_path)
|
269
273
|
end
|
data/vanity.gemspec
CHANGED
@@ -13,7 +13,6 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.post_install_message = "To get started run vanity --help"
|
14
14
|
|
15
15
|
spec.files = `git ls-files`.split("\n")
|
16
|
-
spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
16
|
spec.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
18
17
|
spec.require_paths = ["lib"]
|
19
18
|
|