pnglitch 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +35 -0
- data/LICENSE.txt +1 -1
- data/README.md +2 -2
- data/lib/pnglitch.rb +2 -3
- data/lib/pnglitch/scanline.rb +2 -2
- data/pnglitch.gemspec +2 -2
- metadata +15 -15
- data/.travis.yml +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 716d541bdb32f71bd1f4aeac27b4b716590a0a220e3ef7c15013b1a5e8bb9e80
|
4
|
+
data.tar.gz: 36c0afee13ba89d011c5a42abe980cf31b318d047cbc0a8210deee07b5baf5f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf5600205ca67b533d595ca2540dc5b61370b47438803361eef5f388c2daedf52e73fd08ad6b10ed73a1f511ac6e76c7ef18002f3b8a299a08a42d66c52627c4
|
7
|
+
data.tar.gz: 21d1eb3e77bfa334e6ebb15714cf2b3e18277011aafc56dedb8faa7705ea0b9ad00892c7933b01311da4614576637d569c53ddff24484f8e92877caac0b00b52
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: test
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ master ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ master ]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
test:
|
18
|
+
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
strategy:
|
21
|
+
matrix:
|
22
|
+
ruby-version: ['2.6', '2.7', '3.0']
|
23
|
+
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v2
|
26
|
+
- name: Set up Ruby
|
27
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
28
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
29
|
+
# uses: ruby/setup-ruby@v1
|
30
|
+
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
|
31
|
+
with:
|
32
|
+
ruby-version: ${{ matrix.ruby-version }}
|
33
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
34
|
+
- name: Run tests
|
35
|
+
run: bundle exec rake
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# PNGlitch
|
2
2
|
|
3
|
-
[![
|
4
|
-
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/pnglitch.svg)](https://badge.fury.io/rb/pnglitch)
|
4
|
+
[![test](https://github.com/ucnv/pnglitch/actions/workflows/ruby.yml/badge.svg)](https://github.com/ucnv/pnglitch/actions/workflows/ruby.yml)
|
5
5
|
|
6
6
|
PNGlitch is a Ruby library to destroy your PNG images.
|
7
7
|
|
data/lib/pnglitch.rb
CHANGED
@@ -192,7 +192,7 @@ require 'pnglitch/base'
|
|
192
192
|
# But sometimes this scratch could break the compression and make the file unopenable.
|
193
193
|
#
|
194
194
|
module PNGlitch
|
195
|
-
VERSION = '0.0.
|
195
|
+
VERSION = '0.0.5'
|
196
196
|
|
197
197
|
class << self
|
198
198
|
|
@@ -228,11 +228,10 @@ module PNGlitch
|
|
228
228
|
#
|
229
229
|
# PNGlitch.open(infile, limit_of_decompressed_data_size: 1024 ** 3)
|
230
230
|
#
|
231
|
-
def open file, options = {}
|
231
|
+
def open file, options = {}, &block
|
232
232
|
base = Base.new file, options[:limit_of_decompressed_data_size]
|
233
233
|
if block_given?
|
234
234
|
begin
|
235
|
-
block = Proc.new
|
236
235
|
if block.arity == 0
|
237
236
|
base.instance_eval &block
|
238
237
|
else
|
data/lib/pnglitch/scanline.rb
CHANGED
@@ -11,7 +11,7 @@ module PNGlitch
|
|
11
11
|
#
|
12
12
|
# Instanciate.
|
13
13
|
#
|
14
|
-
def initialize io, start_at, data_size, at
|
14
|
+
def initialize io, start_at, data_size, at, &block
|
15
15
|
@index = at
|
16
16
|
@io = io
|
17
17
|
@start_at = start_at
|
@@ -27,7 +27,7 @@ module PNGlitch
|
|
27
27
|
@filter_codec = { encoder: nil, decoder: nil }
|
28
28
|
|
29
29
|
if block_given?
|
30
|
-
@callback =
|
30
|
+
@callback = block
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
data/pnglitch.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
|
26
26
|
spec.required_ruby_version = '>= 2.0.0'
|
27
27
|
|
28
|
-
spec.add_development_dependency "bundler", "
|
29
|
-
spec.add_development_dependency "rake", "
|
28
|
+
spec.add_development_dependency "bundler", ">= 2.2.10"
|
29
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
30
30
|
spec.add_development_dependency "rspec"
|
31
31
|
end
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pnglitch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ucnv
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.2.10
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.2.10
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 12.3.3
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 12.3.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -60,9 +60,9 @@ executables:
|
|
60
60
|
extensions: []
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
|
+
- ".github/workflows/ruby.yml"
|
63
64
|
- ".gitignore"
|
64
65
|
- ".rspec"
|
65
|
-
- ".travis.yml"
|
66
66
|
- Gemfile
|
67
67
|
- LICENSE.txt
|
68
68
|
- README.md
|
@@ -90,7 +90,7 @@ homepage: https://github.com/ucnv/pnglitch
|
|
90
90
|
licenses:
|
91
91
|
- MIT
|
92
92
|
metadata: {}
|
93
|
-
post_install_message:
|
93
|
+
post_install_message:
|
94
94
|
rdoc_options: []
|
95
95
|
require_paths:
|
96
96
|
- lib
|
@@ -105,8 +105,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: '0'
|
107
107
|
requirements: []
|
108
|
-
rubygems_version: 3.
|
109
|
-
signing_key:
|
108
|
+
rubygems_version: 3.2.22
|
109
|
+
signing_key:
|
110
110
|
specification_version: 4
|
111
111
|
summary: PNGlitch is a Ruby library to destroy your PNG images. With normal data-bending
|
112
112
|
technique, a glitch against PNG will easily fail because of the checksum function.
|
data/.travis.yml
DELETED