Skip to content

Commit adb36d0

Browse files
committed
Fix treatment of spaces in file names
1 parent da841ed commit adb36d0

File tree

5 files changed

+14
-2
lines changed

5 files changed

+14
-2
lines changed

lib/revealing/tasks/assets.rake

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ refute_duplicate_basename(RESIZABLE_ASSETS)
2626
RESIZED_ASSETS.zip(RESIZABLE_ASSETS).each do |target, source|
2727
desc "Resize #{source} to #{target}"
2828
file target => source do
29-
sh "gm convert #{source} -geometry '1920x1080>' #{target}"
29+
sh "gm convert '#{source}' -geometry '1920x1080>' '#{target}'"
3030
end
3131
end
3232

lib/revealing/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Revealing
4-
VERSION = '1.6.0'
4+
VERSION = '1.7.0'
55
end

spec/fixtures/images/a mouse.jpg

142 KB
Loading

spec/fixtures/images/index.markdown

+8
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,11 @@ Author: [Dimitris Vetsikas](https://pixabay.com/users/dimitrisvetsikas1969/)
1313
Image from [Pixabay](https://pixabay.com/photos/dog-dog-runs-animal-nature-fun-1551709/)
1414

1515
Authors: [Tom und Nicki Löschner](https://pixabay.com/users/tonic-pics)
16+
17+
# Mouse
18+
19+
![SneakerMouse-0436](a mouse.jpg)
20+
21+
Image from [flickr](https://www.flickr.com/photos/59504749@N00/529303113) licensed under [CC BY-NC-SA 2.0](https://creativecommons.org/licenses/by-nc-sa/2.0/?ref=ccsearch&atype=html)
22+
23+
Author: [Kadath](https://www.flickr.com/photos/59504749@N00)

spec/system/images_spec.rb

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
expect(last_command_started).to be_successfully_executed, lambda { last_command_started.output }
1717
end
1818

19+
it 'handles images with spaces in the file name' do
20+
expect(project_directory / 'public_html/a mouse.jpg').to exist
21+
end
22+
1923
it 'resizes images to not be wider than 1920px' do
2024
expect(Image.new(project_directory / 'public_html/cat-1608581.jpg').width).to be <= 1920
2125
expect(Image.new(project_directory / 'public_html/dog-1551709.jpg').width).to be <= 1920

0 commit comments

Comments
 (0)