pnm 0.5.0 → 0.5.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
  SHA1:
3
- metadata.gz: 597b7231eeda234ed2c8a7446ececac07573d3dd
4
- data.tar.gz: a2d45050c7c3449b024fe33834b6ade73192b1fe
3
+ metadata.gz: dc9dad70777226b16da4d7039a1321372519e048
4
+ data.tar.gz: 0e7d6f07393f439bc0a644aa8fb54e147142ec2c
5
5
  SHA512:
6
- metadata.gz: d00bcb7995660c471798433176e2328d00130fc54cef1fb3aeb9971b66250a113145dc11fde15d7bd077ab36ba4193cf75e5f0c0cbd0bc44fc6f1074caf4849a
7
- data.tar.gz: 2d7287bb435de4a414bb05705a273a2ddf3d0f18bb3f02f14c1a8b132d2ef98e05be27755e7f9067bdab1965270ac7e81f43db3859dd8c1bf7a0a2327dfb3fcd
6
+ metadata.gz: 3445e084ae5d392516e8a169e1b5f2340537447fce806969cf5e1c3ff882b9c140b0bb592a57106fd277e289e3f3bbba40b8f13868637b6cd73e3d42f39440dc
7
+ data.tar.gz: 051ead6ff5724ce49cc21bf66c9087cc5a60c10a94edac62907a700b29f13829f92b1d3a3413c78c8dbfc03b3e63c0deb17b20165b988ed959f2573dee384709
data/README.md CHANGED
@@ -98,6 +98,8 @@ Requirements
98
98
 
99
99
  - PNM has been tested with
100
100
 
101
+ - Ruby 2.4,
102
+ - Ruby 2.3,
101
103
  - Ruby 2.2,
102
104
  - Ruby 2.1,
103
105
  - Ruby 2.0.0,
@@ -119,7 +121,7 @@ Report bugs on the PNM home page: <https://github.com/stomar/pnm/>
119
121
  License
120
122
  -------
121
123
 
122
- Copyright &copy; 2013-2015 Marcus Stollsteimer
124
+ Copyright &copy; 2013-2016 Marcus Stollsteimer
123
125
 
124
126
  `PNM` is free software: you can redistribute it and/or modify
125
127
  it under the terms of the GNU General Public License version 3 or later (GPLv3+),
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  # rakefile for the PNM library.
2
2
  #
3
- # Copyright (C) 2013-2015 Marcus Stollsteimer
3
+ # Copyright (C) 2013-2016 Marcus Stollsteimer
4
4
 
5
5
  require 'rake/testtask'
6
6
 
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # bm_converter.rb: Benchmarks for the PNM library.
3
3
  #
4
- # Copyright (C) 2013-2015 Marcus Stollsteimer
4
+ # Copyright (C) 2013-2016 Marcus Stollsteimer
5
5
 
6
6
  require 'benchmark'
7
7
  require_relative '../lib/pnm'
data/lib/pnm.rb CHANGED
@@ -85,7 +85,7 @@ require_relative 'pnm/exceptions'
85
85
  #
86
86
  # == Author
87
87
  #
88
- # Copyright (C) 2013-2015 Marcus Stollsteimer
88
+ # Copyright (C) 2013-2016 Marcus Stollsteimer
89
89
  #
90
90
  # License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
91
91
  #
@@ -96,7 +96,7 @@ module PNM
96
96
  TAGLINE = 'create/read/write PNM image files (PBM, PGM, PPM)'
97
97
 
98
98
  COPYRIGHT = <<-copyright.gsub(/^ +/, '')
99
- Copyright (C) 2013-2015 Marcus Stollsteimer.
99
+ Copyright (C) 2013-2016 Marcus Stollsteimer.
100
100
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
101
101
  This is free software: you are free to change and redistribute it.
102
102
  There is NO WARRANTY, to the extent permitted by law.
@@ -166,16 +166,16 @@ module PNM
166
166
  end
167
167
 
168
168
  def self.assert_valid_pixel(pixel) # :nodoc:
169
- unless Fixnum === pixel
170
- msg = "invalid pixel value: Fixnum expected - #{pixel.inspect}"
169
+ unless Integer === pixel
170
+ msg = "invalid pixel value: Integer expected - #{pixel.inspect}"
171
171
  raise PNM::DataError, msg
172
172
  end
173
173
  end
174
174
 
175
175
  def self.assert_valid_color_pixel(pixel) # :nodoc:
176
- unless Array === pixel && pixel.map(&:class) == [Fixnum, Fixnum, Fixnum]
176
+ unless Array === pixel && pixel.map {|p| Integer === p } == [true, true, true]
177
177
  msg = "invalid pixel value: "
178
- msg << "Array of 3 Fixnums expected - #{pixel.inspect}"
178
+ msg << "Array of 3 Integers expected - #{pixel.inspect}"
179
179
 
180
180
  raise PNM::DataError, msg
181
181
  end
@@ -184,7 +184,7 @@ module PNM
184
184
  def self.assert_valid_maxgray(maxgray) # :nodoc:
185
185
  return unless maxgray
186
186
 
187
- unless Fixnum === maxgray && maxgray > 0 && maxgray <= 255
187
+ unless Integer === maxgray && maxgray > 0 && maxgray <= 255
188
188
  raise PNM::ArgumentError, "invalid maxgray value - #{maxgray.inspect}"
189
189
  end
190
190
  end
@@ -1,4 +1,4 @@
1
1
  module PNM
2
- VERSION = '0.5.0'
3
- DATE = '2015-09-26'
2
+ VERSION = '0.5.1'
3
+ DATE = '2016-12-26'
4
4
  end
@@ -21,14 +21,14 @@ Gem::Specification.new do |s|
21
21
  s.email = 'sto.mar@web.de'
22
22
  s.homepage = homepage
23
23
 
24
- s.license = 'GPL-3'
24
+ s.license = 'GPL-3.0'
25
25
 
26
26
  s.required_ruby_version = '>= 1.9.3'
27
27
 
28
28
  s.add_development_dependency 'rake', '>= 10.0'
29
29
  s.add_development_dependency 'minitest', '>= 5.0'
30
30
 
31
- s.require_path = 'lib'
31
+ s.require_paths = ['lib']
32
32
 
33
33
  s.test_files = Dir.glob('test/**/test_*.rb')
34
34
 
@@ -1,6 +1,6 @@
1
1
  # test_converter.rb: Unit tests for the PNM library.
2
2
  #
3
- # Copyright (C) 2013-2015 Marcus Stollsteimer
3
+ # Copyright (C) 2013-2016 Marcus Stollsteimer
4
4
 
5
5
  require 'minitest/autorun'
6
6
  require 'pnm/converter'
@@ -1,6 +1,6 @@
1
1
  # test_exceptions.rb: Unit tests for the PNM library.
2
2
  #
3
- # Copyright (C) 2013-2015 Marcus Stollsteimer
3
+ # Copyright (C) 2013-2016 Marcus Stollsteimer
4
4
 
5
5
  require 'minitest/autorun'
6
6
  require 'stringio'
@@ -34,7 +34,7 @@ describe 'PNM.create' do
34
34
  lambda { PNM.create(data, :maxgray => 0) }.must_raise PNM::ArgumentError
35
35
  end
36
36
 
37
- it 'raises an exception for invalid comment (Fixnum)' do
37
+ it 'raises an exception for invalid comment (Integer)' do
38
38
  data = [[0, 0], [0, 0]]
39
39
  lambda { PNM.create(data, :comment => 1) }.must_raise PNM::ArgumentError
40
40
  end
@@ -1,6 +1,6 @@
1
1
  # test_image.rb: Unit tests for the PNM library.
2
2
  #
3
- # Copyright (C) 2013-2015 Marcus Stollsteimer
3
+ # Copyright (C) 2013-2016 Marcus Stollsteimer
4
4
 
5
5
  require 'minitest/autorun'
6
6
  require 'pnm'
@@ -1,6 +1,6 @@
1
1
  # test_parser.rb: Unit tests for the PNM library.
2
2
  #
3
- # Copyright (C) 2013-2015 Marcus Stollsteimer
3
+ # Copyright (C) 2013-2016 Marcus Stollsteimer
4
4
 
5
5
  require 'minitest/autorun'
6
6
  require 'pnm/parser'
@@ -1,6 +1,6 @@
1
1
  # test_pnm.rb: Unit tests for the PNM library.
2
2
  #
3
- # Copyright (C) 2013-2015 Marcus Stollsteimer
3
+ # Copyright (C) 2013-2016 Marcus Stollsteimer
4
4
 
5
5
  require 'minitest/autorun'
6
6
  require 'pnm'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pnm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcus Stollsteimer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-26 00:00:00.000000000 Z
11
+ date: 2016-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -76,7 +76,7 @@ files:
76
76
  - test/test_pnm.rb
77
77
  homepage: https://github.com/stomar/pnm
78
78
  licenses:
79
- - GPL-3
79
+ - GPL-3.0
80
80
  metadata: {}
81
81
  post_install_message:
82
82
  rdoc_options:
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  version: '0'
97
97
  requirements: []
98
98
  rubyforge_project:
99
- rubygems_version: 2.4.8
99
+ rubygems_version: 2.5.2
100
100
  signing_key:
101
101
  specification_version: 4
102
102
  summary: PNM - create/read/write PNM image files (PBM, PGM, PPM)