jekyll-minibundle 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,15 +14,15 @@ module Jekyll::Minibundle
14
14
  @asset_source_path = File.join(@site.source, asset_source_path)
15
15
  @asset_destination_dir = File.dirname(asset_destination_path)
16
16
  @asset_destination_extension = File.extname(asset_destination_path)
17
- @asset_destination_base_prefix = File.basename(asset_destination_path)[0..-(@asset_destination_extension.size + 1)]
17
+ @asset_destination_filename_prefix = File.basename(asset_destination_path)[0..-(@asset_destination_extension.size + 1)]
18
18
  @stamped_at = nil
19
19
  @is_modified = false
20
20
  end
21
21
 
22
22
  def destination_path_for_markup
23
- # we must regenerate the fingerprint here, if at all, in order
24
- # to make sure markup destination and generated file paths have
25
- # the same fingerprint
23
+ # we must rebundle here, if at all, in order to make sure the
24
+ # destination path in the markup and the generated file path
25
+ # have the same fingerprint
26
26
  if modified?
27
27
  @stamped_at = mtime
28
28
  @is_modified = true
@@ -32,11 +32,16 @@ module Jekyll::Minibundle
32
32
  asset_destination_path
33
33
  end
34
34
 
35
+ def asset_destination_filename
36
+ "#{@asset_destination_filename_prefix}-#{asset_stamp}#{extname}"
37
+ end
38
+
35
39
  def extname
36
40
  @asset_destination_extension
37
41
  end
38
42
 
39
- # writes destination only after `markup` has been called
43
+ # allows writing destination only after
44
+ # `destination_path_for_markup` has been called
40
45
  def write(site_destination_dir)
41
46
  if @is_modified
42
47
  write_destination(site_destination_dir)
@@ -49,12 +54,8 @@ module Jekyll::Minibundle
49
54
 
50
55
  private
51
56
 
52
- def asset_destination_basename
53
- "#{@asset_destination_base_prefix}-#{asset_stamp}#{extname}"
54
- end
55
-
56
57
  def asset_stamp
57
- @_asset_stamp ||= AssetStamp.from_file(path)
58
+ @_asset_stamp ||= AssetStamp.from_file(asset_source_path)
58
59
  end
59
60
  end
60
61
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Minibundle
3
- VERSION = '2.1.0'.freeze
3
+ VERSION = '2.1.1'.freeze
4
4
  end
5
5
  end
@@ -59,14 +59,14 @@ module Jekyll::Minibundle::Test
59
59
  generate_site(:development)
60
60
 
61
61
  destination = destination_path(JS_BUNDLE_DESTINATION_PATH, 'app.js')
62
- org_mtime = mtime_of(destination)
62
+ org_mtime = file_mtime_of(destination)
63
63
  source = source_path(JS_BUNDLE_SOURCE_DIR, 'app.js')
64
64
  ensure_file_mtime_changes { spec.fetch(:action).call(source) }
65
65
 
66
66
  generate_site(:development, clear_cache: false)
67
67
 
68
68
  assert_equal File.read(destination), File.read(source)
69
- assert_operator mtime_of(destination), :>, org_mtime
69
+ assert_operator file_mtime_of(destination), :>, org_mtime
70
70
  end
71
71
  end
72
72
  end
@@ -76,7 +76,7 @@ module Jekyll::Minibundle::Test
76
76
  generate_site(:development)
77
77
 
78
78
  destination = destination_path(JS_BUNDLE_DESTINATION_PATH, 'app.js')
79
- org_mtime = mtime_of(destination)
79
+ org_mtime = file_mtime_of(destination)
80
80
 
81
81
  match_snippet = <<-END
82
82
  {% minibundle js %}
@@ -95,7 +95,7 @@ module Jekyll::Minibundle::Test
95
95
 
96
96
  generate_site(:development, clear_cache: false)
97
97
 
98
- assert_operator mtime_of(destination), :>, org_mtime
98
+ assert_operator file_mtime_of(destination), :>, org_mtime
99
99
  end
100
100
  end
101
101
 
@@ -103,7 +103,7 @@ module Jekyll::Minibundle::Test
103
103
  with_site_dir do
104
104
  generate_site(:development)
105
105
 
106
- org_mtime = mtime_of(destination_path(JS_BUNDLE_DESTINATION_PATH, 'dependency.js'))
106
+ org_mtime = file_mtime_of(destination_path(JS_BUNDLE_DESTINATION_PATH, 'dependency.js'))
107
107
 
108
108
  match_snippet = <<-END
109
109
  assets:
@@ -124,7 +124,7 @@ module Jekyll::Minibundle::Test
124
124
 
125
125
  assert_equal [File.join(JS_BUNDLE_DESTINATION_PATH, 'dependency.js')], find_js_paths_from_index
126
126
 
127
- new_mtime = mtime_of(destination_path(JS_BUNDLE_DESTINATION_PATH, 'dependency.js'))
127
+ new_mtime = file_mtime_of(destination_path(JS_BUNDLE_DESTINATION_PATH, 'dependency.js'))
128
128
  assert_operator new_mtime, :>, org_mtime
129
129
  end
130
130
  end
@@ -257,18 +257,18 @@ module Jekyll::Minibundle::Test
257
257
  generate_site(:development)
258
258
 
259
259
  expected_js_path = destination_path(JS_BUNDLE_DESTINATION_PATH, 'app.js')
260
- org_mtime = mtime_of(expected_js_path)
260
+ org_mtime = file_mtime_of(expected_js_path)
261
261
  ensure_file_mtime_changes { File.write(source_path(JS_BUNDLE_SOURCE_DIR, 'dependency.js'), '(function() {})()') }
262
262
 
263
263
  generate_site(:development, clear_cache: false)
264
264
 
265
- assert_equal org_mtime, mtime_of(expected_js_path)
265
+ assert_equal org_mtime, file_mtime_of(expected_js_path)
266
266
 
267
267
  ensure_file_mtime_changes { FileUtils.touch('index.html') }
268
268
 
269
269
  generate_site(:development, clear_cache: false)
270
270
 
271
- assert_equal org_mtime, mtime_of(expected_js_path)
271
+ assert_equal org_mtime, file_mtime_of(expected_js_path)
272
272
  end
273
273
  end
274
274
 
@@ -277,7 +277,7 @@ module Jekyll::Minibundle::Test
277
277
  generate_site(:development)
278
278
 
279
279
  expected_js_path = destination_path(JS_BUNDLE_DESTINATION_PATH, 'app.js')
280
- org_mtime = mtime_of(expected_js_path)
280
+ org_mtime = file_mtime_of(expected_js_path)
281
281
 
282
282
  ensure_file_mtime_changes do
283
283
  find_and_gsub_in_file(source_path('_layouts/default.html'), 'id: my-scripts', 'id: my-scripts2')
@@ -285,7 +285,7 @@ module Jekyll::Minibundle::Test
285
285
 
286
286
  generate_site(:development, clear_cache: false)
287
287
 
288
- assert_equal org_mtime, mtime_of(expected_js_path)
288
+ assert_equal org_mtime, file_mtime_of(expected_js_path)
289
289
  end
290
290
  end
291
291
 
@@ -294,7 +294,7 @@ module Jekyll::Minibundle::Test
294
294
  generate_site(:development)
295
295
 
296
296
  expected_js_path = destination_path(JS_BUNDLE_DESTINATION_PATH, 'app.js')
297
- org_mtime = mtime_of(expected_js_path)
297
+ org_mtime = file_mtime_of(expected_js_path)
298
298
 
299
299
  ensure_file_mtime_changes do
300
300
  find_and_gsub_in_file(source_path('_layouts/default.html'), '{% minibundle js %}', "{% minibundle js %}\n baseurl: /js-root")
@@ -302,7 +302,7 @@ module Jekyll::Minibundle::Test
302
302
 
303
303
  generate_site(:development, clear_cache: false)
304
304
 
305
- assert_equal org_mtime, mtime_of(expected_js_path)
305
+ assert_equal org_mtime, file_mtime_of(expected_js_path)
306
306
  end
307
307
  end
308
308
 
@@ -103,14 +103,14 @@ module Jekyll::Minibundle::Test
103
103
  with_site_dir do
104
104
  generate_site(:production)
105
105
 
106
- org_mtime = mtime_of(destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH))
106
+ org_mtime = file_mtime_of(destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH))
107
107
  ensure_file_mtime_changes { FileUtils.touch(source_path(JS_BUNDLE_SOURCE_DIR, 'app.js')) }
108
108
 
109
109
  generate_site(:production, clear_cache: false)
110
110
 
111
111
  assert_equal JS_BUNDLE_DESTINATION_FINGERPRINT_PATH, find_js_path_from_index
112
112
  assert File.exist?(destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH))
113
- assert_operator mtime_of(destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH)), :>, org_mtime
113
+ assert_operator file_mtime_of(destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH)), :>, org_mtime
114
114
  end
115
115
  end
116
116
 
@@ -118,7 +118,7 @@ module Jekyll::Minibundle::Test
118
118
  with_site_dir do
119
119
  generate_site(:production)
120
120
 
121
- org_mtime = mtime_of(destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH))
121
+ org_mtime = file_mtime_of(destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH))
122
122
 
123
123
  match_snippet = <<-END
124
124
  {% minibundle js %}
@@ -137,7 +137,7 @@ module Jekyll::Minibundle::Test
137
137
 
138
138
  generate_site(:production, clear_cache: false)
139
139
 
140
- new_mtime = mtime_of(destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH))
140
+ new_mtime = file_mtime_of(destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH))
141
141
 
142
142
  assert_operator new_mtime, :>, org_mtime
143
143
  end
@@ -177,6 +177,8 @@ module Jekyll::Minibundle::Test
177
177
 
178
178
  def test_changing_asset_source_list_removes_old_temporary_bundle_file
179
179
  with_site_dir do
180
+ other_tempfiles = find_tempfiles('*.js')
181
+
180
182
  generate_site(:production)
181
183
 
182
184
  assert File.exist?(destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH))
@@ -192,7 +194,7 @@ module Jekyll::Minibundle::Test
192
194
  - dependency
193
195
  END
194
196
 
195
- org_tempfiles = find_tempfiles
197
+ old_tempfiles = find_tempfiles('*.js') - other_tempfiles
196
198
 
197
199
  ensure_file_mtime_changes do
198
200
  find_and_gsub_in_file(source_path('_layouts/default.html'), match_snippet, replacement_snippet)
@@ -202,7 +204,7 @@ module Jekyll::Minibundle::Test
202
204
 
203
205
  refute File.exist?(destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH))
204
206
  assert File.exist?(destination_path('assets/site-71042d0b7c86c04e015fde694dd9f409.js'))
205
- assert_equal 1, (org_tempfiles - find_tempfiles).size
207
+ assert((find_tempfiles('*.js') & old_tempfiles).empty?)
206
208
  end
207
209
  end
208
210
 
@@ -229,11 +231,13 @@ module Jekyll::Minibundle::Test
229
231
 
230
232
  def test_changing_asset_destination_path_removes_old_temporary_bundle_file
231
233
  with_site_dir do
234
+ other_tempfiles = find_tempfiles('*.js')
235
+
232
236
  generate_site(:production)
233
237
 
234
238
  assert File.exist?(destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH))
235
239
 
236
- org_tempfiles = find_tempfiles
240
+ old_tempfiles = find_tempfiles('*.js') - other_tempfiles
237
241
 
238
242
  ensure_file_mtime_changes do
239
243
  change_destination_path_in_minibundle_block('assets/site', 'assets/site2')
@@ -241,11 +245,9 @@ module Jekyll::Minibundle::Test
241
245
 
242
246
  generate_site(:production, clear_cache: false)
243
247
 
244
- sleep 1 # wait for unlinked temp files to actually disappear
245
-
246
248
  refute File.exist?(destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH))
247
249
  assert File.exist?(destination_path("assets/site2-#{JS_BUNDLE_FINGERPRINT}.js"))
248
- assert_equal 1, (org_tempfiles - find_tempfiles).size
250
+ assert((find_tempfiles('*.js') & old_tempfiles).empty?)
249
251
  end
250
252
  end
251
253
 
@@ -286,7 +288,7 @@ module Jekyll::Minibundle::Test
286
288
 
287
289
  assert_equal 0, get_minifier_cmd_count
288
290
  destination = destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH)
289
- org_mtime = mtime_of(destination)
291
+ org_mtime = file_mtime_of(destination)
290
292
 
291
293
  match_snippet = <<-END
292
294
  {% minibundle js %}
@@ -304,7 +306,7 @@ module Jekyll::Minibundle::Test
304
306
  generate_site(:production, clear_cache: false)
305
307
 
306
308
  assert_equal 1, get_minifier_cmd_count
307
- assert_operator mtime_of(destination), :>, org_mtime
309
+ assert_operator file_mtime_of(destination), :>, org_mtime
308
310
  end
309
311
  end
310
312
 
@@ -392,7 +394,7 @@ module Jekyll::Minibundle::Test
392
394
  generate_site(:production, minifier_cmd_js: minifier_cmd_to_remove_comments_and_count)
393
395
 
394
396
  expected_js_path = destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH)
395
- org_mtime = mtime_of(expected_js_path)
397
+ org_mtime = file_mtime_of(expected_js_path)
396
398
 
397
399
  assert_equal 1, get_minifier_cmd_count
398
400
 
@@ -400,14 +402,14 @@ module Jekyll::Minibundle::Test
400
402
 
401
403
  generate_site(:production, clear_cache: false, minifier_cmd_js: minifier_cmd_to_remove_comments_and_count)
402
404
 
403
- assert_equal org_mtime, mtime_of(expected_js_path)
405
+ assert_equal org_mtime, file_mtime_of(expected_js_path)
404
406
  assert_equal 1, get_minifier_cmd_count
405
407
 
406
408
  ensure_file_mtime_changes { FileUtils.touch('index.html') }
407
409
 
408
410
  generate_site(:production, clear_cache: false, minifier_cmd_js: minifier_cmd_to_remove_comments_and_count)
409
411
 
410
- assert_equal org_mtime, mtime_of(expected_js_path)
412
+ assert_equal org_mtime, file_mtime_of(expected_js_path)
411
413
  assert_equal 1, get_minifier_cmd_count
412
414
  end
413
415
  end
@@ -417,7 +419,7 @@ module Jekyll::Minibundle::Test
417
419
  generate_site(:production, minifier_cmd_js: minifier_cmd_to_remove_comments_and_count)
418
420
 
419
421
  expected_js_path = destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH)
420
- org_mtime = mtime_of(expected_js_path)
422
+ org_mtime = file_mtime_of(expected_js_path)
421
423
 
422
424
  assert_equal 1, get_minifier_cmd_count
423
425
 
@@ -427,7 +429,7 @@ module Jekyll::Minibundle::Test
427
429
 
428
430
  generate_site(:production, clear_cache: false, minifier_cmd_js: minifier_cmd_to_remove_comments_and_count)
429
431
 
430
- assert_equal org_mtime, mtime_of(expected_js_path)
432
+ assert_equal org_mtime, file_mtime_of(expected_js_path)
431
433
  assert_equal 1, get_minifier_cmd_count
432
434
  end
433
435
  end
@@ -437,7 +439,7 @@ module Jekyll::Minibundle::Test
437
439
  generate_site(:production, minifier_cmd_js: minifier_cmd_to_remove_comments_and_count)
438
440
 
439
441
  expected_js_path = destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH)
440
- org_mtime = mtime_of(expected_js_path)
442
+ org_mtime = file_mtime_of(expected_js_path)
441
443
 
442
444
  assert_equal 1, get_minifier_cmd_count
443
445
 
@@ -447,7 +449,7 @@ module Jekyll::Minibundle::Test
447
449
 
448
450
  generate_site(:production, clear_cache: false, minifier_cmd_js: minifier_cmd_to_remove_comments_and_count)
449
451
 
450
- assert_equal org_mtime, mtime_of(expected_js_path)
452
+ assert_equal org_mtime, file_mtime_of(expected_js_path)
451
453
  assert_equal 1, get_minifier_cmd_count
452
454
  end
453
455
  end
@@ -517,6 +519,15 @@ title: Test
517
519
  end
518
520
  end
519
521
 
522
+ def test_destination_file_respects_umask
523
+ with_site_dir do
524
+ with_umask(0o027) do
525
+ generate_site(:production)
526
+ assert_equal 0o640, file_permissions_of(destination_path(JS_BUNDLE_DESTINATION_FINGERPRINT_PATH))
527
+ end
528
+ end
529
+ end
530
+
520
531
  private
521
532
 
522
533
  def find_css_element_from_index
@@ -562,8 +573,8 @@ title: Test
562
573
  find_and_gsub_in_file(source_path('_layouts/default.html'), match_snippet, replacement_snippet)
563
574
  end
564
575
 
565
- def find_tempfiles
566
- Dir[File.join(Dir.tmpdir, AssetBundle::TEMPFILE_PREFIX + '*')]
576
+ def find_tempfiles(glob)
577
+ Dir[File.join(Dir.tmpdir, AssetBundle::TEMPFILE_PREFIX + glob)]
567
578
  end
568
579
  end
569
580
  end
@@ -24,12 +24,12 @@ module Jekyll::Minibundle::Test
24
24
  with_site_dir do
25
25
  generate_site(:development)
26
26
 
27
- org_mtime = mtime_of(destination_path(STAMP_DESTINATION_PATH))
27
+ org_mtime = file_mtime_of(destination_path(STAMP_DESTINATION_PATH))
28
28
  ensure_file_mtime_changes { File.write(source_path(STAMP_SOURCE_PATH), 'h1 {}') }
29
29
 
30
30
  generate_site(:development, clear_cache: false)
31
31
 
32
- new_mtime = mtime_of(destination_path(STAMP_DESTINATION_PATH))
32
+ new_mtime = file_mtime_of(destination_path(STAMP_DESTINATION_PATH))
33
33
  assert_operator new_mtime, :>, org_mtime
34
34
  end
35
35
  end
@@ -38,12 +38,12 @@ module Jekyll::Minibundle::Test
38
38
  with_site_dir do
39
39
  generate_site(:development)
40
40
 
41
- org_mtime = mtime_of(destination_path(STAMP_DESTINATION_PATH))
41
+ org_mtime = file_mtime_of(destination_path(STAMP_DESTINATION_PATH))
42
42
  ensure_file_mtime_changes { FileUtils.touch(source_path(STAMP_SOURCE_PATH)) }
43
43
 
44
44
  generate_site(:development, clear_cache: false)
45
45
 
46
- new_mtime = mtime_of(destination_path(STAMP_DESTINATION_PATH))
46
+ new_mtime = file_mtime_of(destination_path(STAMP_DESTINATION_PATH))
47
47
  assert_operator new_mtime, :>, org_mtime
48
48
  end
49
49
  end
@@ -52,7 +52,7 @@ module Jekyll::Minibundle::Test
52
52
  with_site_dir do
53
53
  generate_site(:development)
54
54
 
55
- org_mtime = mtime_of(destination_path(STAMP_DESTINATION_PATH))
55
+ org_mtime = file_mtime_of(destination_path(STAMP_DESTINATION_PATH))
56
56
 
57
57
  ensure_file_mtime_changes do
58
58
  FileUtils.mv(source_path('_tmp/site.css'), source_path('_tmp/site2.css'))
@@ -66,7 +66,7 @@ module Jekyll::Minibundle::Test
66
66
 
67
67
  generate_site(:development, clear_cache: false)
68
68
 
69
- new_mtime = mtime_of(destination_path(STAMP_DESTINATION_PATH))
69
+ new_mtime = file_mtime_of(destination_path(STAMP_DESTINATION_PATH))
70
70
 
71
71
  assert_operator new_mtime, :>, org_mtime
72
72
  end
@@ -161,18 +161,18 @@ module Jekyll::Minibundle::Test
161
161
  generate_site(:development)
162
162
 
163
163
  expected_path = destination_path(STAMP_DESTINATION_PATH)
164
- org_mtime = mtime_of(expected_path)
164
+ org_mtime = file_mtime_of(expected_path)
165
165
  ensure_file_mtime_changes { File.write(source_path(JS_BUNDLE_SOURCE_DIR, 'dependency.js'), '(function() {})()') }
166
166
 
167
167
  generate_site(:development, clear_cache: false)
168
168
 
169
- assert_equal org_mtime, mtime_of(expected_path)
169
+ assert_equal org_mtime, file_mtime_of(expected_path)
170
170
 
171
171
  ensure_file_mtime_changes { FileUtils.touch('index.html') }
172
172
 
173
173
  generate_site(:development, clear_cache: false)
174
174
 
175
- assert_equal org_mtime, mtime_of(expected_path)
175
+ assert_equal org_mtime, file_mtime_of(expected_path)
176
176
  end
177
177
  end
178
178
 
@@ -41,13 +41,13 @@ module Jekyll::Minibundle::Test
41
41
  with_site_dir do
42
42
  generate_site(:production)
43
43
 
44
- org_mtime = mtime_of(destination_path(STAMP_DESTINATION_FINGERPRINT_PATH))
44
+ org_mtime = file_mtime_of(destination_path(STAMP_DESTINATION_FINGERPRINT_PATH))
45
45
  ensure_file_mtime_changes { FileUtils.touch(source_path(STAMP_SOURCE_PATH)) }
46
46
  generate_site(:production, clear_cache: false)
47
47
 
48
48
  assert_equal STAMP_DESTINATION_FINGERPRINT_PATH, find_css_path_from_index
49
49
 
50
- new_mtime = mtime_of(destination_path(STAMP_DESTINATION_FINGERPRINT_PATH))
50
+ new_mtime = file_mtime_of(destination_path(STAMP_DESTINATION_FINGERPRINT_PATH))
51
51
  assert_operator new_mtime, :>, org_mtime
52
52
  end
53
53
  end
@@ -56,7 +56,7 @@ module Jekyll::Minibundle::Test
56
56
  with_site_dir do
57
57
  generate_site(:production)
58
58
 
59
- org_mtime = mtime_of(destination_path(STAMP_DESTINATION_FINGERPRINT_PATH))
59
+ org_mtime = file_mtime_of(destination_path(STAMP_DESTINATION_FINGERPRINT_PATH))
60
60
 
61
61
  ensure_file_mtime_changes do
62
62
  FileUtils.mv(source_path('_tmp/site.css'), source_path('_tmp/site2.css'))
@@ -70,7 +70,7 @@ module Jekyll::Minibundle::Test
70
70
 
71
71
  generate_site(:production, clear_cache: false)
72
72
 
73
- new_mtime = mtime_of(destination_path(STAMP_DESTINATION_FINGERPRINT_PATH))
73
+ new_mtime = file_mtime_of(destination_path(STAMP_DESTINATION_FINGERPRINT_PATH))
74
74
 
75
75
  assert_operator new_mtime, :>, org_mtime
76
76
  end
@@ -165,18 +165,18 @@ module Jekyll::Minibundle::Test
165
165
  generate_site(:production)
166
166
 
167
167
  expected_path = destination_path(STAMP_DESTINATION_FINGERPRINT_PATH)
168
- org_mtime = mtime_of(expected_path)
168
+ org_mtime = file_mtime_of(expected_path)
169
169
  ensure_file_mtime_changes { File.write(source_path(JS_BUNDLE_SOURCE_DIR, 'dependency.js'), '(function() {})()') }
170
170
 
171
171
  generate_site(:production, clear_cache: false)
172
172
 
173
- assert_equal org_mtime, mtime_of(expected_path)
173
+ assert_equal org_mtime, file_mtime_of(expected_path)
174
174
 
175
175
  ensure_file_mtime_changes { FileUtils.touch('index.html') }
176
176
 
177
177
  generate_site(:production, clear_cache: false)
178
178
 
179
- assert_equal org_mtime, mtime_of(expected_path)
179
+ assert_equal org_mtime, file_mtime_of(expected_path)
180
180
  end
181
181
  end
182
182