sugar_png 0.0.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (275) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +6 -4
  3. data/Gemfile.lock +77 -24
  4. data/README.md +105 -0
  5. data/README.md.tpl +99 -0
  6. data/Rakefile +41 -6
  7. data/VERSION +1 -1
  8. data/data/1-dump-hex.rb +22 -0
  9. data/data/2-marshal-test.rb +22 -0
  10. data/data/3-hex2marshal.rb +71 -0
  11. data/data/font/00 +0 -0
  12. data/data/font/01 +0 -0
  13. data/data/font/02 +0 -0
  14. data/data/font/03 +0 -0
  15. data/data/font/04 +0 -0
  16. data/data/font/05 +0 -0
  17. data/data/font/06 +0 -0
  18. data/data/font/07 +0 -0
  19. data/data/font/09 +0 -0
  20. data/data/font/0a +0 -0
  21. data/data/font/0b +0 -0
  22. data/data/font/0c +0 -0
  23. data/data/font/0d +0 -0
  24. data/data/font/0e +0 -0
  25. data/data/font/0f +0 -0
  26. data/data/font/10 +0 -0
  27. data/data/font/11 +0 -0
  28. data/data/font/12 +0 -0
  29. data/data/font/13 +0 -0
  30. data/data/font/14 +0 -0
  31. data/data/font/15 +0 -0
  32. data/data/font/16 +0 -0
  33. data/data/font/17 +0 -0
  34. data/data/font/18 +0 -0
  35. data/data/font/19 +0 -0
  36. data/data/font/1a +0 -0
  37. data/data/font/1b +0 -0
  38. data/data/font/1c +0 -0
  39. data/data/font/1d +0 -0
  40. data/data/font/1e +0 -0
  41. data/data/font/1f +0 -0
  42. data/data/font/20 +0 -0
  43. data/data/font/21 +0 -0
  44. data/data/font/22 +0 -0
  45. data/data/font/23 +0 -0
  46. data/data/font/24 +0 -0
  47. data/data/font/25 +0 -0
  48. data/data/font/26 +0 -0
  49. data/data/font/27 +0 -0
  50. data/data/font/28 +0 -0
  51. data/data/font/29 +0 -0
  52. data/data/font/2a +0 -0
  53. data/data/font/2b +0 -0
  54. data/data/font/2c +0 -0
  55. data/data/font/2d +0 -0
  56. data/data/font/2e +0 -0
  57. data/data/font/2f +0 -0
  58. data/data/font/30 +0 -0
  59. data/data/font/31 +0 -0
  60. data/data/font/32 +0 -0
  61. data/data/font/33 +0 -0
  62. data/data/font/34 +0 -0
  63. data/data/font/35 +0 -0
  64. data/data/font/36 +0 -0
  65. data/data/font/37 +0 -0
  66. data/data/font/38 +0 -0
  67. data/data/font/39 +0 -0
  68. data/data/font/3a +0 -0
  69. data/data/font/3b +0 -0
  70. data/data/font/3c +0 -0
  71. data/data/font/3d +0 -0
  72. data/data/font/3e +0 -0
  73. data/data/font/3f +0 -0
  74. data/data/font/40 +0 -0
  75. data/data/font/41 +0 -0
  76. data/data/font/42 +0 -0
  77. data/data/font/43 +0 -0
  78. data/data/font/44 +0 -0
  79. data/data/font/45 +0 -0
  80. data/data/font/46 +0 -0
  81. data/data/font/47 +0 -0
  82. data/data/font/48 +0 -0
  83. data/data/font/49 +0 -0
  84. data/data/font/4a +0 -0
  85. data/data/font/4b +0 -0
  86. data/data/font/4c +0 -0
  87. data/data/font/4d +0 -0
  88. data/data/font/4e +0 -0
  89. data/data/font/4f +0 -0
  90. data/data/font/50 +0 -0
  91. data/data/font/51 +0 -0
  92. data/data/font/52 +0 -0
  93. data/data/font/53 +0 -0
  94. data/data/font/54 +0 -0
  95. data/data/font/55 +0 -0
  96. data/data/font/56 +0 -0
  97. data/data/font/57 +0 -0
  98. data/data/font/58 +0 -0
  99. data/data/font/59 +0 -0
  100. data/data/font/5a +0 -0
  101. data/data/font/5b +0 -0
  102. data/data/font/5c +0 -0
  103. data/data/font/5d +0 -0
  104. data/data/font/5e +0 -0
  105. data/data/font/5f +0 -0
  106. data/data/font/60 +0 -0
  107. data/data/font/61 +0 -0
  108. data/data/font/62 +0 -0
  109. data/data/font/63 +0 -0
  110. data/data/font/64 +0 -0
  111. data/data/font/65 +0 -0
  112. data/data/font/66 +0 -0
  113. data/data/font/67 +0 -0
  114. data/data/font/68 +0 -0
  115. data/data/font/69 +0 -0
  116. data/data/font/6a +0 -0
  117. data/data/font/6b +0 -0
  118. data/data/font/6c +0 -0
  119. data/data/font/6d +0 -0
  120. data/data/font/6e +0 -0
  121. data/data/font/6f +0 -0
  122. data/data/font/70 +0 -0
  123. data/data/font/71 +0 -0
  124. data/data/font/72 +0 -0
  125. data/data/font/73 +0 -0
  126. data/data/font/74 +0 -0
  127. data/data/font/75 +0 -0
  128. data/data/font/76 +0 -0
  129. data/data/font/77 +0 -0
  130. data/data/font/78 +0 -0
  131. data/data/font/79 +0 -0
  132. data/data/font/7a +0 -0
  133. data/data/font/7b +0 -0
  134. data/data/font/7c +0 -0
  135. data/data/font/7d +0 -0
  136. data/data/font/7e +0 -0
  137. data/data/font/7f +0 -0
  138. data/data/font/80 +0 -0
  139. data/data/font/81 +0 -0
  140. data/data/font/82 +0 -0
  141. data/data/font/83 +0 -0
  142. data/data/font/84 +0 -0
  143. data/data/font/85 +0 -0
  144. data/data/font/86 +0 -0
  145. data/data/font/87 +0 -0
  146. data/data/font/88 +0 -0
  147. data/data/font/89 +0 -0
  148. data/data/font/8a +0 -0
  149. data/data/font/8b +0 -0
  150. data/data/font/8c +0 -0
  151. data/data/font/8d +0 -0
  152. data/data/font/8e +0 -0
  153. data/data/font/8f +0 -0
  154. data/data/font/90 +0 -0
  155. data/data/font/91 +0 -0
  156. data/data/font/92 +0 -0
  157. data/data/font/93 +0 -0
  158. data/data/font/94 +0 -0
  159. data/data/font/95 +0 -0
  160. data/data/font/96 +0 -0
  161. data/data/font/97 +0 -0
  162. data/data/font/98 +0 -0
  163. data/data/font/99 +0 -0
  164. data/data/font/9a +0 -0
  165. data/data/font/9b +0 -0
  166. data/data/font/9c +0 -0
  167. data/data/font/9d +0 -0
  168. data/data/font/9e +0 -0
  169. data/data/font/9f +0 -0
  170. data/data/font/a0 +0 -0
  171. data/data/font/a1 +0 -0
  172. data/data/font/a2 +0 -0
  173. data/data/font/a3 +0 -0
  174. data/data/font/a4 +0 -0
  175. data/data/font/a5 +0 -0
  176. data/data/font/a6 +0 -0
  177. data/data/font/a7 +0 -0
  178. data/data/font/a8 +0 -0
  179. data/data/font/a9 +0 -0
  180. data/data/font/aa +0 -0
  181. data/data/font/ac +0 -0
  182. data/data/font/ad +0 -0
  183. data/data/font/ae +0 -0
  184. data/data/font/af +0 -0
  185. data/data/font/b0 +0 -0
  186. data/data/font/b1 +0 -0
  187. data/data/font/b2 +0 -0
  188. data/data/font/b3 +0 -0
  189. data/data/font/b4 +0 -0
  190. data/data/font/b5 +0 -0
  191. data/data/font/b6 +0 -0
  192. data/data/font/b7 +0 -0
  193. data/data/font/b8 +0 -0
  194. data/data/font/b9 +0 -0
  195. data/data/font/ba +0 -0
  196. data/data/font/bb +0 -0
  197. data/data/font/bc +0 -0
  198. data/data/font/bd +0 -0
  199. data/data/font/be +0 -0
  200. data/data/font/bf +0 -0
  201. data/data/font/c0 +0 -0
  202. data/data/font/c1 +0 -0
  203. data/data/font/c2 +0 -0
  204. data/data/font/c3 +0 -0
  205. data/data/font/c4 +0 -0
  206. data/data/font/c5 +0 -0
  207. data/data/font/c6 +0 -0
  208. data/data/font/c7 +0 -0
  209. data/data/font/c8 +0 -0
  210. data/data/font/c9 +0 -0
  211. data/data/font/ca +0 -0
  212. data/data/font/cb +0 -0
  213. data/data/font/cc +0 -0
  214. data/data/font/cd +0 -0
  215. data/data/font/ce +0 -0
  216. data/data/font/cf +0 -0
  217. data/data/font/d0 +0 -0
  218. data/data/font/d1 +0 -0
  219. data/data/font/d2 +0 -0
  220. data/data/font/d3 +0 -0
  221. data/data/font/d4 +0 -0
  222. data/data/font/d5 +0 -0
  223. data/data/font/d6 +0 -0
  224. data/data/font/d7 +0 -0
  225. data/data/font/f9 +0 -0
  226. data/data/font/fa +0 -0
  227. data/data/font/fb +0 -0
  228. data/data/font/fc +0 -0
  229. data/data/font/fd +0 -0
  230. data/data/font/fe +0 -0
  231. data/data/font/ff +0 -0
  232. data/data/unifont-5.1.20080820.7z +0 -0
  233. data/data/unused-4-read-tar.rb +49 -0
  234. data/lib/sugar_png.rb +164 -2
  235. data/lib/sugar_png/border.rb +20 -0
  236. data/lib/sugar_png/color.rb +118 -0
  237. data/lib/sugar_png/datastream.rb +2 -17
  238. data/lib/sugar_png/dyn_accessor.rb +28 -0
  239. data/lib/sugar_png/font.rb +44 -0
  240. data/lib/sugar_png/glyph.rb +36 -0
  241. data/lib/sugar_png/image.rb +104 -0
  242. data/samples/damaged_chunk.png +0 -0
  243. data/samples/damaged_signature.png +0 -0
  244. data/samples/png_suite/f00n0g08_reference.png +0 -0
  245. data/samples/png_suite/f00n2c08_reference.png +0 -0
  246. data/samples/png_suite/f01n0g08_reference.png +0 -0
  247. data/samples/png_suite/f01n2c08_reference.png +0 -0
  248. data/samples/png_suite/f02n0g08_reference.png +0 -0
  249. data/samples/png_suite/f02n2c08_reference.png +0 -0
  250. data/samples/png_suite/f03n0g08_reference.png +0 -0
  251. data/samples/png_suite/f03n2c08_reference.png +0 -0
  252. data/samples/png_suite/f04n0g08_reference.png +0 -0
  253. data/samples/png_suite/f04n2c08_reference.png +0 -0
  254. data/samples/readme/explicit_image_dimensions_bg_color.png +0 -0
  255. data/samples/readme/hello_world.png +0 -0
  256. data/samples/readme/japanese_text_with_rainbow_borders_zoomed_4x.png +0 -0
  257. data/samples/readme/pixels_can_be_set_using_ranges_enumerators_arrays.png +0 -0
  258. data/samples/readme/playing_with_transparency_16_bit_color_depth.png +0 -0
  259. data/samples/readme/white_noise.png +0 -0
  260. data/samples/rgba.tar.bz2 +0 -0
  261. data/samples/text_chunk.png +0 -0
  262. data/samples/ztxt_chunk.png +0 -0
  263. data/spec/color_spec.rb +81 -0
  264. data/spec/font_spec.rb +82 -0
  265. data/spec/magic/border_spec.rb +49 -0
  266. data/spec/magic/create_spec.rb +42 -0
  267. data/spec/magic/pixels_spec.rb +73 -0
  268. data/spec/magic/text_spec.rb +113 -0
  269. data/spec/magic/zoom_spec.rb +38 -0
  270. data/spec/png_suite_spec.rb +145 -0
  271. data/spec/spec_helper.rb +45 -1
  272. data/spec/sugar_png/datastream_spec.rb +32 -0
  273. data/spec/support/png_suite.rb +44 -0
  274. data/sugar_png.gemspec +295 -28
  275. metadata +331 -50
data/spec/spec_helper.rb CHANGED
@@ -1,15 +1,56 @@
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'
6
+ require 'awesome_print'
5
7
 
6
8
  # Requires supporting files with custom matchers and macros, etc,
7
9
  # in ./support/ and its subdirectories.
8
10
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
9
11
 
12
+ SAMPLES_DIR = File.expand_path("../samples", File.dirname(__FILE__))
13
+
14
+ SAMPLES =
15
+ if ENV['SAMPLES']
16
+ ENV['SAMPLES'].split(' ')
17
+ else
18
+ Dir[File.join(SAMPLES_DIR,'qr_*.png')]
19
+ end
20
+
21
+ PNGSuite.init( File.join(SAMPLES_DIR, "png_suite") )
22
+
23
+ def png_suite_file(kind, file)
24
+ File.join(PNGSuite.dir, file)
25
+ end
26
+
27
+ def rgba_for fname
28
+ dir = File.expand_path "../samples/rgba", File.dirname(__FILE__)
29
+ unless Dir.exist?(dir)
30
+ system "tar", "xjf", dir+".tar.bz2", "-C", File.dirname(dir)
31
+ end
32
+ File.join( dir, File.basename(fname, ".png")) + ".rgba"
33
+ end
34
+
35
+ def png_suite_files(kind, pattern = "*.png")
36
+ kinds = {
37
+ :broken => "x*",
38
+ :basic => "bas*",
39
+ :filtering => "f*",
40
+ :transparency => "t[bp]*",
41
+ :sizes => "s*"
42
+ }
43
+ kind = kinds[kind] || raise("unknown kind: #{kind}")
44
+
45
+ a = Dir[File.join(PNGSuite.dir, pattern)]
46
+ a.keep_if{ |fname| File.fnmatch?(kind, File.basename(fname)) }
47
+ puts "[?] png_suite_files: no files for #{[kind, pattern].inspect}".yellow if a.empty?
48
+ a
49
+ end
50
+
10
51
  module ResourceFileHelper
11
52
  def resource_file(name)
12
- File.expand_path("./resources/#{name}", File.dirname(__FILE__))
53
+ File.expand_path("../samples/#{name}", File.dirname(__FILE__))
13
54
  end
14
55
 
15
56
  def resource_data(name)
@@ -20,5 +61,8 @@ module ResourceFileHelper
20
61
  end
21
62
 
22
63
  RSpec.configure do |config|
64
+ config.expect_with(:rspec) { |c| c.syntax = [:should, :expect] }
65
+ config.extend PNGSuite
66
+ config.include PNGSuite
23
67
  config.include ResourceFileHelper
24
68
  end
@@ -0,0 +1,32 @@
1
+ require 'spec_helper'
2
+
3
+ describe SugarPNG::Datastream do
4
+
5
+ describe '.from_io'do
6
+ it "should raise an error when loading a file with a bad signature" do
7
+ filename = resource_file('damaged_signature.png')
8
+ lambda { SugarPNG::Datastream.from_file(filename) }.should raise_error(ZPNG::NotSupported)
9
+ end
10
+
11
+ it "should NOT raise an error if the CRC of a chunk is incorrect" do
12
+ filename = resource_file('damaged_chunk.png')
13
+ lambda { SugarPNG::Datastream.from_file(filename) }.should_not raise_error
14
+ end
15
+ end
16
+
17
+ describe '#metadata' do
18
+ it "should load uncompressed tXTt chunks correctly" do
19
+ filename = resource_file('text_chunk.png')
20
+ ds = SugarPNG::Datastream.from_file(filename)
21
+ ds.metadata['Title'].should == 'My amazing icon!'
22
+ ds.metadata['Author'].should == "Willem van Bergen"
23
+ end
24
+
25
+ it "should load compressed zTXt chunks correctly" do
26
+ filename = resource_file('ztxt_chunk.png')
27
+ ds = SugarPNG::Datastream.from_file(filename)
28
+ ds.metadata['Title'].should == 'PngSuite'
29
+ ds.metadata['Copyright'].should == "Copyright Willem van Schaik, Singapore 1995-96"
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,44 @@
1
+ #coding: binary
2
+ module PNGSuite
3
+ PNG_SUITE_URL = "http://www.schaik.com/pngsuite/PngSuite-2011apr25.tgz"
4
+
5
+ class << self
6
+ attr_accessor :dir
7
+
8
+ def init dir
9
+ @dir = dir
10
+ if Dir.exist?(dir)
11
+ if Dir[File.join(dir, "*.png")].size > 100
12
+ # already fetched and unpacked
13
+ return
14
+ end
15
+ else
16
+ Dir.mkdir(dir)
17
+ end
18
+ require 'open-uri'
19
+ puts "[.] fetching PNG test-suite from #{PNG_SUITE_URL} .. "
20
+ data = URI.open(PNG_SUITE_URL).read
21
+
22
+ fname = File.join(dir, "png_suite.tgz")
23
+ File.open(fname, "wb"){ |f| f<<data }
24
+ puts "[.] unpacking #{fname} .. "
25
+ system "tar", "xf", fname, "-C", dir
26
+ end
27
+
28
+ def each *prefixes
29
+ Dir[File.join(dir,"*.png")].each do |fname|
30
+ if prefixes.empty?
31
+ yield fname
32
+ elsif prefixes.any?{ |p| p[/[*?\[]/] ? File.fnmatch(p, File.basename(fname)) : File.basename(fname).start_with?(p) }
33
+ yield fname
34
+ end
35
+ end
36
+ end
37
+
38
+ def each_good
39
+ Dir[File.join(dir,"[^x]*.png")].each do |fname|
40
+ yield fname
41
+ end
42
+ end
43
+ end
44
+ end
data/sugar_png.gemspec CHANGED
@@ -2,17 +2,21 @@
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.2 ruby lib
5
6
 
6
7
  Gem::Specification.new do |s|
7
- s.name = "sugar_png"
8
- s.version = "0.0.1"
8
+ s.name = "sugar_png".freeze
9
+ s.version = "0.5.2"
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 = "2012-12-24"
13
- s.email = "zed.0xff@gmail.com"
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 = "2021-02-18"
15
+ s.email = "zed.0xff@gmail.com".freeze
14
16
  s.extra_rdoc_files = [
15
- "LICENSE.txt"
17
+ "LICENSE.txt",
18
+ "README.md",
19
+ "README.md.tpl"
16
20
  ]
17
21
  s.files = [
18
22
  ".document",
@@ -20,38 +24,301 @@ Gem::Specification.new do |s|
20
24
  "Gemfile",
21
25
  "Gemfile.lock",
22
26
  "LICENSE.txt",
27
+ "README.md",
28
+ "README.md.tpl",
23
29
  "Rakefile",
24
30
  "VERSION",
31
+ "data/1-dump-hex.rb",
32
+ "data/2-marshal-test.rb",
33
+ "data/3-hex2marshal.rb",
34
+ "data/font/00",
35
+ "data/font/01",
36
+ "data/font/02",
37
+ "data/font/03",
38
+ "data/font/04",
39
+ "data/font/05",
40
+ "data/font/06",
41
+ "data/font/07",
42
+ "data/font/09",
43
+ "data/font/0a",
44
+ "data/font/0b",
45
+ "data/font/0c",
46
+ "data/font/0d",
47
+ "data/font/0e",
48
+ "data/font/0f",
49
+ "data/font/10",
50
+ "data/font/11",
51
+ "data/font/12",
52
+ "data/font/13",
53
+ "data/font/14",
54
+ "data/font/15",
55
+ "data/font/16",
56
+ "data/font/17",
57
+ "data/font/18",
58
+ "data/font/19",
59
+ "data/font/1a",
60
+ "data/font/1b",
61
+ "data/font/1c",
62
+ "data/font/1d",
63
+ "data/font/1e",
64
+ "data/font/1f",
65
+ "data/font/20",
66
+ "data/font/21",
67
+ "data/font/22",
68
+ "data/font/23",
69
+ "data/font/24",
70
+ "data/font/25",
71
+ "data/font/26",
72
+ "data/font/27",
73
+ "data/font/28",
74
+ "data/font/29",
75
+ "data/font/2a",
76
+ "data/font/2b",
77
+ "data/font/2c",
78
+ "data/font/2d",
79
+ "data/font/2e",
80
+ "data/font/2f",
81
+ "data/font/30",
82
+ "data/font/31",
83
+ "data/font/32",
84
+ "data/font/33",
85
+ "data/font/34",
86
+ "data/font/35",
87
+ "data/font/36",
88
+ "data/font/37",
89
+ "data/font/38",
90
+ "data/font/39",
91
+ "data/font/3a",
92
+ "data/font/3b",
93
+ "data/font/3c",
94
+ "data/font/3d",
95
+ "data/font/3e",
96
+ "data/font/3f",
97
+ "data/font/40",
98
+ "data/font/41",
99
+ "data/font/42",
100
+ "data/font/43",
101
+ "data/font/44",
102
+ "data/font/45",
103
+ "data/font/46",
104
+ "data/font/47",
105
+ "data/font/48",
106
+ "data/font/49",
107
+ "data/font/4a",
108
+ "data/font/4b",
109
+ "data/font/4c",
110
+ "data/font/4d",
111
+ "data/font/4e",
112
+ "data/font/4f",
113
+ "data/font/50",
114
+ "data/font/51",
115
+ "data/font/52",
116
+ "data/font/53",
117
+ "data/font/54",
118
+ "data/font/55",
119
+ "data/font/56",
120
+ "data/font/57",
121
+ "data/font/58",
122
+ "data/font/59",
123
+ "data/font/5a",
124
+ "data/font/5b",
125
+ "data/font/5c",
126
+ "data/font/5d",
127
+ "data/font/5e",
128
+ "data/font/5f",
129
+ "data/font/60",
130
+ "data/font/61",
131
+ "data/font/62",
132
+ "data/font/63",
133
+ "data/font/64",
134
+ "data/font/65",
135
+ "data/font/66",
136
+ "data/font/67",
137
+ "data/font/68",
138
+ "data/font/69",
139
+ "data/font/6a",
140
+ "data/font/6b",
141
+ "data/font/6c",
142
+ "data/font/6d",
143
+ "data/font/6e",
144
+ "data/font/6f",
145
+ "data/font/70",
146
+ "data/font/71",
147
+ "data/font/72",
148
+ "data/font/73",
149
+ "data/font/74",
150
+ "data/font/75",
151
+ "data/font/76",
152
+ "data/font/77",
153
+ "data/font/78",
154
+ "data/font/79",
155
+ "data/font/7a",
156
+ "data/font/7b",
157
+ "data/font/7c",
158
+ "data/font/7d",
159
+ "data/font/7e",
160
+ "data/font/7f",
161
+ "data/font/80",
162
+ "data/font/81",
163
+ "data/font/82",
164
+ "data/font/83",
165
+ "data/font/84",
166
+ "data/font/85",
167
+ "data/font/86",
168
+ "data/font/87",
169
+ "data/font/88",
170
+ "data/font/89",
171
+ "data/font/8a",
172
+ "data/font/8b",
173
+ "data/font/8c",
174
+ "data/font/8d",
175
+ "data/font/8e",
176
+ "data/font/8f",
177
+ "data/font/90",
178
+ "data/font/91",
179
+ "data/font/92",
180
+ "data/font/93",
181
+ "data/font/94",
182
+ "data/font/95",
183
+ "data/font/96",
184
+ "data/font/97",
185
+ "data/font/98",
186
+ "data/font/99",
187
+ "data/font/9a",
188
+ "data/font/9b",
189
+ "data/font/9c",
190
+ "data/font/9d",
191
+ "data/font/9e",
192
+ "data/font/9f",
193
+ "data/font/a0",
194
+ "data/font/a1",
195
+ "data/font/a2",
196
+ "data/font/a3",
197
+ "data/font/a4",
198
+ "data/font/a5",
199
+ "data/font/a6",
200
+ "data/font/a7",
201
+ "data/font/a8",
202
+ "data/font/a9",
203
+ "data/font/aa",
204
+ "data/font/ac",
205
+ "data/font/ad",
206
+ "data/font/ae",
207
+ "data/font/af",
208
+ "data/font/b0",
209
+ "data/font/b1",
210
+ "data/font/b2",
211
+ "data/font/b3",
212
+ "data/font/b4",
213
+ "data/font/b5",
214
+ "data/font/b6",
215
+ "data/font/b7",
216
+ "data/font/b8",
217
+ "data/font/b9",
218
+ "data/font/ba",
219
+ "data/font/bb",
220
+ "data/font/bc",
221
+ "data/font/bd",
222
+ "data/font/be",
223
+ "data/font/bf",
224
+ "data/font/c0",
225
+ "data/font/c1",
226
+ "data/font/c2",
227
+ "data/font/c3",
228
+ "data/font/c4",
229
+ "data/font/c5",
230
+ "data/font/c6",
231
+ "data/font/c7",
232
+ "data/font/c8",
233
+ "data/font/c9",
234
+ "data/font/ca",
235
+ "data/font/cb",
236
+ "data/font/cc",
237
+ "data/font/cd",
238
+ "data/font/ce",
239
+ "data/font/cf",
240
+ "data/font/d0",
241
+ "data/font/d1",
242
+ "data/font/d2",
243
+ "data/font/d3",
244
+ "data/font/d4",
245
+ "data/font/d5",
246
+ "data/font/d6",
247
+ "data/font/d7",
248
+ "data/font/f9",
249
+ "data/font/fa",
250
+ "data/font/fb",
251
+ "data/font/fc",
252
+ "data/font/fd",
253
+ "data/font/fe",
254
+ "data/font/ff",
255
+ "data/unifont-5.1.20080820.7z",
256
+ "data/unused-4-read-tar.rb",
25
257
  "lib/sugar_png.rb",
258
+ "lib/sugar_png/border.rb",
259
+ "lib/sugar_png/color.rb",
26
260
  "lib/sugar_png/datastream.rb",
261
+ "lib/sugar_png/dyn_accessor.rb",
262
+ "lib/sugar_png/font.rb",
263
+ "lib/sugar_png/glyph.rb",
264
+ "lib/sugar_png/image.rb",
265
+ "samples/damaged_chunk.png",
266
+ "samples/damaged_signature.png",
267
+ "samples/png_suite/f00n0g08_reference.png",
268
+ "samples/png_suite/f00n2c08_reference.png",
269
+ "samples/png_suite/f01n0g08_reference.png",
270
+ "samples/png_suite/f01n2c08_reference.png",
271
+ "samples/png_suite/f02n0g08_reference.png",
272
+ "samples/png_suite/f02n2c08_reference.png",
273
+ "samples/png_suite/f03n0g08_reference.png",
274
+ "samples/png_suite/f03n2c08_reference.png",
275
+ "samples/png_suite/f04n0g08_reference.png",
276
+ "samples/png_suite/f04n2c08_reference.png",
277
+ "samples/readme/explicit_image_dimensions_bg_color.png",
278
+ "samples/readme/hello_world.png",
279
+ "samples/readme/japanese_text_with_rainbow_borders_zoomed_4x.png",
280
+ "samples/readme/pixels_can_be_set_using_ranges_enumerators_arrays.png",
281
+ "samples/readme/playing_with_transparency_16_bit_color_depth.png",
282
+ "samples/readme/white_noise.png",
283
+ "samples/rgba.tar.bz2",
284
+ "samples/text_chunk.png",
285
+ "samples/ztxt_chunk.png",
286
+ "spec/color_spec.rb",
287
+ "spec/font_spec.rb",
288
+ "spec/magic/border_spec.rb",
289
+ "spec/magic/create_spec.rb",
290
+ "spec/magic/pixels_spec.rb",
291
+ "spec/magic/text_spec.rb",
292
+ "spec/magic/zoom_spec.rb",
293
+ "spec/png_suite_spec.rb",
27
294
  "spec/spec_helper.rb",
295
+ "spec/sugar_png/datastream_spec.rb",
296
+ "spec/support/png_suite.rb",
28
297
  "sugar_png.gemspec"
29
298
  ]
30
- s.homepage = "http://github.com/zed-0xff/sugar_png"
31
- s.licenses = ["MIT"]
32
- s.require_paths = ["lib"]
33
- s.rubygems_version = "1.8.24"
34
- 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 = "3.2.3".freeze
302
+ s.summary = "a syntax sugar of PNG manipulation".freeze
35
303
 
36
304
  if s.respond_to? :specification_version then
37
- s.specification_version = 3
305
+ s.specification_version = 4
306
+ end
38
307
 
39
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
40
- s.add_runtime_dependency(%q<zpng>, [">= 0.2.0"])
41
- s.add_development_dependency(%q<rspec>, [">= 2.8.0"])
42
- s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
43
- s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
44
- else
45
- s.add_dependency(%q<zpng>, [">= 0.2.0"])
46
- s.add_dependency(%q<rspec>, [">= 2.8.0"])
47
- s.add_dependency(%q<bundler>, [">= 1.0.0"])
48
- s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
49
- end
308
+ if s.respond_to? :add_runtime_dependency then
309
+ s.add_runtime_dependency(%q<zpng>.freeze, [">= 0.3.1"])
310
+ s.add_development_dependency(%q<rspec>.freeze, ["~> 3.9.0"])
311
+ s.add_development_dependency(%q<rspec-its>.freeze, ["~> 1.3.0"])
312
+ s.add_development_dependency(%q<bundler>.freeze, ["~> 2.2.3"])
313
+ s.add_development_dependency(%q<jeweler>.freeze, ["~> 2.3.9"])
314
+ s.add_development_dependency(%q<awesome_print>.freeze, [">= 0"])
50
315
  else
51
- s.add_dependency(%q<zpng>, [">= 0.2.0"])
52
- s.add_dependency(%q<rspec>, [">= 2.8.0"])
53
- s.add_dependency(%q<bundler>, [">= 1.0.0"])
54
- s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
316
+ s.add_dependency(%q<zpng>.freeze, [">= 0.3.1"])
317
+ s.add_dependency(%q<rspec>.freeze, ["~> 3.9.0"])
318
+ s.add_dependency(%q<rspec-its>.freeze, ["~> 1.3.0"])
319
+ s.add_dependency(%q<bundler>.freeze, ["~> 2.2.3"])
320
+ s.add_dependency(%q<jeweler>.freeze, ["~> 2.3.9"])
321
+ s.add_dependency(%q<awesome_print>.freeze, [">= 0"])
55
322
  end
56
323
  end
57
324