zpng 0.2.5 → 0.3.0

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
- SHA1:
3
- metadata.gz: 599387552281b58dfe219d6c8e4cee71206d6b5a
4
- data.tar.gz: 06741d99a03d9e70516d8bb0a3cedd7d39102a22
2
+ SHA256:
3
+ metadata.gz: 3aa4c130704a0f1fafe4df8b5e1cd5eb8a32b0dca30c049bf131dc60230fba2e
4
+ data.tar.gz: 2b7ba7fcfc9e947c74d7dbf59b6f59074353790f55ba20a523e5baf0ff56ace9
5
5
  SHA512:
6
- metadata.gz: 33f036572a31109dbdd5c25193b155e9dd38a1ca3acfc30a7b16f79163b880f9c1e6dd03c374385f8aef4b394ab3be457883d5ba0910911de12b287cc80e6d1a
7
- data.tar.gz: affc061369de5e2f75b395759f8d2fd5bf0b400ee3bfecd1489f5ec0bf15c5a905bd56edfdb043d8cca2d5c8e9730dd90945d9ab81a9db2d3a48e38f29fb152e
6
+ metadata.gz: 9525556c93cc09198a83a825ed25631a6c721227c3b01666dd3f2f2e46457ecf47713b70f64d4e1f02abe4b3ca89d327002d09e616801e204bf8e585a1a14131
7
+ data.tar.gz: a7e1d8e46704ea176b89728f6c53e441016e6926b47e9d4dda653d60c103bbe2a8dd1877cd86e6c8e567669c86e19c7d1df103e627828f32afa0a0693706c0b8
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 'rainbow'
5
+ gem 'rainbow', "~> 2.0.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", ">= 2.8.0"
11
- gem "bundler", ">= 1.0.0"
12
- gem "jeweler", "~> 1.8.4"
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 "what_methods"
14
15
  end
@@ -1,66 +1,83 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- addressable (2.3.5)
5
- builder (3.2.2)
6
- diff-lcs (1.1.3)
7
- faraday (0.8.8)
8
- multipart-post (~> 1.2.0)
9
- git (1.2.6)
10
- github_api (0.10.1)
11
- addressable
12
- faraday (~> 0.8.1)
13
- hashie (>= 1.2)
14
- multi_json (~> 1.4)
15
- nokogiri (~> 1.5.2)
16
- oauth2
17
- hashie (2.0.5)
18
- highline (1.6.20)
19
- httpauth (0.2.0)
20
- jeweler (1.8.8)
4
+ addressable (2.4.0)
5
+ builder (3.2.4)
6
+ descendants_tracker (0.0.4)
7
+ thread_safe (~> 0.3, >= 0.3.1)
8
+ diff-lcs (1.3)
9
+ faraday (0.9.2)
10
+ multipart-post (>= 1.2, < 3)
11
+ git (1.5.0)
12
+ github_api (0.16.0)
13
+ addressable (~> 2.4.0)
14
+ descendants_tracker (~> 0.0.4)
15
+ faraday (~> 0.8, < 0.10)
16
+ hashie (>= 3.4)
17
+ mime-types (>= 1.16, < 3.0)
18
+ oauth2 (~> 1.0)
19
+ hashie (4.0.0)
20
+ highline (2.0.3)
21
+ jeweler (2.3.9)
21
22
  builder
22
- bundler (~> 1.0)
23
+ bundler
23
24
  git (>= 1.2.5)
24
- github_api (= 0.10.1)
25
+ github_api (~> 0.16.0)
25
26
  highline (>= 1.6.15)
26
- nokogiri (= 1.5.10)
27
+ nokogiri (>= 1.5.10)
28
+ psych
27
29
  rake
28
30
  rdoc
29
- json (1.8.1)
30
- jwt (0.1.8)
31
- multi_json (>= 1.5)
32
- multi_json (1.8.2)
33
- multi_xml (0.5.5)
34
- multipart-post (1.2.0)
35
- nokogiri (1.5.10)
36
- oauth2 (0.9.2)
37
- faraday (~> 0.8)
38
- httpauth (~> 0.2)
39
- jwt (~> 0.1.4)
40
- multi_json (~> 1.0)
31
+ semver2
32
+ jwt (2.2.1)
33
+ mime-types (2.99.3)
34
+ mini_portile2 (2.4.0)
35
+ multi_json (1.14.1)
36
+ multi_xml (0.6.0)
37
+ multipart-post (2.1.1)
38
+ nokogiri (1.10.7)
39
+ mini_portile2 (~> 2.4.0)
40
+ oauth2 (1.4.2)
41
+ faraday (>= 0.8, < 2.0)
42
+ jwt (>= 1.0, < 3.0)
43
+ multi_json (~> 1.3)
41
44
  multi_xml (~> 0.5)
42
- rack (~> 1.2)
43
- rack (1.5.2)
44
- rainbow (1.1.4)
45
- rake (10.1.0)
46
- rdoc (4.0.1)
47
- json (~> 1.4)
48
- rspec (2.12.0)
49
- rspec-core (~> 2.12.0)
50
- rspec-expectations (~> 2.12.0)
51
- rspec-mocks (~> 2.12.0)
52
- rspec-core (2.12.1)
53
- rspec-expectations (2.12.0)
54
- diff-lcs (~> 1.1.3)
55
- rspec-mocks (2.12.0)
45
+ rack (>= 1.2, < 3)
46
+ psych (3.1.0)
47
+ rack (2.1.1)
48
+ rainbow (2.0.0)
49
+ rake (13.0.1)
50
+ rdoc (6.2.1)
51
+ rspec (3.9.0)
52
+ rspec-core (~> 3.9.0)
53
+ rspec-expectations (~> 3.9.0)
54
+ rspec-mocks (~> 3.9.0)
55
+ rspec-core (3.9.1)
56
+ rspec-support (~> 3.9.1)
57
+ rspec-expectations (3.9.0)
58
+ diff-lcs (>= 1.2.0, < 2.0)
59
+ rspec-support (~> 3.9.0)
60
+ rspec-its (1.3.0)
61
+ rspec-core (>= 3.0.0)
62
+ rspec-expectations (>= 3.0.0)
63
+ rspec-mocks (3.9.1)
64
+ diff-lcs (>= 1.2.0, < 2.0)
65
+ rspec-support (~> 3.9.0)
66
+ rspec-support (3.9.2)
67
+ semver2 (3.4.2)
68
+ thread_safe (0.3.6)
56
69
  what_methods (1.0.1)
57
70
 
58
71
  PLATFORMS
59
72
  ruby
60
73
 
61
74
  DEPENDENCIES
62
- bundler (>= 1.0.0)
63
- jeweler (~> 1.8.4)
64
- rainbow
65
- rspec (>= 2.8.0)
75
+ bundler (~> 2.1.4)
76
+ jeweler (~> 2.3.9)
77
+ rainbow (~> 2.0.0)
78
+ rspec (~> 3.9.0)
79
+ rspec-its (~> 1.3.0)
66
80
  what_methods
81
+
82
+ BUNDLED WITH
83
+ 2.1.4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.5
1
+ 0.3.0
@@ -2,13 +2,19 @@ module ZPNG
2
2
  class TextChunk < Chunk
3
3
  attr_accessor :keyword, :text
4
4
 
5
+ if RUBY_VERSION > "2.4"
6
+ INTEGER_CLASS = Integer
7
+ else
8
+ INTEGER_CLASS = Fixnum
9
+ end
10
+
5
11
  def inspect verbosity = 10
6
12
  vars = %w'keyword text language translated_keyword cmethod cflag'
7
13
  vars -= %w'text translated_keyword' if verbosity <=0
8
14
  super.sub(/ *>$/,'') + ", " +
9
15
  vars.map do |var|
10
16
  t = instance_variable_get("@#{var}")
11
- unless t.is_a?(Fixnum)
17
+ unless t.is_a?(INTEGER_CLASS)
12
18
  t = t.to_s
13
19
  t = t[0..20] + "..." if t.size > 20
14
20
  end
@@ -13,7 +13,8 @@ describe ZPNG::Adam7Decoder do
13
13
  }.each do |dims, slw|
14
14
  it "should be right for #{dims} image" do
15
15
  w,h = dims.split('x').map(&:to_i)
16
- img = stub(:width => w, :height => h)
16
+ img = Object.new
17
+ allow(img).to receive_messages(:width => w, :height => h)
17
18
  adam7 = ZPNG::Adam7Decoder.new(img)
18
19
  slw.size.times.map{ |i| adam7.scanline_width(i) }.should == slw
19
20
  end
@@ -33,7 +34,8 @@ describe ZPNG::Adam7Decoder do
33
34
  }.each do |dims, n|
34
35
  it "should be right for #{dims} image" do
35
36
  w,h = dims.split('x').map(&:to_i)
36
- img = stub(:width => w, :height => h)
37
+ img = Object.new
38
+ allow(img).to receive_messages(:width => w, :height => h)
37
39
  adam7 = ZPNG::Adam7Decoder.new(img)
38
40
  adam7.scanlines_count.should == n
39
41
  end
@@ -52,7 +54,8 @@ describe ZPNG::Adam7Decoder do
52
54
  }.each do |dims, pst|
53
55
  it "should be right for #{dims} image" do
54
56
  w,h = dims.split('x').map(&:to_i)
55
- img = stub(:width => w, :height => h)
57
+ img = Object.new
58
+ allow(img).to receive_messages(:width => w, :height => h)
56
59
  adam7 = ZPNG::Adam7Decoder.new(img)
57
60
  adam7.instance_variable_get("@pass_starts").should == pst
58
61
  end
@@ -33,7 +33,7 @@ describe Image do
33
33
 
34
34
  describe "new( :bpp => 16, :color => true )" do
35
35
  subject{ lambda{ _new_img(16,true) } }
36
- it { should raise_exception }
36
+ it { should raise_exception(RuntimeError) }
37
37
  end
38
38
 
39
39
  describe "new( :bpp => 24, :color => false )" do
@@ -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 'zpng'
5
6
 
6
7
  # Requires supporting files with custom matchers and macros, etc,
@@ -33,6 +34,7 @@ end
33
34
  PNGSuite.init( File.join(SAMPLES_DIR, "png_suite") )
34
35
 
35
36
  RSpec.configure do |config|
37
+ config.expect_with(:rspec) { |c| c.syntax = :should }
36
38
  config.before :suite do
37
39
  end
38
40
  end
@@ -2,16 +2,18 @@
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: zpng 0.3.0 ruby lib
5
6
 
6
7
  Gem::Specification.new do |s|
7
- s.name = "zpng"
8
- s.version = "0.2.5"
8
+ s.name = "zpng".freeze
9
+ s.version = "0.3.0"
9
10
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Andrey \"Zed\" Zaikin"]
12
- s.date = "2014-03-01"
13
- s.email = "zed.0xff@gmail.com"
14
- s.executables = ["zpng"]
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
16
+ s.executables = ["zpng".freeze]
15
17
  s.extra_rdoc_files = [
16
18
  "LICENSE.txt",
17
19
  "README.md",
@@ -90,34 +92,36 @@ Gem::Specification.new do |s|
90
92
  "spec/support/png_suite.rb",
91
93
  "zpng.gemspec"
92
94
  ]
93
- s.homepage = "http://github.com/zed-0xff/zpng"
94
- s.licenses = ["MIT"]
95
- s.require_paths = ["lib"]
96
- s.rubygems_version = "2.0.3"
97
- s.summary = "pure ruby PNG file manipulation & validation"
95
+ s.homepage = "http://github.com/zed-0xff/zpng".freeze
96
+ s.licenses = ["MIT".freeze]
97
+ s.rubygems_version = "2.7.6".freeze
98
+ s.summary = "pure ruby PNG file manipulation & validation".freeze
98
99
 
99
100
  if s.respond_to? :specification_version then
100
101
  s.specification_version = 4
101
102
 
102
103
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
103
- s.add_runtime_dependency(%q<rainbow>, [">= 0"])
104
- s.add_development_dependency(%q<rspec>, [">= 2.8.0"])
105
- s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
106
- s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
107
- s.add_development_dependency(%q<what_methods>, [">= 0"])
104
+ s.add_runtime_dependency(%q<rainbow>.freeze, ["~> 2.0.0"])
105
+ s.add_development_dependency(%q<rspec>.freeze, ["~> 3.9.0"])
106
+ s.add_development_dependency(%q<rspec-its>.freeze, ["~> 1.3.0"])
107
+ s.add_development_dependency(%q<bundler>.freeze, ["~> 2.1.4"])
108
+ s.add_development_dependency(%q<jeweler>.freeze, ["~> 2.3.9"])
109
+ s.add_development_dependency(%q<what_methods>.freeze, [">= 0"])
108
110
  else
109
- s.add_dependency(%q<rainbow>, [">= 0"])
110
- s.add_dependency(%q<rspec>, [">= 2.8.0"])
111
- s.add_dependency(%q<bundler>, [">= 1.0.0"])
112
- s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
113
- s.add_dependency(%q<what_methods>, [">= 0"])
111
+ s.add_dependency(%q<rainbow>.freeze, ["~> 2.0.0"])
112
+ s.add_dependency(%q<rspec>.freeze, ["~> 3.9.0"])
113
+ s.add_dependency(%q<rspec-its>.freeze, ["~> 1.3.0"])
114
+ s.add_dependency(%q<bundler>.freeze, ["~> 2.1.4"])
115
+ s.add_dependency(%q<jeweler>.freeze, ["~> 2.3.9"])
116
+ s.add_dependency(%q<what_methods>.freeze, [">= 0"])
114
117
  end
115
118
  else
116
- s.add_dependency(%q<rainbow>, [">= 0"])
117
- s.add_dependency(%q<rspec>, [">= 2.8.0"])
118
- s.add_dependency(%q<bundler>, [">= 1.0.0"])
119
- s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
120
- s.add_dependency(%q<what_methods>, [">= 0"])
119
+ s.add_dependency(%q<rainbow>.freeze, ["~> 2.0.0"])
120
+ s.add_dependency(%q<rspec>.freeze, ["~> 3.9.0"])
121
+ s.add_dependency(%q<rspec-its>.freeze, ["~> 1.3.0"])
122
+ s.add_dependency(%q<bundler>.freeze, ["~> 2.1.4"])
123
+ s.add_dependency(%q<jeweler>.freeze, ["~> 2.3.9"])
124
+ s.add_dependency(%q<what_methods>.freeze, [">= 0"])
121
125
  end
122
126
  end
123
127
 
metadata CHANGED
@@ -1,83 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zpng
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.3.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: 2014-03-01 00:00:00.000000000 Z
11
+ date: 2020-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rainbow
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 2.0.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: 2.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 3.9.0
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 3.9.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec-its
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
32
46
  - !ruby/object:Gem::Version
33
- version: 2.8.0
47
+ version: 1.3.0
34
48
  type: :development
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
- - - '>='
52
+ - - "~>"
39
53
  - !ruby/object:Gem::Version
40
- version: 2.8.0
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.0.0
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.0.0
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: 1.8.4
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: 1.8.4
82
+ version: 2.3.9
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: what_methods
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:
@@ -91,8 +105,8 @@ extra_rdoc_files:
91
105
  - README.md.tpl
92
106
  - TODO
93
107
  files:
94
- - .document
95
- - .rspec
108
+ - ".document"
109
+ - ".rspec"
96
110
  - Gemfile
97
111
  - Gemfile.lock
98
112
  - LICENSE.txt
@@ -171,17 +185,17 @@ require_paths:
171
185
  - lib
172
186
  required_ruby_version: !ruby/object:Gem::Requirement
173
187
  requirements:
174
- - - '>='
188
+ - - ">="
175
189
  - !ruby/object:Gem::Version
176
190
  version: '0'
177
191
  required_rubygems_version: !ruby/object:Gem::Requirement
178
192
  requirements:
179
- - - '>='
193
+ - - ">="
180
194
  - !ruby/object:Gem::Version
181
195
  version: '0'
182
196
  requirements: []
183
197
  rubyforge_project:
184
- rubygems_version: 2.0.3
198
+ rubygems_version: 2.7.6
185
199
  signing_key:
186
200
  specification_version: 4
187
201
  summary: pure ruby PNG file manipulation & validation