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

refactor: improve test capability and coverage #24

Merged
merged 7 commits into from
Oct 22, 2024
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
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
sudo apt-get install -yqq liblcms2-utils libglib2.0-dev libgtk2.0-dev libgdk-pixbuf2.0-dev
- name: checkout repo
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: unlock the gem versions
run: rm Gemfile.lock
- name: set up ruby environment
uses: ruby/setup-ruby@v1
with:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
.DS_Store
.config
.yardoc
Gemfile*.lock
InstalledFiles
_yardoc
coverage
Expand Down
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ inherit_from: .rubocop_todo.yml

AllCops:
NewCops: enable

Metrics/BlockLength:
CountAsOne: ['array', 'hash', 'heredoc', 'method_call']
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## Unreleased
### Added
- Better test coverage for straighten operation
- Support for visual image comparison in specs

### Changed
- Extracted image operations to separate files within a dedicated module
- [BREAKING] Introduced raising Morandi's own errors instead of bubbling Pixbuf's

### Fixed
- Updated required ruby version in gemspec to reflect dropping Ruby 2.3 support

## [0.99.03] 19.09.2024
### Added
- Copied pixbufutils and redeye gems into main gem
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.7-slim
FROM ruby:3.3-slim

LABEL Name=morandirb Version=0.0.2

Expand All @@ -17,9 +17,11 @@ RUN apt-get update && apt-get install -yyq --no-install-recommends \
RUN gem update --system 3.4.22

WORKDIR /app
COPY morandi.gemspec Gemfile ./
COPY morandi.gemspec Gemfile Gemfile.lock ./
COPY lib/morandi/version.rb lib/morandi/version.rb
RUN bundle install
COPY . /app
# Compile the native extensions
RUN bundle exec rake compile

CMD ["bundle", "exec", "guard"]
152 changes: 152 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
PATH
remote: .
specs:
morandi (0.99.03)
atk (~> 4.0)
cairo (~> 1.0)
colorscore (~> 0.0)
gdk_pixbuf2 (~> 4.0)
pango (~> 4.0)
rake-compiler (~> 1.2)

GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
atk (4.2.4)
glib2 (= 4.2.4)
attr_extras (7.1.0)
cairo (1.17.13)
native-package-installer (>= 1.0.3)
pkg-config (>= 1.2.2)
red-colors
cairo-gobject (4.2.4)
cairo (>= 1.16.2)
glib2 (= 4.2.4)
coderay (1.1.3)
color (1.8)
colorscore (0.0.5)
color
diff-lcs (1.5.1)
docile (1.4.1)
ffi (1.17.0-x86_64-linux-gnu)
fiddle (1.1.3)
formatador (1.1.0)
gdk_pixbuf2 (4.2.4)
gio2 (= 4.2.4)
gio2 (4.2.4)
fiddle
gobject-introspection (= 4.2.4)
glib2 (4.2.4)
native-package-installer (>= 1.0.3)
pkg-config (>= 1.3.5)
gobject-introspection (4.2.4)
glib2 (= 4.2.4)
guard (2.18.1)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.13.0)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-rspec (4.7.3)
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
json (2.7.2)
language_server-protocol (3.17.0.3)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
lumberjack (1.2.10)
matrix (0.4.2)
method_source (1.1.0)
native-package-installer (1.1.9)
nenv (0.3.0)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
optimist (3.1.0)
pango (4.2.4)
cairo-gobject (= 4.2.4)
gobject-introspection (= 4.2.4)
parallel (1.26.3)
parser (3.3.5.0)
ast (~> 2.4.1)
racc
patience_diff (1.2.0)
optimist (~> 3.0)
pkg-config (1.5.6)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
racc (1.8.1)
rainbow (3.1.1)
rake (13.2.1)
rake-compiler (1.2.8)
rake
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
red-colors (0.4.0)
json
matrix
regexp_parser (2.9.2)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.1)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubocop (1.67.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.3)
parser (>= 3.3.1.0)
ruby-progressbar (1.13.0)
shellany (0.0.1)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.13.1)
simplecov_json_formatter (0.1.4)
super_diff (0.9.0)
attr_extras (>= 6.2.4)
diff-lcs
patience_diff
thor (1.3.2)
unicode-display_width (2.6.0)

PLATFORMS
x86_64-linux

DEPENDENCIES
guard
guard-rspec
morandi!
rake
rspec
rubocop
simplecov
super_diff

BUNDLED WITH
2.4.22
2 changes: 1 addition & 1 deletion morandi.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
spec.homepage = 'https://github.com/livelink/morandi-rb'
spec.license = 'MIT'

spec.required_ruby_version = '>= 2.0'
spec.required_ruby_version = '>= 2.7'
spec.files = Dir['CHANGELOG.md', 'LICENSE.txt', 'README.md', 'ext/**/*', 'lib/**/*']
spec.require_paths = ['lib']

Expand Down
Binary file added spec/fixtures/pumpkins-icc-adobe-rgb-1998.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading