Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
toy committed May 10, 2024
1 parent b476b0d commit 48c9952
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
gem install bundler || gem install bundler --version '< 2.4'
bundle install
- run: bundle exec bin/image_optim --info
- run: bundle exec rspec
- run: bundle exec rspec --example jhead
# windows:
# runs-on: windows-latest
# strategy:
Expand Down
5 changes: 4 additions & 1 deletion lib/image_optim/worker/jhead.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@ def optimize(src, dst, options = {})
#{dst}
]
resolve_bin!(:jpegtran)
execute(:jhead, args, options) && dst.size?
p(execute(:jhead, args, options)) && p(dst.size?)
end

private

def oriented?(image)
exif = EXIFR::JPEG.new(image.to_s)
p exif
p exif.orientation
p exif.orientation.to_i
ORIENTED.include?(exif.orientation.to_i)
end
end
Expand Down
1 change: 1 addition & 0 deletions spec/image_optim_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def temp_copy(image)
end

expect(test_images.any? do |original|
puts "#{'#' * 10} #{original}"
image_optim.optimize_image(temp_copy(original))
end).to be true
end
Expand Down

0 comments on commit 48c9952

Please sign in to comment.