pnm 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
  SHA1:
3
- metadata.gz: b65acf13eeae10d44cdb6819968ab967f240ec92
4
- data.tar.gz: ac881cf1d053ee6110a2624c62092d1e93623414
3
+ metadata.gz: c8d01685f2bc40a0f3f6a862f25e2c6001d8f6a3
4
+ data.tar.gz: 2817af37b0e92b2daa766334fa9363c8ca953315
5
5
  SHA512:
6
- metadata.gz: aa018e4a6f04380252ba21c8a8e572138f55f78c57c2b67a1a2bedf7afdd3108287a2c283654177e163e9bc8d5df0ec3ca67a6906a4c678cd7bcf76b30499f63
7
- data.tar.gz: 30ac4d58dd7ced728223abec188313480c19043908548a7a550c490c1dc745c47156886c22685c5d523ffbc782ea640289b5355a829c0f68c903110b79ff407f
6
+ metadata.gz: 1dd632513336784b890a6d7c2c81717bcabf12f511f0cdff8b9d93ee38bfbf3ffd1e5cd29463830ea4e190973d147bddc5d9bd297c6aec7dec4ffef670efbea9
7
+ data.tar.gz: 9051a2ec9005e3100f56b2363c311d4fef8626458b1d0a99c0cd0d3c3c22b1417725ec3cbe34a7f802118f5665582c594deae2b3c4194d6da4fb124eb59a8c98
data/README.md CHANGED
@@ -91,10 +91,11 @@ Requirements
91
91
 
92
92
  - PNM has been tested with
93
93
 
94
- - Ruby 2.1.5,
95
- - Ruby 2.0.0 on Linux and on Windows,
94
+ - Ruby 2.2,
95
+ - Ruby 2.1,
96
+ - Ruby 2.0.0,
96
97
  - Ruby 1.9.3,
97
- - JRuby 1.7.16,
98
+ - JRuby 1.7.18,
98
99
  - Rubinius 2.2.10.
99
100
 
100
101
  Documentation
@@ -110,7 +111,7 @@ Report bugs on the PNM home page: <https://github.com/stomar/pnm/>
110
111
  License
111
112
  -------
112
113
 
113
- Copyright &copy; 2013-2014 Marcus Stollsteimer
114
+ Copyright &copy; 2013-2015 Marcus Stollsteimer
114
115
 
115
116
  `PNM` is free software: you can redistribute it and/or modify
116
117
  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-2014 Marcus Stollsteimer
3
+ # Copyright (C) 2013-2015 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-2014 Marcus Stollsteimer
4
+ # Copyright (C) 2013-2015 Marcus Stollsteimer
5
5
 
6
6
  require 'benchmark'
7
7
  require_relative '../lib/pnm'
data/lib/pnm.rb CHANGED
@@ -80,7 +80,7 @@ require_relative 'pnm/exceptions'
80
80
  #
81
81
  # == Author
82
82
  #
83
- # Copyright (C) 2013-2014 Marcus Stollsteimer
83
+ # Copyright (C) 2013-2015 Marcus Stollsteimer
84
84
  #
85
85
  # License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
86
86
  #
@@ -91,7 +91,7 @@ module PNM
91
91
  TAGLINE = 'create/read/write PNM image files (PBM, PGM, PPM)'
92
92
 
93
93
  COPYRIGHT = <<-copyright.gsub(/^ +/, '')
94
- Copyright (C) 2013-2014 Marcus Stollsteimer.
94
+ Copyright (C) 2013-2015 Marcus Stollsteimer.
95
95
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
96
96
  This is free software: you are free to change and redistribute it.
97
97
  There is NO WARRANTY, to the extent permitted by law.
@@ -129,6 +129,7 @@ module PNM
129
129
 
130
130
  raise PNM::DataError, msg unless pixels.map(&:class).uniq == [Array]
131
131
  width = pixels.first.size
132
+ raise PNM::DataError, msg if width == 0
132
133
  raise PNM::DataError, msg unless pixels.map(&:size).uniq == [width]
133
134
  end
134
135
 
@@ -1,4 +1,4 @@
1
1
  module PNM
2
- VERSION = '0.4.0'
3
- DATE = '2014-12-28'
2
+ VERSION = '0.4.1'
3
+ DATE = '2015-01-20'
4
4
  end
@@ -23,9 +23,10 @@ Gem::Specification.new do |s|
23
23
 
24
24
  s.license = 'GPL-3'
25
25
 
26
- s.required_ruby_version = '>=1.9.3'
26
+ s.required_ruby_version = '>= 1.9.3'
27
27
 
28
- s.add_development_dependency('rake')
28
+ s.add_development_dependency 'rake', '>= 10.0'
29
+ s.add_development_dependency 'minitest', '>= 5.0'
29
30
 
30
31
  s.require_path = 'lib'
31
32
 
@@ -1,6 +1,6 @@
1
1
  # test_converter.rb: Unit tests for the PNM library.
2
2
  #
3
- # Copyright (C) 2013-2014 Marcus Stollsteimer
3
+ # Copyright (C) 2013-2015 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-2014 Marcus Stollsteimer
3
+ # Copyright (C) 2013-2015 Marcus Stollsteimer
4
4
 
5
5
  require 'minitest/autorun'
6
6
  require 'stringio'
@@ -94,6 +94,11 @@ describe 'PNM.create' do
94
94
  lambda { PNM.create(data) }.must_raise PNM::DataError
95
95
  end
96
96
 
97
+ it 'raises an exception for an empty array' do
98
+ data = [[]]
99
+ lambda { PNM.create(data) }.must_raise PNM::DataError
100
+ end
101
+
97
102
  it 'raises an exception for invalid PBM data (> 1)' do
98
103
  data = [[0, 0], [2, 0]]
99
104
  lambda { PNM.create(data, :type => :pbm) }.must_raise PNM::DataError
@@ -1,6 +1,6 @@
1
1
  # test_image.rb: Unit tests for the PNM library.
2
2
  #
3
- # Copyright (C) 2013-2014 Marcus Stollsteimer
3
+ # Copyright (C) 2013-2015 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-2014 Marcus Stollsteimer
3
+ # Copyright (C) 2013-2015 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-2014 Marcus Stollsteimer
3
+ # Copyright (C) 2013-2015 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.4.0
4
+ version: 0.4.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: 2014-12-28 00:00:00.000000000 Z
11
+ date: 2015-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '10.0'
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: '0'
26
+ version: '10.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '5.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '5.0'
27
41
  description: 'PNM is a pure Ruby library for creating, reading, and writing of PNM
28
42
  image files (Portable Anymap): PBM (Portable Bitmap), PGM (Portable Graymap), and
29
43
  PPM (Portable Pixmap).'