sugar_png 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +5 -4
- data/Gemfile.lock +67 -47
- data/VERSION +1 -1
- data/samples/damaged_signature.png +0 -0
- data/spec/magic/pixels_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -0
- data/spec/sugar_png/datastream_spec.rb +1 -1
- data/spec/support/png_suite.rb +3 -2
- data/sugar_png.gemspec +31 -26
- metadata +40 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4348d72337ba397c9405fee7d2ae0eaea900959ececb659fa5817593e38dd7c3
|
4
|
+
data.tar.gz: 18a999ff9b4e763d1b4d248667bb1f20129ef1927e7dbd30a14354e44b8f2ec6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bde4a4d767f3e4906ce68b4ca57495affc47e967a5fab0dbab1e480d6caf6cd39b1178257dfcb48e5353420d4f696966daf2d72cdcd1f75f47307103544edda7
|
7
|
+
data.tar.gz: 9c9dd246b24ffdc8594ffdeb02164cabcd0f7e9f7f03941a30cc753d543af7c9940abc39be280cd187a257e539eea821e9ef3b147d56995d787cf319ef3544d4
|
data/Gemfile
CHANGED
@@ -2,13 +2,14 @@ source "http://rubygems.org"
|
|
2
2
|
# Add dependencies required to use your gem here.
|
3
3
|
# Example:
|
4
4
|
# gem "activesupport", ">= 2.3.5"
|
5
|
-
gem 'zpng', ">= 0.
|
5
|
+
gem 'zpng', ">= 0.3.0"
|
6
6
|
|
7
7
|
# Add dependencies to develop your gem here.
|
8
8
|
# Include everything needed to run rake, tests, features, etc.
|
9
9
|
group :development do
|
10
|
-
gem "rspec", "
|
11
|
-
gem "
|
12
|
-
gem "
|
10
|
+
gem "rspec", "~> 3.9.0"
|
11
|
+
gem "rspec-its", "~> 1.3.0"
|
12
|
+
gem "bundler", "~> 2.1.4"
|
13
|
+
gem "jeweler", "~> 2.3.9"
|
13
14
|
gem "awesome_print"
|
14
15
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,65 +1,85 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
addressable (2.
|
4
|
+
addressable (2.4.0)
|
5
5
|
awesome_print (1.1.0)
|
6
|
-
builder (3.2.
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
6
|
+
builder (3.2.4)
|
7
|
+
descendants_tracker (0.0.4)
|
8
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
9
|
+
diff-lcs (1.3)
|
10
|
+
faraday (0.9.2)
|
11
|
+
multipart-post (>= 1.2, < 3)
|
12
|
+
git (1.5.0)
|
13
|
+
github_api (0.16.0)
|
14
|
+
addressable (~> 2.4.0)
|
15
|
+
descendants_tracker (~> 0.0.4)
|
16
|
+
faraday (~> 0.8, < 0.10)
|
17
|
+
hashie (>= 3.4)
|
18
|
+
mime-types (>= 1.16, < 3.0)
|
19
|
+
oauth2 (~> 1.0)
|
20
|
+
hashie (4.0.0)
|
21
|
+
highline (2.0.3)
|
22
|
+
jeweler (2.3.9)
|
21
23
|
builder
|
22
|
-
bundler
|
24
|
+
bundler
|
23
25
|
git (>= 1.2.5)
|
24
|
-
github_api (
|
26
|
+
github_api (~> 0.16.0)
|
25
27
|
highline (>= 1.6.15)
|
26
|
-
nokogiri (
|
28
|
+
nokogiri (>= 1.5.10)
|
29
|
+
psych
|
27
30
|
rake
|
28
31
|
rdoc
|
29
|
-
|
30
|
-
jwt (
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
32
|
+
semver2
|
33
|
+
jwt (2.2.1)
|
34
|
+
mime-types (2.99.3)
|
35
|
+
mini_portile2 (2.4.0)
|
36
|
+
multi_json (1.14.1)
|
37
|
+
multi_xml (0.6.0)
|
38
|
+
multipart-post (2.1.1)
|
39
|
+
nokogiri (1.10.7)
|
40
|
+
mini_portile2 (~> 2.4.0)
|
41
|
+
oauth2 (1.4.2)
|
42
|
+
faraday (>= 0.8, < 2.0)
|
43
|
+
jwt (>= 1.0, < 3.0)
|
38
44
|
multi_json (~> 1.3)
|
39
45
|
multi_xml (~> 0.5)
|
40
|
-
rack (
|
41
|
-
|
46
|
+
rack (>= 1.2, < 3)
|
47
|
+
psych (3.1.0)
|
48
|
+
rack (2.1.1)
|
42
49
|
rainbow (2.0.0)
|
43
|
-
rake (
|
44
|
-
rdoc (
|
45
|
-
|
46
|
-
|
47
|
-
rspec-
|
48
|
-
rspec-
|
49
|
-
|
50
|
-
|
51
|
-
rspec-expectations (
|
52
|
-
diff-lcs (
|
53
|
-
|
54
|
-
|
55
|
-
|
50
|
+
rake (13.0.1)
|
51
|
+
rdoc (6.2.1)
|
52
|
+
rspec (3.9.0)
|
53
|
+
rspec-core (~> 3.9.0)
|
54
|
+
rspec-expectations (~> 3.9.0)
|
55
|
+
rspec-mocks (~> 3.9.0)
|
56
|
+
rspec-core (3.9.1)
|
57
|
+
rspec-support (~> 3.9.1)
|
58
|
+
rspec-expectations (3.9.0)
|
59
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
60
|
+
rspec-support (~> 3.9.0)
|
61
|
+
rspec-its (1.3.0)
|
62
|
+
rspec-core (>= 3.0.0)
|
63
|
+
rspec-expectations (>= 3.0.0)
|
64
|
+
rspec-mocks (3.9.1)
|
65
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
66
|
+
rspec-support (~> 3.9.0)
|
67
|
+
rspec-support (3.9.2)
|
68
|
+
semver2 (3.4.2)
|
69
|
+
thread_safe (0.3.6)
|
70
|
+
zpng (0.3.0)
|
71
|
+
rainbow (~> 2.0.0)
|
56
72
|
|
57
73
|
PLATFORMS
|
58
74
|
ruby
|
59
75
|
|
60
76
|
DEPENDENCIES
|
61
77
|
awesome_print
|
62
|
-
bundler (
|
63
|
-
jeweler (~>
|
64
|
-
rspec (
|
65
|
-
|
78
|
+
bundler (~> 2.1.4)
|
79
|
+
jeweler (~> 2.3.9)
|
80
|
+
rspec (~> 3.9.0)
|
81
|
+
rspec-its (~> 1.3.0)
|
82
|
+
zpng (>= 0.3.0)
|
83
|
+
|
84
|
+
BUNDLED WITH
|
85
|
+
2.1.4
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.5.0
|
Binary file
|
data/spec/magic/pixels_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
2
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
3
|
require 'rspec'
|
4
|
+
require 'rspec/its'
|
4
5
|
require 'sugar_png'
|
5
6
|
require 'awesome_print'
|
6
7
|
|
@@ -60,6 +61,7 @@ module ResourceFileHelper
|
|
60
61
|
end
|
61
62
|
|
62
63
|
RSpec.configure do |config|
|
64
|
+
config.expect_with(:rspec) { |c| c.syntax = [:should, :expect] }
|
63
65
|
config.extend PNGSuite
|
64
66
|
config.include PNGSuite
|
65
67
|
config.include ResourceFileHelper
|
@@ -5,7 +5,7 @@ describe SugarPNG::Datastream do
|
|
5
5
|
describe '.from_io'do
|
6
6
|
it "should raise an error when loading a file with a bad signature" do
|
7
7
|
filename = resource_file('damaged_signature.png')
|
8
|
-
lambda { SugarPNG::Datastream.from_file(filename) }.should raise_error
|
8
|
+
lambda { SugarPNG::Datastream.from_file(filename) }.should raise_error(ZPNG::NotSupported)
|
9
9
|
end
|
10
10
|
|
11
11
|
it "should NOT raise an error if the CRC of a chunk is incorrect" do
|
data/spec/support/png_suite.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
#coding: binary
|
1
2
|
module PNGSuite
|
2
3
|
PNG_SUITE_URL = "http://www.schaik.com/pngsuite/PngSuite-2011apr25.tgz"
|
3
4
|
|
@@ -20,8 +21,8 @@ module PNGSuite
|
|
20
21
|
|
21
22
|
fname = File.join(dir, "png_suite.tgz")
|
22
23
|
File.open(fname, "wb"){ |f| f<<data }
|
23
|
-
puts "[.] unpacking .. "
|
24
|
-
system "tar", "
|
24
|
+
puts "[.] unpacking #{fname} .. "
|
25
|
+
system "tar", "xf", fname, "-C", dir
|
25
26
|
end
|
26
27
|
|
27
28
|
def each *prefixes
|
data/sugar_png.gemspec
CHANGED
@@ -2,15 +2,17 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: sugar_png 0.5.0 ruby lib
|
5
6
|
|
6
7
|
Gem::Specification.new do |s|
|
7
|
-
s.name = "sugar_png"
|
8
|
-
s.version = "0.
|
8
|
+
s.name = "sugar_png".freeze
|
9
|
+
s.version = "0.5.0"
|
9
10
|
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.
|
12
|
-
s.
|
13
|
-
s.
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib".freeze]
|
13
|
+
s.authors = ["Andrey \"Zed\" Zaikin".freeze]
|
14
|
+
s.date = "2020-01-14"
|
15
|
+
s.email = "zed.0xff@gmail.com".freeze
|
14
16
|
s.extra_rdoc_files = [
|
15
17
|
"LICENSE.txt",
|
16
18
|
"README.md",
|
@@ -261,6 +263,7 @@ Gem::Specification.new do |s|
|
|
261
263
|
"lib/sugar_png/glyph.rb",
|
262
264
|
"lib/sugar_png/image.rb",
|
263
265
|
"samples/damaged_chunk.png",
|
266
|
+
"samples/damaged_signature.png",
|
264
267
|
"samples/png_suite/f00n0g08_reference.png",
|
265
268
|
"samples/png_suite/f00n2c08_reference.png",
|
266
269
|
"samples/png_suite/f01n0g08_reference.png",
|
@@ -293,34 +296,36 @@ Gem::Specification.new do |s|
|
|
293
296
|
"spec/support/png_suite.rb",
|
294
297
|
"sugar_png.gemspec"
|
295
298
|
]
|
296
|
-
s.homepage = "http://github.com/zed-0xff/sugar_png"
|
297
|
-
s.licenses = ["MIT"]
|
298
|
-
s.
|
299
|
-
s.
|
300
|
-
s.summary = "a syntax sugar of PNG manipulation"
|
299
|
+
s.homepage = "http://github.com/zed-0xff/sugar_png".freeze
|
300
|
+
s.licenses = ["MIT".freeze]
|
301
|
+
s.rubygems_version = "2.7.6".freeze
|
302
|
+
s.summary = "a syntax sugar of PNG manipulation".freeze
|
301
303
|
|
302
304
|
if s.respond_to? :specification_version then
|
303
305
|
s.specification_version = 4
|
304
306
|
|
305
307
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
306
|
-
s.add_runtime_dependency(%q<zpng
|
307
|
-
s.add_development_dependency(%q<rspec
|
308
|
-
s.add_development_dependency(%q<
|
309
|
-
s.add_development_dependency(%q<
|
310
|
-
s.add_development_dependency(%q<
|
308
|
+
s.add_runtime_dependency(%q<zpng>.freeze, [">= 0.3.0"])
|
309
|
+
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.9.0"])
|
310
|
+
s.add_development_dependency(%q<rspec-its>.freeze, ["~> 1.3.0"])
|
311
|
+
s.add_development_dependency(%q<bundler>.freeze, ["~> 2.1.4"])
|
312
|
+
s.add_development_dependency(%q<jeweler>.freeze, ["~> 2.3.9"])
|
313
|
+
s.add_development_dependency(%q<awesome_print>.freeze, [">= 0"])
|
311
314
|
else
|
312
|
-
s.add_dependency(%q<zpng
|
313
|
-
s.add_dependency(%q<rspec
|
314
|
-
s.add_dependency(%q<
|
315
|
-
s.add_dependency(%q<
|
316
|
-
s.add_dependency(%q<
|
315
|
+
s.add_dependency(%q<zpng>.freeze, [">= 0.3.0"])
|
316
|
+
s.add_dependency(%q<rspec>.freeze, ["~> 3.9.0"])
|
317
|
+
s.add_dependency(%q<rspec-its>.freeze, ["~> 1.3.0"])
|
318
|
+
s.add_dependency(%q<bundler>.freeze, ["~> 2.1.4"])
|
319
|
+
s.add_dependency(%q<jeweler>.freeze, ["~> 2.3.9"])
|
320
|
+
s.add_dependency(%q<awesome_print>.freeze, [">= 0"])
|
317
321
|
end
|
318
322
|
else
|
319
|
-
s.add_dependency(%q<zpng
|
320
|
-
s.add_dependency(%q<rspec
|
321
|
-
s.add_dependency(%q<
|
322
|
-
s.add_dependency(%q<
|
323
|
-
s.add_dependency(%q<
|
323
|
+
s.add_dependency(%q<zpng>.freeze, [">= 0.3.0"])
|
324
|
+
s.add_dependency(%q<rspec>.freeze, ["~> 3.9.0"])
|
325
|
+
s.add_dependency(%q<rspec-its>.freeze, ["~> 1.3.0"])
|
326
|
+
s.add_dependency(%q<bundler>.freeze, ["~> 2.1.4"])
|
327
|
+
s.add_dependency(%q<jeweler>.freeze, ["~> 2.3.9"])
|
328
|
+
s.add_dependency(%q<awesome_print>.freeze, [">= 0"])
|
324
329
|
end
|
325
330
|
end
|
326
331
|
|
metadata
CHANGED
@@ -1,83 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sugar_png
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey "Zed" Zaikin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zpng
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.3.0
|
20
20
|
type: :runtime
|
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: 0.
|
26
|
+
version: 0.3.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 3.9.0
|
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: 3.9.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec-its
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.3.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.3.0
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: bundler
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- -
|
59
|
+
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
61
|
+
version: 2.1.4
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- -
|
66
|
+
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
68
|
+
version: 2.1.4
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: jeweler
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - ~>
|
73
|
+
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
75
|
+
version: 2.3.9
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- - ~>
|
80
|
+
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
82
|
+
version: 2.3.9
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: awesome_print
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- -
|
87
|
+
- - ">="
|
74
88
|
- !ruby/object:Gem::Version
|
75
89
|
version: '0'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- -
|
94
|
+
- - ">="
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
83
97
|
description:
|
@@ -89,8 +103,8 @@ extra_rdoc_files:
|
|
89
103
|
- README.md
|
90
104
|
- README.md.tpl
|
91
105
|
files:
|
92
|
-
- .document
|
93
|
-
- .rspec
|
106
|
+
- ".document"
|
107
|
+
- ".rspec"
|
94
108
|
- Gemfile
|
95
109
|
- Gemfile.lock
|
96
110
|
- LICENSE.txt
|
@@ -333,6 +347,7 @@ files:
|
|
333
347
|
- lib/sugar_png/glyph.rb
|
334
348
|
- lib/sugar_png/image.rb
|
335
349
|
- samples/damaged_chunk.png
|
350
|
+
- samples/damaged_signature.png
|
336
351
|
- samples/png_suite/f00n0g08_reference.png
|
337
352
|
- samples/png_suite/f00n2c08_reference.png
|
338
353
|
- samples/png_suite/f01n0g08_reference.png
|
@@ -374,17 +389,17 @@ require_paths:
|
|
374
389
|
- lib
|
375
390
|
required_ruby_version: !ruby/object:Gem::Requirement
|
376
391
|
requirements:
|
377
|
-
- -
|
392
|
+
- - ">="
|
378
393
|
- !ruby/object:Gem::Version
|
379
394
|
version: '0'
|
380
395
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
381
396
|
requirements:
|
382
|
-
- -
|
397
|
+
- - ">="
|
383
398
|
- !ruby/object:Gem::Version
|
384
399
|
version: '0'
|
385
400
|
requirements: []
|
386
401
|
rubyforge_project:
|
387
|
-
rubygems_version: 2.
|
402
|
+
rubygems_version: 2.7.6
|
388
403
|
signing_key:
|
389
404
|
specification_version: 4
|
390
405
|
summary: a syntax sugar of PNG manipulation
|