Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/tests n bump supported ruby #200

Merged
merged 6 commits into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ jobs:
- 2.7
- 2.6
- 2.5
- 2.4
- 2.3
- 2.2
- jruby
steps:
- name: Checkout
Expand Down Expand Up @@ -65,12 +62,11 @@ jobs:
- 2.7
- 2.6
- 2.5
- 2.4
- 2.3
- 2.2
- jruby
experimental: [false]
include:
- ruby: 3.1
experimental: true
- ruby: 3.0
experimental: true
steps:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.0.0
* Dropping support for Ruby 2.2.X, 2.3.X and 2.4.X

## 0.29.1
* Fix handling of 200 responses with `parse_http` as well as handling of very small responses which do not need range access

Expand Down
2 changes: 1 addition & 1 deletion lib/format_parser/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module FormatParser
VERSION = '0.29.1'
VERSION = '1.0.0'
end
Binary file added spec/fixtures/PNG/cat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions spec/integration/active_storage/rails_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,22 @@ class User < ActiveRecord::Base
require 'minitest/autorun'
require 'open-uri'

fixtures_dir = File.join(File.dirname(__FILE__), '../../fixtures')

describe User do
describe "profile_picture's metadatas" do
it 'parse metadatas with format_parser' do
fixture_path = fixtures_dir + '/PNG/cat.png'
user = User.create
user.profile_picture.attach(
filename: 'cat.png',
io: URI.open('https://freesvg.org/img/1416155153.png')
io: File.open(fixture_path, 'rb')
)

user.profile_picture.analyze

_(user.profile_picture.metadata[:width_px]).must_equal 500
_(user.profile_picture.metadata[:height_px]).must_equal 296
_(user.profile_picture.metadata[:width_px]).must_equal 600
_(user.profile_picture.metadata[:height_px]).must_equal 600
_(user.profile_picture.metadata[:color_mode]).must_equal 'rgba'
end
end
Expand Down