ruby_identicon 0.0.2 → 0.0.6

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: 3e4fd1ab15de4f9a58dcf8691a03577f61e2f518
4
- data.tar.gz: 478b2838da314ef4ae34ff9f8424003f5c0abf4c
2
+ SHA256:
3
+ metadata.gz: cb0fabb0aa8547bc68ad2295ada31bc45d38e11609fd8bf0f45bde706ba6b6de
4
+ data.tar.gz: 49e1497f2ea0e3ae061adea1a9a0528e673b20896afca0dfb8681d50d98eb5c7
5
5
  SHA512:
6
- metadata.gz: 9a8eda4c940f78b7ef21095014f7af8a4d2004621567b5816518e9f49875418179297b9752a8ad12eaeffe14e313c414b66e40668700847b7e7f073a9b8f332d
7
- data.tar.gz: 0ca17ebe08f25cb69a99a81321b35fd8110c72cab3c39cdd309b8dc0fc4a64c9625a9d1cc2045ff8640dabe038c31427f12a9c1bffb853d998ee6a26bdbbb292
6
+ metadata.gz: 1d5dfaf6300470cfed0ae46bc393623971f4ed7a80f47f27fef29c7b8a817e5e05195588a8c80041422bd172188edf0aeff9f2a6dc478dfdda5787788e6cb1c3
7
+ data.tar.gz: fb8004bd6ac01140ce0aa767b8b71fcb87f2573c0d29ad7cd5031992385bafde9a4ede116b958f09f355523bb570d8dc3cc8d9cddee087411b9c7690554580f8
data/.travis.yml CHANGED
@@ -2,5 +2,9 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
4
  - 2.0.0
5
+ - 2.1.6
6
+ - 2.2.3
7
+ before_install:
8
+ - gem install bundler
5
9
  notifications:
6
10
  email: false
data/Gemfile CHANGED
@@ -1,5 +1,9 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ group :development do
4
+ gem 'yard'
5
+ end
6
+
3
7
  group :test do
4
8
  gem 'coveralls', :require => false
5
9
  end
data/README.md CHANGED
@@ -2,10 +2,9 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/ruby_identicon.png)](http://badge.fury.io/rb/ruby_identicon)
4
4
  [![Build Status](https://api.travis-ci.org/chrisbranson/ruby_identicon.png?branch=master)](http://travis-ci.org/chrisbranson/ruby_identicon)
5
- [![Dependency Status](https://gemnasium.com/chrisbranson/ruby_identicon.png)](https://gemnasium.com/chrisbranson/ruby_identicon)
6
5
  [![Coverage Status](https://coveralls.io/repos/chrisbranson/ruby_identicon/badge.png)](https://coveralls.io/r/chrisbranson/ruby_identicon)
7
6
 
8
- ![Example Identicon](https://dl.dropboxusercontent.com/u/176278/ruby_identicon.png)
7
+ ![Example Identicon](https://raw.githubusercontent.com/chrisbranson/ruby_identicon/master/example/ruby_identicon.png)
9
8
 
10
9
  A Ruby implementation of [go-identicon](https://github.com/dgryski/go-identicon) by Damian Gryski
11
10
 
@@ -30,34 +29,45 @@ Or install it yourself as:
30
29
  ## Usage
31
30
 
32
31
  Creating an identicon and saving to png
33
-
34
- RubyIdenticon.create_and_save("RubyIdenticon", "ruby_identicon.png")
32
+ ```ruby
33
+ RubyIdenticon.create_and_save("RubyIdenticon", "ruby_identicon.png")
34
+ ```
35
35
 
36
36
  Creating an identicon and returning a binary string
37
-
38
- blob = RubyIdenticon.create("RubyIdenticon")
39
-
40
- # optional, save to a file
41
- File.open("ruby_identicon.png", "wb") do |f| f.write(blob) end
37
+ ```ruby
38
+ blob = RubyIdenticon.create("RubyIdenticon")
39
+
40
+ # optional, save to a file
41
+ File.open("ruby_identicon.png", "wb") do |f| f.write(blob) end
42
+ ```
43
+
44
+ Creating an identicon and returns in base64 format
45
+ ```ruby
46
+ base64_identicon = RubyIdenticon.create_base64("RubyIdenticon")
47
+ ```
48
+ nb// to render this in html pass the base64 code into your view
49
+ ```ruby
50
+ raw "<img src='data:image/png;base64,#{base64_identicon}'>"
51
+ ```
42
52
 
43
53
  ## Customising the identicon
44
54
 
45
55
  The identicon can be customised by passing additional options
46
56
 
47
- background_color: (Integer, default 0) the background color of the identicon in rgba notation (e.g. xffffffff for white)
57
+ background_color: (Integer, default 0) the background color of the identicon in rgba notation (e.g. 0xffffffff for white)
48
58
  border_size: (Integer, default 35) the size in pixels to leave as an empty border around the identicon image
49
59
  grid_size: (Integer, default 7) the number of rows and columns in the identicon, minimum 4, maximum 9
50
60
  square_size: (Integer, default 50) the size in pixels of each square that makes up the identicon
51
61
  key: (String) a 16 byte key used by siphash when calculating the hash value (see note below)
52
-
62
+
53
63
  Varying the key ensures uniqueness of an identicon for a given title, it is assumed desirable for different applications
54
64
  to use a different key.
55
-
56
- Example
57
-
58
- blob = RubyIdenticon.create("identicons are great!", grid_size: 5, square_size: 70, background_color: 0xf0f0f0ff, key: "1234567890123456")
59
- File.open("tmp/test_identicon.png", "wb") do |f| f.write(blob) end
60
65
 
66
+ Example
67
+ ```ruby
68
+ blob = RubyIdenticon.create("identicons are great!", grid_size: 5, square_size: 70, background_color: 0xf0f0f0ff, key: "1234567890123456")
69
+ File.open("tmp/test_identicon.png", "wb") do |f| f.write(blob) end
70
+ ```
61
71
  ## Contributing
62
72
 
63
73
  1. Fork it
Binary file
@@ -25,6 +25,11 @@
25
25
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26
26
  #++
27
27
 
28
+ require 'ruby_identicon/version'
29
+ require 'chunky_png'
30
+ require 'siphash'
31
+ require 'base64'
32
+
28
33
  #
29
34
  # A Ruby implementation of go-identicon
30
35
  #
@@ -40,13 +45,8 @@
40
45
  # The grid and square sizes can be varied to create identicons of
41
46
  # differing size.
42
47
  #
43
-
44
- require "ruby_identicon/version"
45
- require "chunky_png"
46
- require "siphash"
47
-
48
48
  module RubyIdenticon
49
- # the default paramters used when creating identicons
49
+ # the default options used when creating identicons
50
50
  #
51
51
  # background_color: (Integer, default 0) the background color of the identicon in rgba notation (e.g. xffffffff for white)
52
52
  # border_size: (Integer, default 35) the size in pixels to leave as an empty border around the identicon image
@@ -57,8 +57,7 @@ module RubyIdenticon
57
57
  # varying the key ensures uniqueness of an identicon for a given title, it is assumed desirable for different applications
58
58
  # to use a different key.
59
59
  #
60
-
61
- DEFAULT_PARAMETERS = {
60
+ DEFAULT_OPTIONS = {
62
61
  border_size: 35,
63
62
  square_size: 50,
64
63
  grid_size: 7,
@@ -69,41 +68,39 @@ module RubyIdenticon
69
68
  # create an identicon png and save it to the given filename
70
69
  #
71
70
  # Example:
72
- # >> RubyIdenticon.create_and_save("identicons are great!", "test_identicon.png")
71
+ # >> RubyIdenticon.create_and_save('identicons are great!', 'test_identicon.png')
73
72
  # => result (Boolean)
74
73
  #
75
- # Arguments:
76
- # title: (String)
77
- # filename: (String)
78
- # options: (Hash)
79
-
74
+ # @param title [string] the string value to be represented as an identicon
75
+ # @param filename [string] the full path and filename to save the identicon png to
76
+ # @param options [hash] additional options for the identicon
77
+ #
80
78
  def self.create_and_save(title, filename, options = {})
81
- raise "filename cannot be nil" if filename == nil
79
+ raise 'filename cannot be nil' if filename == nil
82
80
 
83
81
  blob = create(title, options)
84
82
  return false if blob == nil
85
83
 
86
- File.open(filename, "wb") do |f| f.write(blob) end
84
+ File.open(filename, 'wb') { |f| f.write(blob) }
87
85
  end
88
86
 
89
87
  # create an identicon png and return it as a binary string
90
88
  #
91
89
  # Example:
92
- # >> RubyIdenticon.create("identicons are great!")
90
+ # >> RubyIdenticon.create('identicons are great!')
93
91
  # => binary blob (String)
94
92
  #
95
- # Arguments:
96
- # title: (String)
97
- # options: (Hash)
98
-
93
+ # @param title [string] the string value to be represented as an identicon
94
+ # @param options [hash] additional options for the identicon
95
+ #
99
96
  def self.create(title, options = {})
100
- options = DEFAULT_PARAMETERS.merge(options)
101
-
102
- raise "title cannot be nil" if title == nil
103
- raise "key is nil or less than 16 bytes" if options[:key] == nil || options[:key].length < 16
104
- raise "grid_size must be between 4 and 9" if options[:grid_size] < 4 || options[:grid_size] > 9
105
- raise "invalid border size" if options[:border_size] < 0
106
- raise "invalid square size" if options[:square_size] < 0
97
+ options = DEFAULT_OPTIONS.merge(options)
98
+
99
+ raise 'title cannot be nil' if title == nil
100
+ raise 'key is nil or less than 16 bytes' if options[:key] == nil || options[:key].length < 16
101
+ raise 'grid_size must be between 4 and 9' if options[:grid_size] < 4 || options[:grid_size] > 9
102
+ raise 'invalid border size' if options[:border_size] < 0
103
+ raise 'invalid square size' if options[:square_size] < 0
107
104
 
108
105
  hash = SipHash.digest(options[:key], title)
109
106
 
@@ -117,17 +114,17 @@ module RubyIdenticon
117
114
  hash >>= 24
118
115
 
119
116
  sqx = sqy = 0
120
- for i in 0..(options[:grid_size] * ((options[:grid_size]+1) / 2))
117
+ (options[:grid_size] * ((options[:grid_size] + 1) / 2)).times do
121
118
  if hash & 1 == 1
122
119
  x = options[:border_size] + (sqx * options[:square_size])
123
120
  y = options[:border_size] + (sqy * options[:square_size])
124
121
 
125
122
  # left hand side
126
- png.rect(x, y, x + options[:square_size], y + options[:square_size], color, color)
123
+ png.rect(x, y, x + options[:square_size] - 1, y + options[:square_size] - 1, color, color)
127
124
 
128
125
  # mirror right hand side
129
126
  x = options[:border_size] + ((options[:grid_size] - 1 - sqx) * options[:square_size])
130
- png.rect(x, y, x + options[:square_size], y + options[:square_size], color, color)
127
+ png.rect(x, y, x + options[:square_size] - 1, y + options[:square_size] - 1, color, color)
131
128
  end
132
129
 
133
130
  hash >>= 1
@@ -138,6 +135,10 @@ module RubyIdenticon
138
135
  end
139
136
  end
140
137
 
141
- png.to_blob :color_mode => ChunkyPNG::COLOR_INDEXED
138
+ png.to_blob color_mode: ChunkyPNG::COLOR_INDEXED
139
+ end
140
+
141
+ def self.create_base64(title, options = {})
142
+ Base64.encode64(self.create(title, options)).force_encoding('UTF-8')
142
143
  end
143
144
  end
@@ -1,3 +1,3 @@
1
1
  module RubyIdenticon
2
- VERSION = "0.0.2"
2
+ VERSION = '0.0.6'
3
3
  end
data/lib/siphash.rb CHANGED
@@ -8,10 +8,10 @@
8
8
  # distribute, sublicense, and/or sell copies of the Software, and to
9
9
  # permit persons to whom the Software is furnished to do so, subject to
10
10
  # the following conditions:
11
- #
11
+ #
12
12
  # The above copyright notice and this permission notice shall be
13
13
  # included in all copies or substantial portions of the Software.
14
- #
14
+ #
15
15
  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
16
  # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
17
  # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -22,14 +22,13 @@
22
22
  #++
23
23
 
24
24
  module SipHash
25
-
26
25
  def self.digest(key, msg)
27
26
  s = State.new(key)
28
27
  len = msg.size
29
28
  iter = len / 8
30
29
 
31
30
  iter.times do |i|
32
- m = msg.slice(i * 8, 8).unpack("Q<")[0]
31
+ m = msg.slice(i * 8, 8).unpack('Q<')[0]
33
32
  s.apply_block(m)
34
33
  end
35
34
 
@@ -44,7 +43,7 @@ module SipHash
44
43
 
45
44
  def self.last_block(msg, len, iter)
46
45
  last = (len << 56) & State::MASK_64;
47
-
46
+
48
47
  r = len % 8
49
48
  off = iter * 8
50
49
 
@@ -59,7 +58,7 @@ module SipHash
59
58
  end
60
59
 
61
60
  class State
62
-
61
+
63
62
  MASK_64 = 0xffffffffffffffff
64
63
 
65
64
  def initialize(key)
@@ -68,8 +67,8 @@ module SipHash
68
67
  @v2 = 0x6c7967656e657261
69
68
  @v3 = 0x7465646279746573
70
69
 
71
- k0 = key.slice(0, 8).unpack("Q<")[0]
72
- k1 = key.slice(8, 8).unpack("Q<")[0]
70
+ k0 = key.slice(0, 8).unpack('Q<')[0]
71
+ k1 = key.slice(8, 8).unpack('Q<')[0]
73
72
 
74
73
  @v0 ^= k0
75
74
  @v1 ^= k1
@@ -89,7 +88,7 @@ module SipHash
89
88
 
90
89
  def compress
91
90
  @v0 = (@v0 + @v1) & MASK_64
92
- @v2 = (@v2 + @v3) & MASK_64
91
+ @v2 = (@v2 + @v3) & MASK_64
93
92
  @v1 = rotl64(@v1, 13)
94
93
  @v3 = rotl64(@v3, 16)
95
94
  @v1 ^= @v0
@@ -112,6 +111,5 @@ module SipHash
112
111
  def digest
113
112
  @v0 ^ @v1 ^ @v2 ^ @v3
114
113
  end
115
-
116
114
  end
117
115
  end
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.version = RubyIdenticon::VERSION
9
9
  spec.authors = ["Chris Branson"]
10
10
  spec.email = ["branson.chris@gmail.com"]
11
-
11
+
12
12
  spec.description = <<-EOT
13
13
  A Ruby implementation of go-identicon by Damian Gryski
14
14
 
@@ -31,9 +31,10 @@ Gem::Specification.new do |spec|
31
31
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
32
32
  spec.require_paths = ["lib"]
33
33
 
34
- spec.add_development_dependency "bundler", "~> 1.3"
34
+ spec.add_development_dependency "bundler", ">= 2.2.10"
35
35
  spec.add_development_dependency "rake"
36
- spec.add_development_dependency "rspec", "~> 2.6"
36
+ spec.add_development_dependency "rspec", "~> 3.10.0"
37
+ spec.add_development_dependency "yard", ">= 0.9.20"
37
38
 
38
- spec.add_dependency "chunky_png", "~> 1.2.8"
39
+ spec.add_dependency "chunky_png", "~> 1.4.0"
39
40
  end
data/ruby_identicon.rb ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "ruby_identicon.rb"
4
+
5
+ abort "Please run with a filename as an argument" unless ARGV[0]
6
+ filename = ARGV[0].clone
7
+ ARGV.clear
8
+
9
+ print "Reading standard input to generate identicon...\n"
10
+
11
+ identstring = gets
12
+
13
+ blob = RubyIdenticon.create(identstring, grid_size: 5, square_size: 70, background_color: 0xf0f0f0ff, key: "1234567890123456")
14
+ File.open(filename, "wb") do |f| f.write(blob) end
@@ -2,68 +2,74 @@ require 'helper'
2
2
 
3
3
  describe RubyIdenticon do
4
4
  before(:each) do
5
- Dir.mkdir("tmp") unless File.directory?("tmp")
5
+ Dir.mkdir('tmp') unless File.directory?('tmp')
6
6
  end
7
7
 
8
- it "creates a binary string image blob" do
9
- expect(RubyIdenticon.create("RubyIdenticon")).to be_a_kind_of(String)
8
+ # general parameter tests
9
+ it 'creates a binary string image blob' do
10
+ expect(RubyIdenticon.create('RubyIdenticon')).to be_a_kind_of(String)
10
11
  end
11
12
 
12
- it "does not create a binary string image blob with an invalid title" do
13
- lambda { RubyIdenticon.create(nil) }.should raise_exception("title cannot be nil")
13
+ it 'does not create a binary string image blob with an invalid title' do
14
+ lambda { RubyIdenticon.create(nil) }.should raise_exception('title cannot be nil')
14
15
  end
15
16
 
16
- it "does not create a binary string image blob with an invalid key" do
17
- lambda { RubyIdenticon.create("identicons are great!", key: "\x00\x11\x22\x33\x44") }.should raise_exception("key is nil or less than 16 bytes")
17
+ it 'does not create a binary string image blob with an invalid key' do
18
+ lambda { RubyIdenticon.create('identicons are great!', key: "\x00\x11\x22\x33\x44") }.should raise_exception('key is nil or less than 16 bytes')
18
19
  end
19
20
 
20
- it "does not create a binary string image blob with an invalid grid size" do
21
- lambda { RubyIdenticon.create("RubyIdenticon", grid_size: 2) }.should raise_exception("grid_size must be between 4 and 9")
22
- lambda { RubyIdenticon.create("RubyIdenticon", grid_size: 20) }.should raise_exception("grid_size must be between 4 and 9")
21
+ it 'does not create a binary string image blob with an invalid grid size' do
22
+ lambda { RubyIdenticon.create('RubyIdenticon', grid_size: 2) }.should raise_exception('grid_size must be between 4 and 9')
23
+ lambda { RubyIdenticon.create('RubyIdenticon', grid_size: 20) }.should raise_exception('grid_size must be between 4 and 9')
23
24
  end
24
25
 
25
- it "does not create a binary string image blob with an invalid square_size size" do
26
- lambda { RubyIdenticon.create("RubyIdenticon", square_size: -2) }.should raise_exception("invalid square size")
26
+ it 'does not create a binary string image blob with an invalid square_size size' do
27
+ lambda { RubyIdenticon.create('RubyIdenticon', square_size: -2) }.should raise_exception('invalid square size')
27
28
  end
28
29
 
29
- it "does not create a binary string image blob with an invalid border_size size" do
30
- lambda { RubyIdenticon.create("RubyIdenticon", border_size: -2) }.should raise_exception("invalid border size")
30
+ it 'does not create a binary string image blob with an invalid border_size size' do
31
+ lambda { RubyIdenticon.create('RubyIdenticon', border_size: -2) }.should raise_exception('invalid border size')
31
32
  end
32
33
 
33
-
34
-
35
- it "creates a png image file" do
36
- blob = RubyIdenticon.create("RubyIdenticon")
37
- result = File.open("tmp/ruby_identicon.png", "wb") do |f| f.write(blob) end
38
- expect(result).to be_true
34
+ # blob creation tests
35
+ it 'creates a png image file' do
36
+ blob = RubyIdenticon.create('RubyIdenticon')
37
+ result = File.open('tmp/ruby_identicon.png', 'wb') { |f| f.write(blob) }
38
+ expect(result).to be_truthy
39
39
  end
40
40
 
41
- it "creates a png image file of grid size 5, square size 70 and grey background" do
42
- blob = RubyIdenticon.create("RubyIdenticon", grid_size: 5, square_size: 70, background_color: 0xf0f0f0ff, key: "1234567890123456")
43
- result = File.open("tmp/ruby_identicon_gs5_white.png", "wb") do |f| f.write(blob) end
44
- expect(result).to be_true
41
+ it 'creates a png image file of grid size 5, square size 70 and grey background' do
42
+ blob = RubyIdenticon.create('RubyIdenticon', grid_size: 5, square_size: 70, background_color: 0xf0f0f0ff, key: '1234567890123456')
43
+ result = File.open('tmp/ruby_identicon_gs5_white.png', 'wb') { |f| f.write(blob) }
44
+ expect(result).to be_truthy
45
45
  end
46
46
 
47
- it "creates 10 png image files" do
47
+ it 'creates 10 png image files' do
48
48
  10.times do |count|
49
49
  blob = RubyIdenticon.create("RubyIdenticon_#{count}")
50
- result = File.open("tmp/ruby_identicon_#{count}.png", "wb") do |f| f.write(blob) end
51
- expect(result).to be_true
50
+ result = File.open("tmp/ruby_identicon_#{count}.png", 'wb') { |f| f.write(blob) }
51
+ expect(result).to be_truthy
52
52
  end
53
53
  end
54
54
 
55
+ # file creation tests
56
+ it 'creates a png image file via create_and_save' do
57
+ result = RubyIdenticon.create_and_save('RubyIdenticon is fun', 'tmp/test_identicon.png')
58
+ expect(result).to be_truthy
59
+ end
55
60
 
56
-
57
- it "creates a png image file via create_and_save" do
58
- result = RubyIdenticon.create_and_save("RubyIdenticon is fun", "tmp/test_identicon.png")
59
- expect(result).to be_true
61
+ it 'does not create a png image file via create_and_save with an invalid filename' do
62
+ lambda { RubyIdenticon.create_and_save('RubyIdenticon is fun', nil) }.should raise_exception('filename cannot be nil')
60
63
  end
61
64
 
62
- it "does not create a png image file via create_and_save with an invalid filename" do
63
- lambda { RubyIdenticon.create_and_save("RubyIdenticon is fun", nil) }.should raise_exception("filename cannot be nil")
65
+ it 'does not create a png image file via create_and_save with an invalid title' do
66
+ lambda { RubyIdenticon.create_and_save(nil, 'tmp/test_identicon.png') }.should raise_exception('title cannot be nil')
64
67
  end
65
68
 
66
- it "does not create a png image file via create_and_save with an invalid title" do
67
- lambda { RubyIdenticon.create_and_save(nil, "tmp/test_identicon.png") }.should raise_exception("title cannot be nil")
69
+ # Base64 creation tests
70
+ it 'creates base64 version of the image' do
71
+ blob = RubyIdenticon.create('RubyIdenticon')
72
+ base64 = RubyIdenticon.create_base64('RubyIdenticon')
73
+ expect(Base64.decode64(base64)).to eq blob
68
74
  end
69
75
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_identicon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Branson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-17 00:00:00.000000000 Z
11
+ date: 2021-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
19
+ version: 2.2.10
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: '1.3'
26
+ version: 2.2.10
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,28 +44,42 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.6'
47
+ version: 3.10.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.6'
54
+ version: 3.10.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: yard
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 0.9.20
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 0.9.20
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: chunky_png
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
73
  - - "~>"
60
74
  - !ruby/object:Gem::Version
61
- version: 1.2.8
75
+ version: 1.4.0
62
76
  type: :runtime
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.2.8
82
+ version: 1.4.0
69
83
  description: |2
70
84
  A Ruby implementation of go-identicon by Damian Gryski
71
85
 
@@ -89,17 +103,19 @@ files:
89
103
  - LICENSE.txt
90
104
  - README.md
91
105
  - Rakefile
106
+ - example/ruby_identicon.png
92
107
  - lib/ruby_identicon.rb
93
108
  - lib/ruby_identicon/version.rb
94
109
  - lib/siphash.rb
95
110
  - ruby_identicon.gemspec
111
+ - ruby_identicon.rb
96
112
  - spec/helper.rb
97
113
  - spec/ruby_identicon_spec.rb
98
114
  homepage: ''
99
115
  licenses:
100
116
  - MIT
101
117
  metadata: {}
102
- post_install_message:
118
+ post_install_message:
103
119
  rdoc_options: []
104
120
  require_paths:
105
121
  - lib
@@ -114,9 +130,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
130
  - !ruby/object:Gem::Version
115
131
  version: '0'
116
132
  requirements: []
117
- rubyforge_project:
118
- rubygems_version: 2.2.0
119
- signing_key:
133
+ rubygems_version: 3.2.15
134
+ signing_key:
120
135
  specification_version: 4
121
136
  summary: A Ruby Gem for creating GitHub like identicons
122
137
  test_files: