magro 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8bfcf8b7886c7fa5d89556642be97b077f6bf96d7a1725fd2cb8cf1b15c0aef
4
- data.tar.gz: b0ab5bff6959f1264ed584dcefc25fb7a64fc866164f73dcf11b1556e7cf6377
3
+ metadata.gz: c0f74c38e2926ef457007ee28be4eb37fa563aa22cde82ad44a800b89c4548d7
4
+ data.tar.gz: 6e5d4404ffaea48bdae59dbdeb7d11bf3b8a7ba7883d3e36d9b2106931e80cad
5
5
  SHA512:
6
- metadata.gz: f40b650588ec98b33aa8d88bd5c0fb11d4dc8b14faaa197751275f478c2c316e7348b5bd1ff4cc55d33e451036b6b6411fc4f60d9d374c787c91d30ff661abc4
7
- data.tar.gz: 7df4bfc3e747f2e8d8fb2dad307df3a0b6370fae1b6c53df66797252629851cf57ab256fdcc64088950ce9177ee2d6ca3a694e498588dc3b4baeef17c771d928
6
+ metadata.gz: f2ad54fd188784f89e593d542fc11faeebed3db60498ff74d36fc3a174ea36957aee7e3b9fe1097578ddf7c4e684f0b12c9fa0f9128acfe3e55dff2803b10ddb
7
+ data.tar.gz: ede89931ba5d684ab0961caa7234b30f579830769704a0fe9c0ab4c49e070cc977efca59dab71400a94518e494634e723ae186bcb623aa8c250a2ab32b44dd72
@@ -1 +1 @@
1
- service_name: travis-ci
1
+ service_name: github-ci
@@ -0,0 +1,23 @@
1
+ name: build
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-20.04
8
+ strategy:
9
+ matrix:
10
+ ruby: [ '2.5', '2.6', '2.7' ]
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ - name: Install libpng and libjpeg
14
+ run: sudo apt-get install -y libpng-dev libjpeg-dev
15
+ - name: Set up Ruby ${{ matrix.ruby }}
16
+ uses: actions/setup-ruby@v1
17
+ with:
18
+ ruby-version: ${{ matrix.ruby }}
19
+ - name: Build and test with Rake
20
+ run: |
21
+ gem install bundler
22
+ bundle install --jobs 4 --retry 3
23
+ bundle exec rake
@@ -0,0 +1,29 @@
1
+ name: coverage
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ coverage:
11
+ runs-on: ubuntu-20.04
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: Install libpng and libjpeg
15
+ run: sudo apt-get install -y libpng-dev libjpeg-dev
16
+ - uses: actions/checkout@v2
17
+ - name: Set up Ruby 2.7
18
+ uses: actions/setup-ruby@v1
19
+ with:
20
+ ruby-version: '2.7'
21
+ - name: Build and test with Rake
22
+ run: |
23
+ gem install bundler
24
+ bundle install
25
+ bundle exec rake
26
+ - name: Coveralls GitHub Action
27
+ uses: coverallsapp/github-action@v1.1.2
28
+ with:
29
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -1,3 +1,7 @@
1
+ # 0.4.1
2
+ - Add GC guard to narray given to native extension method.
3
+ - Fix some configulation files.
4
+
1
5
  # 0.4.0
2
6
  - Rename extension file for reading and writing image file.
3
7
  - Update documentations.
data/Gemfile CHANGED
@@ -3,8 +3,9 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in magro.gemspec
4
4
  gemspec
5
5
 
6
- gem 'coveralls', '~> 0.8'
7
6
  gem 'bundler', '~> 2.0'
8
7
  gem 'rake', '~> 12.0'
9
8
  gem 'rake-compiler', '~> 1.0'
10
9
  gem 'rspec', '~> 3.0'
10
+ gem 'simplecov', '~> 0.19'
11
+ gem 'simplecov-lcov', '~> 0.8'
@@ -1,4 +1,4 @@
1
- Copyright (c) 2019-2020 Atsushi Tatsuma
1
+ Copyright (c) 2019-2021 Atsushi Tatsuma
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Magro
2
2
 
3
- [![Build Status](https://travis-ci.org/yoshoku/magro.svg?branch=master)](https://travis-ci.org/yoshoku/magro)
3
+ [![Build Status](https://github.com/yoshoku/magro/workflows/build/badge.svg)](https://github.com/yoshoku/magro/actions?query=workflow%3Abuild)
4
4
  [![Coverage Status](https://coveralls.io/repos/github/yoshoku/magro/badge.svg?branch=master)](https://coveralls.io/github/yoshoku/magro?branch=master)
5
5
  [![Gem Version](https://badge.fury.io/rb/magro.svg)](https://badge.fury.io/rb/magro)
6
- [![BSD 3-Clause License](https://img.shields.io/badge/License-BSD%203--Clause-orange.svg)](https://github.com/yoshoku/numo-liblinear/blob/master/LICENSE.txt)
6
+ [![BSD 3-Clause License](https://img.shields.io/badge/License-BSD%203--Clause-orange.svg)](https://github.com/yoshoku/numo-liblinear/blob/main/LICENSE.txt)
7
7
  [![Documentation](http://img.shields.io/badge/api-reference-blue.svg)](https://yoshoku.github.io/magro/doc/)
8
8
 
9
9
  Magro is a minimal image processing library in Ruby.
@@ -63,4 +63,4 @@ This project is intended to be a safe, welcoming space for collaboration, and co
63
63
 
64
64
  ## Code of Conduct
65
65
 
66
- Everyone interacting in the Magro project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yoshoku/magro/blob/master/CODE_OF_CONDUCT.md).
66
+ Everyone interacting in the Magro project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yoshoku/magro/blob/main/CODE_OF_CONDUCT.md).
@@ -226,6 +226,8 @@ VALUE magro_io_save_png(VALUE self, VALUE filename_, VALUE image)
226
226
  png_free(png_ptr, row_ptr_ptr);
227
227
  png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
228
228
 
229
+ RB_GC_GUARD(image);
230
+
229
231
  return Qtrue;
230
232
  }
231
233
 
@@ -398,6 +400,8 @@ VALUE magro_io_save_jpg(int argc, VALUE* argv, VALUE self)
398
400
 
399
401
  fclose(file_ptr);
400
402
 
403
+ RB_GC_GUARD(image);
404
+
401
405
  return Qtrue;
402
406
  }
403
407
 
@@ -3,5 +3,5 @@
3
3
  # Magro is an image processing library in Ruby.
4
4
  module Magro
5
5
  # The version of Magro you are using.
6
- VERSION = '0.4.0'
6
+ VERSION = '0.4.1'
7
7
  end
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.metadata['homepage_uri'] = spec.homepage
23
23
  spec.metadata['source_code_uri'] = 'https://github.com/yoshoku/magro'
24
- spec.metadata['changelog_uri'] = 'https://github.com/yoshoku/magro/blob/master/CHANGELOG.md'
24
+ spec.metadata['changelog_uri'] = 'https://github.com/yoshoku/magro/blob/main/CHANGELOG.md'
25
25
  spec.metadata['documentation_uri'] = 'https://yoshoku.github.io/magro/doc/'
26
26
 
27
27
  # Specify which files should be added to the gem when it is released.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshoku
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-25 00:00:00.000000000 Z
11
+ date: 2021-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: numo-narray
@@ -37,9 +37,10 @@ extensions:
37
37
  extra_rdoc_files: []
38
38
  files:
39
39
  - ".coveralls.yml"
40
+ - ".github/workflows/build.yml"
41
+ - ".github/workflows/coverage.yml"
40
42
  - ".gitignore"
41
43
  - ".rspec"
42
- - ".travis.yml"
43
44
  - CHANGELOG.md
44
45
  - CODE_OF_CONDUCT.md
45
46
  - Gemfile
@@ -65,7 +66,7 @@ licenses:
65
66
  metadata:
66
67
  homepage_uri: https://github.com/yoshoku/magro
67
68
  source_code_uri: https://github.com/yoshoku/magro
68
- changelog_uri: https://github.com/yoshoku/magro/blob/master/CHANGELOG.md
69
+ changelog_uri: https://github.com/yoshoku/magro/blob/main/CHANGELOG.md
69
70
  documentation_uri: https://yoshoku.github.io/magro/doc/
70
71
  post_install_message:
71
72
  rdoc_options: []
@@ -82,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
83
  - !ruby/object:Gem::Version
83
84
  version: '0'
84
85
  requirements: []
85
- rubygems_version: 3.1.2
86
+ rubygems_version: 3.1.4
86
87
  signing_key:
87
88
  specification_version: 4
88
89
  summary: Magro is a minimal image processing library for Ruby.
@@ -1,19 +0,0 @@
1
- ---
2
- os: linux
3
- dist: bionic
4
- language: ruby
5
- cache: bundler
6
- rvm:
7
- - '2.4'
8
- - '2.5'
9
- - '2.6'
10
- - '2.7'
11
-
12
- addons:
13
- apt:
14
- packages:
15
- - libpng-dev
16
- - libjpeg-dev
17
-
18
- before_install:
19
- - gem install bundler -v 2.1.4