monsterid 0.1.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2179f7a408502e0c774911440899db23bcc5cdc3
4
- data.tar.gz: 0b5f701dc34f1f061475ff0b9b842890d37819a7
2
+ SHA256:
3
+ metadata.gz: 244ae4b3aae8ef433d3258aa77852dc093187b2869be99268579948577b78830
4
+ data.tar.gz: d2b8a65efaf21e61c8c8c3112450d718b258eaa214dcc2ea96718612d3bd9453
5
5
  SHA512:
6
- metadata.gz: de6fde257202edf5fdce322c4279f548cee79499f7fa0539fc0d204ecd846415af37be60f16861446ea59c168c468fdbd35fd2cfe5d09e923ad1031ecb7e88af
7
- data.tar.gz: 4310a9d8c4e11c58a6ecdbc6441b1c52b947cafa54abe31342185d46ec121f94f2a0d227736135bf7ff56807b9ba720894e8ca0eb3b4530c8665073b3dc5a4b0
6
+ metadata.gz: dcd9716d34441fc4f06fbe5ed4b9b494eef7630bf5961b9379e1a0070da54827d7e7c844e17ef08583c4a5d3a5900d56b529c724096dc7681a5cc0994debe37d
7
+ data.tar.gz: 1aace8a281450f025377171e522cb272fec4e58b07c9973389a7e429d43246a7e6283b53934d36e1c2fbdfa08cc398799e0564e266ddcb18fd45a4e00f2530ae
data/CHANGELOG ADDED
@@ -0,0 +1,24 @@
1
+ 0.4.2:
2
+ - Dependency bumps due to security issues
3
+ - Rubocop style fixes
4
+ - String freeze
5
+
6
+ 0.4.0:
7
+ - Depend on ChunkyPNG, not OilyPNG, thus not requiring a C extension
8
+
9
+ 0.3.2:
10
+ - Remove Color requirement
11
+
12
+ 0.3:
13
+ - Remove jeweler dependency and all the shit that comes with it
14
+ - Remove unused files
15
+ - Use ChunkyPNG colors instead of 'Color' gem, netting a 50% performance increase!
16
+ - Use HSV instead of HSL, making the monsters not look over-exposed.
17
+ - Conform to some best practices with gem packaging (like only specifying dependencies once)
18
+
19
+ 0.2:
20
+ - Let ChunkyPNG handle data url generation
21
+ - Some documentation
22
+
23
+ 0.1:
24
+ - First release
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 Knut Aldrin Wikström
1
+ Copyright (c) 2014-2017 Knut Aldrin
2
2
 
3
3
  Original php project by Andreas Gohr (http://www.splitbrain.org/projects/monsterid)
4
4
  Monster icons by Katherine Garner (http://kathgarner.com/)
data/README.md CHANGED
@@ -4,8 +4,24 @@ MonsterID
4
4
  A port of the php script by Andreas Gohr (http://www.splitbrain.org/projects/monsterid).
5
5
  Actually kinda more like a rewrite.
6
6
 
7
+ After version 0.4 only ChunkyPNG is required, thus MonsterID now only requires pure ruby. :)
8
+ If OilyPNG is available, MonsterID will load it, and be as fast as before. Make sure OilyPNG is at least v1.2.1, as <=1.2.0 has a bug with transparency.
9
+
7
10
  Feel free to use/steal/share/improve.
8
11
 
9
- Copyright (c) 2014 Knut Aldrin Wikström. See LICENSE for
12
+ USAGE
13
+ =====
14
+
15
+ ```ruby
16
+ require 'monsterid'
17
+
18
+ monster = MonsterID.new('email@somewhere.com')
19
+ print monster.id # SHA1 of seed
20
+ monster.save("~/monsters/#{monster.id}.png") # monster
21
+ print monster.to_datastream # Prints raw PNG
22
+ ```
23
+
24
+
25
+ Copyright (c) 2014-2017 Knut Aldrin. See LICENSE for
10
26
  further details.
11
27
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.4.2
data/lib/monsterid.rb CHANGED
@@ -1,7 +1,13 @@
1
- require 'oily_png'
1
+ # frozen_string_literal: true
2
+
3
+ # Load oily_png if available, otherwise default to pure ruby chunky_png
4
+ begin
5
+ require 'oily_png'
6
+ rescue LoadError
7
+ require 'chunky_png'
8
+ end
9
+
2
10
  require 'digest'
3
- require 'color'
4
- require 'base64'
5
11
 
6
12
  # Generates cute monsters from a seed
7
13
  class MonsterID
@@ -11,112 +17,110 @@ class MonsterID
11
17
  'legs_4.png', 'legs_S8.png', 'legs_S11.png', 'mouth_5.png',
12
18
  'mouth_8.png', 'mouth_S1.png', 'mouth_S3.png', 'mouth_2.png',
13
19
  'eyes_13.png', 'legs_S13.png', 'mouth_S7.png'
14
- ]
20
+ ].freeze
15
21
  BODY_COLOR_PARTS = [
16
22
  'arms_S8.png', 'legs_S5.png',
17
23
  'mouth_S5.png', 'mouth_S4.png'
18
- ]
24
+ ].freeze
19
25
  SPECIFIC_COLOR_PARTS = {
20
- 'arms_S2.png' => [0, 200],
21
- 'hair_S6.png' => [0, 200],
22
- 'mouth_9.png' => [0, 200],
23
- 'mouth_6.png' => [0, 200],
26
+ 'arms_S2.png' => [0, 200],
27
+ 'hair_S6.png' => [0, 200],
28
+ 'mouth_9.png' => [0, 200],
29
+ 'mouth_6.png' => [0, 200],
24
30
  'mouth_S2.png' => [0, 200]
25
- }
26
-
31
+ }.freeze
32
+
27
33
  PARTS = {
28
- :arms => [
34
+ arms: [
29
35
  'arms_1.png', 'arms_2.png', 'arms_3.png', 'arms_4.png', 'arms_5.png',
30
36
  'arms_S1.png', 'arms_S2.png', 'arms_S3.png', 'arms_S4.png', 'arms_S5.png',
31
37
  'arms_S6.png', 'arms_S7.png', 'arms_S8.png', 'arms_S9.png'
32
38
  ],
33
- :body => [
39
+ body: [
34
40
  'body_1.png', 'body_2.png', 'body_3.png', 'body_4.png', 'body_5.png',
35
41
  'body_6.png', 'body_7.png', 'body_8.png', 'body_9.png', 'body_10.png',
36
42
  'body_11.png', 'body_12.png', 'body_13.png', 'body_14.png', 'body_15.png',
37
43
  'body_S1.png', 'body_S2.png', 'body_S3.png', 'body_S4.png', 'body_S5.png'
38
44
  ],
39
- :eyes => [
45
+ eyes: [
40
46
  'eyes_1.png', 'eyes_2.png', 'eyes_3.png', 'eyes_4.png', 'eyes_5.png',
41
47
  'eyes_6.png', 'eyes_7.png', 'eyes_8.png', 'eyes_9.png', 'eyes_10.png',
42
48
  'eyes_11.png', 'eyes_12.png', 'eyes_13.png', 'eyes_14.png', 'eyes_15.png',
43
49
  'eyes_S1.png', 'eyes_S2.png', 'eyes_S3.png', 'eyes_S4.png', 'eyes_S5.png'
44
50
  ],
45
- :hair => [
51
+ hair: [
46
52
  'hair_1.png', 'hair_2.png', 'hair_3.png', 'hair_4.png', 'hair_5.png',
47
53
  'hair_S1.png', 'hair_S2.png', 'hair_S3.png', 'hair_S4.png', 'hair_S5.png',
48
54
  'hair_S6.png', 'hair_S7.png'
49
55
  ],
50
- :legs => [
56
+ legs: [
51
57
  'legs_1.png', 'legs_2.png', 'legs_3.png', 'legs_4.png', 'legs_5.png',
52
58
  'legs_S1.png', 'legs_S10.png', 'legs_S11.png', 'legs_S12.png',
53
- 'legs_S13.png', 'legs_S2.png', 'legs_S3.png', 'legs_S4.png',
59
+ 'legs_S13.png', 'legs_S2.png', 'legs_S3.png', 'legs_S4.png',
54
60
  'legs_S5.png', 'legs_S6.png', 'legs_S7.png', 'legs_S8.png', 'legs_S9.png'
55
61
  ],
56
- :mouth => [
62
+ mouth: [
57
63
  'mouth_1.png', 'mouth_2.png', 'mouth_3.png', 'mouth_4.png', 'mouth_5.png',
58
64
  'mouth_6.png', 'mouth_7.png', 'mouth_8.png', 'mouth_9.png', 'mouth_10.png',
59
65
  'mouth_S1.png', 'mouth_S2.png', 'mouth_S3.png', 'mouth_S4.png', 'mouth_S5.png',
60
66
  'mouth_S6.png', 'mouth_S7.png'
61
67
  ]
62
- }
63
-
68
+ }.freeze
69
+
64
70
  # Remove body 12 for now, doesn't look good
65
- PARTS[:body].delete( 'body_12.png' )
66
-
71
+ PARTS[:body].delete('body_12.png')
72
+
67
73
  # Test color set [hue, sat]
68
74
  COLORS = [
69
75
  [8, 255], [160, 64], [8, 127], [184, 255],
70
76
  [24, 191], [208, 191], [40, 255], [208, 64],
71
77
  [48, 64], [248, 191], [72, 127], [272, 64],
72
78
  [128, 255], [312, 191], [160, 255], [336, 255]
73
- ]
74
-
79
+ ].freeze
80
+
75
81
  def initialize(seed, size = 120)
76
82
  @id = Digest::SHA1.hexdigest seed.to_s
77
-
83
+
78
84
  parts = {
79
- :legs => {
80
- :part => PARTS[:legs ][@id[0, 2].hex % PARTS[:legs ].length],
81
- :color => COLORS[@id[2, 2].hex % COLORS.length]
85
+ legs: {
86
+ part: PARTS[:legs][@id[0, 2].hex % PARTS[:legs].length],
87
+ color: COLORS[@id[2, 2].hex % COLORS.length]
82
88
  },
83
- :hair => {
84
- :part => PARTS[:hair ][@id[4, 2].hex % PARTS[:hair ].length],
85
- :color => COLORS[@id[6, 2].hex % COLORS.length]
89
+ hair: {
90
+ part: PARTS[:hair][@id[4, 2].hex % PARTS[:hair].length],
91
+ color: COLORS[@id[6, 2].hex % COLORS.length]
86
92
  },
87
- :arms => {
88
- :part => PARTS[:arms ][@id[8, 2].hex % PARTS[:arms ].length],
89
- :color => COLORS[@id[10, 2].hex % COLORS.length]
93
+ arms: {
94
+ part: PARTS[:arms][@id[8, 2].hex % PARTS[:arms].length],
95
+ color: COLORS[@id[10, 2].hex % COLORS.length]
90
96
  },
91
- :body => {
92
- :part => PARTS[:body ][@id[12, 2].hex % PARTS[:body ].length],
93
- :color => COLORS[@id[14, 2].hex % COLORS.length]
97
+ body: {
98
+ part: PARTS[:body][@id[12, 2].hex % PARTS[:body].length],
99
+ color: COLORS[@id[14, 2].hex % COLORS.length]
94
100
  },
95
- :eyes => {
96
- :part => PARTS[:eyes ][@id[16, 2].hex % PARTS[:eyes ].length],
97
- :color => COLORS[@id[18, 2].hex % COLORS.length]
101
+ eyes: {
102
+ part: PARTS[:eyes][@id[16, 2].hex % PARTS[:eyes].length],
103
+ color: COLORS[@id[18, 2].hex % COLORS.length]
98
104
  },
99
- :mouth => {
100
- :part => PARTS[:mouth][@id[20, 2].hex % PARTS[:mouth].length],
101
- :color => COLORS[@id[22, 2].hex % COLORS.length]
105
+ mouth: {
106
+ part: PARTS[:mouth][@id[20, 2].hex % PARTS[:mouth].length],
107
+ color: COLORS[@id[22, 2].hex % COLORS.length]
102
108
  }
103
109
  }
104
-
110
+
105
111
  @monster = ChunkyPNG::Image.new(120, 120, ChunkyPNG::Color::TRANSPARENT)
106
-
112
+
107
113
  parts.each do |_, part|
108
114
  path = File.join(File.dirname(__FILE__), 'parts', part[:part])
109
115
  partimg = ChunkyPNG::Image.from_file(path)
110
-
116
+
111
117
  if BODY_COLOR_PARTS.include? part[:part]
112
118
  part[:color] = parts[:body][:color]
113
119
  elsif SPECIFIC_COLOR_PARTS.include? part[:part]
114
120
  part[:color] = SPECIFIC_COLOR_PARTS[part[:part]]
115
121
  end
116
-
117
- unless WHITE_PARTS.include? part[:part]
118
- partimg = colorise(partimg, part[:color][0], part[:color][1])
119
- end
122
+
123
+ partimg = colorise(partimg, part[:color][0], part[:color][1]) unless WHITE_PARTS.include? part[:part]
120
124
 
121
125
  @monster.compose!(partimg)
122
126
  end
@@ -136,28 +140,24 @@ class MonsterID
136
140
  @monster.to_datastream
137
141
  end
138
142
 
139
- def to_data_uri
140
- 'data:image/png;base64,' +
141
- Base64.strict_encode64(@monster.to_datastream.to_s)
143
+ attr_reader :id
144
+
145
+ def to_data_url
146
+ @monster.to_data_url
142
147
  end
143
-
148
+
144
149
  def inspect
145
150
  "#<#{self.class.name}:#{object_id} id: #{@id}>"
146
151
  end
147
-
152
+
148
153
  private
149
154
 
150
- def colorise(img, hue, sat = 255)
155
+ def colorise(img, h, s = 255)
156
+ s = s.to_f / 255 # ChunkyPNG uses sat from 0.0 to 1.0
157
+
151
158
  img.pixels.map! do |px|
152
- pxrgb = Color::RGB.new(ChunkyPNG::Color.r(px),
153
- ChunkyPNG::Color.g(px),
154
- ChunkyPNG::Color.b(px))
155
- pxhsl = pxrgb.to_hsl
156
- pxhsl.saturation = sat
157
- pxhsl.hue = hue
158
- newrgb = pxhsl.to_rgb
159
-
160
- ChunkyPNG::Color.rgba(newrgb.red.to_i, newrgb.green.to_i, newrgb.blue.to_i, ChunkyPNG::Color.a(px))
159
+ _, _, v, a = ChunkyPNG::Color.to_hsv(px, true)
160
+ ChunkyPNG::Color.from_hsv(h, s, v, a)
161
161
  end
162
162
 
163
163
  img
metadata CHANGED
@@ -1,127 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monsterid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
- - Knut Aldrin Wikström
8
- autorequire:
7
+ - Knut Aldrin
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-19 00:00:00.000000000 Z
11
+ date: 2021-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: oily_png
14
+ name: chunky_png
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.1'
19
+ version: '1.4'
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: '1.1'
27
- - !ruby/object:Gem::Dependency
28
- name: color
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.7'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.7'
41
- - !ruby/object:Gem::Dependency
42
- name: shoulda
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rdoc
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '3.12'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '3.12'
26
+ version: '1.4'
69
27
  - !ruby/object:Gem::Dependency
70
28
  name: bundler
71
29
  requirement: !ruby/object:Gem::Requirement
72
30
  requirements:
73
31
  - - "~>"
74
32
  - !ruby/object:Gem::Version
75
- version: '1.0'
33
+ version: '2.1'
76
34
  type: :development
77
35
  prerelease: false
78
36
  version_requirements: !ruby/object:Gem::Requirement
79
37
  requirements:
80
38
  - - "~>"
81
39
  - !ruby/object:Gem::Version
82
- version: '1.0'
40
+ version: '2.1'
83
41
  - !ruby/object:Gem::Dependency
84
- name: jeweler
42
+ name: rubocop
85
43
  requirement: !ruby/object:Gem::Requirement
86
44
  requirements:
87
45
  - - "~>"
88
46
  - !ruby/object:Gem::Version
89
- version: 2.0.1
47
+ version: '1.14'
90
48
  type: :development
91
49
  prerelease: false
92
50
  version_requirements: !ruby/object:Gem::Requirement
93
51
  requirements:
94
52
  - - "~>"
95
53
  - !ruby/object:Gem::Version
96
- version: 2.0.1
97
- - !ruby/object:Gem::Dependency
98
- name: simplecov
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: rubocop
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
54
+ version: '1.14'
125
55
  description: Port/rework of the php script, with new monsters snatched from the WP
126
56
  plugin
127
57
  email: knutaldrin@gmail.com
@@ -131,12 +61,9 @@ extra_rdoc_files:
131
61
  - LICENSE
132
62
  - README.md
133
63
  files:
134
- - ".document"
135
- - Gemfile
136
- - Gemfile.lock
64
+ - CHANGELOG
137
65
  - LICENSE
138
66
  - README.md
139
- - Rakefile
140
67
  - VERSION
141
68
  - lib/monsterid.rb
142
69
  - lib/parts/arms_1.png
@@ -206,7 +133,6 @@ files:
206
133
  - lib/parts/hair_S5.png
207
134
  - lib/parts/hair_S6.png
208
135
  - lib/parts/hair_S7.png
209
- - lib/parts/image.info
210
136
  - lib/parts/legs_1.png
211
137
  - lib/parts/legs_2.png
212
138
  - lib/parts/legs_3.png
@@ -225,7 +151,6 @@ files:
225
151
  - lib/parts/legs_S7.png
226
152
  - lib/parts/legs_S8.png
227
153
  - lib/parts/legs_S9.png
228
- - lib/parts/monsterparts.xcf
229
154
  - lib/parts/mouth_1.png
230
155
  - lib/parts/mouth_10.png
231
156
  - lib/parts/mouth_2.png
@@ -243,13 +168,11 @@ files:
243
168
  - lib/parts/mouth_S5.png
244
169
  - lib/parts/mouth_S6.png
245
170
  - lib/parts/mouth_S7.png
246
- - monsterid.gemspec
247
- - test/helper.rb
248
- homepage: http://github.com/knutaldrin/monsterid
171
+ homepage: https://github.com/knutaldrin/monsterid
249
172
  licenses:
250
- - CC BY 4.0
173
+ - CC-BY-4.0
251
174
  metadata: {}
252
- post_install_message:
175
+ post_install_message:
253
176
  rdoc_options: []
254
177
  require_paths:
255
178
  - lib
@@ -257,16 +180,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
257
180
  requirements:
258
181
  - - ">="
259
182
  - !ruby/object:Gem::Version
260
- version: '0'
183
+ version: '2.0'
261
184
  required_rubygems_version: !ruby/object:Gem::Requirement
262
185
  requirements:
263
186
  - - ">="
264
187
  - !ruby/object:Gem::Version
265
188
  version: '0'
266
189
  requirements: []
267
- rubyforge_project:
268
- rubygems_version: 2.3.0
269
- signing_key:
190
+ rubygems_version: 3.2.15
191
+ signing_key:
270
192
  specification_version: 4
271
193
  summary: Generates tiny little monsters to discern users.
272
194
  test_files: []
data/.document DELETED
@@ -1,5 +0,0 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt
data/Gemfile DELETED
@@ -1,18 +0,0 @@
1
- source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
- gem "oily_png", "~> 1.1"
6
- gem "color", "~> 1.7"
7
-
8
- # Add dependencies to develop your gem here.
9
- # Include everything needed to run rake, tests, features, etc.
10
- group :development do
11
- gem "shoulda", ">= 0"
12
- gem "rdoc", "~> 3.12"
13
- gem "bundler", "~> 1.0"
14
- gem "jeweler", "~> 2.0.1"
15
- gem "simplecov", ">= 0"
16
- gem "rubocop"
17
- end
18
-
data/Gemfile.lock DELETED
@@ -1,101 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- activesupport (4.1.1)
5
- i18n (~> 0.6, >= 0.6.9)
6
- json (~> 1.7, >= 1.7.7)
7
- minitest (~> 5.1)
8
- thread_safe (~> 0.1)
9
- tzinfo (~> 1.1)
10
- addressable (2.3.6)
11
- ast (2.0.0)
12
- builder (3.2.2)
13
- chunky_png (1.3.1)
14
- color (1.7)
15
- descendants_tracker (0.0.4)
16
- thread_safe (~> 0.3, >= 0.3.1)
17
- docile (1.1.5)
18
- faraday (0.9.0)
19
- multipart-post (>= 1.2, < 3)
20
- git (1.2.7)
21
- github_api (0.11.3)
22
- addressable (~> 2.3)
23
- descendants_tracker (~> 0.0.1)
24
- faraday (~> 0.8, < 0.10)
25
- hashie (>= 1.2)
26
- multi_json (>= 1.7.5, < 2.0)
27
- nokogiri (~> 1.6.0)
28
- oauth2
29
- hashie (3.0.0)
30
- highline (1.6.21)
31
- i18n (0.6.9)
32
- jeweler (2.0.1)
33
- builder
34
- bundler (>= 1.0)
35
- git (>= 1.2.5)
36
- github_api
37
- highline (>= 1.6.15)
38
- nokogiri (>= 1.5.10)
39
- rake
40
- rdoc
41
- json (1.8.1)
42
- jwt (1.0.0)
43
- mini_portile (0.6.0)
44
- minitest (5.3.5)
45
- multi_json (1.10.1)
46
- multi_xml (0.5.5)
47
- multipart-post (2.0.0)
48
- nokogiri (1.6.2.1)
49
- mini_portile (= 0.6.0)
50
- oauth2 (0.9.4)
51
- faraday (>= 0.8, < 0.10)
52
- jwt (~> 1.0)
53
- multi_json (~> 1.3)
54
- multi_xml (~> 0.5)
55
- rack (~> 1.2)
56
- oily_png (1.1.1)
57
- chunky_png (~> 1.3.0)
58
- parser (2.1.9)
59
- ast (>= 1.1, < 3.0)
60
- slop (~> 3.4, >= 3.4.5)
61
- powerpack (0.0.9)
62
- rack (1.5.2)
63
- rainbow (2.0.0)
64
- rake (10.3.2)
65
- rdoc (3.12.2)
66
- json (~> 1.4)
67
- rubocop (0.23.0)
68
- json (>= 1.7.7, < 2)
69
- parser (~> 2.1.9)
70
- powerpack (~> 0.0.6)
71
- rainbow (>= 1.99.1, < 3.0)
72
- ruby-progressbar (~> 1.4)
73
- ruby-progressbar (1.5.1)
74
- shoulda (3.5.0)
75
- shoulda-context (~> 1.0, >= 1.0.1)
76
- shoulda-matchers (>= 1.4.1, < 3.0)
77
- shoulda-context (1.2.1)
78
- shoulda-matchers (2.6.1)
79
- activesupport (>= 3.0.0)
80
- simplecov (0.8.2)
81
- docile (~> 1.1.0)
82
- multi_json
83
- simplecov-html (~> 0.8.0)
84
- simplecov-html (0.8.0)
85
- slop (3.5.0)
86
- thread_safe (0.3.4)
87
- tzinfo (1.2.1)
88
- thread_safe (~> 0.1)
89
-
90
- PLATFORMS
91
- ruby
92
-
93
- DEPENDENCIES
94
- bundler (~> 1.0)
95
- color (~> 1.7)
96
- jeweler (~> 2.0.1)
97
- oily_png (~> 1.1)
98
- rdoc (~> 3.12)
99
- rubocop
100
- shoulda
101
- simplecov
data/Rakefile DELETED
@@ -1,51 +0,0 @@
1
- # encoding: utf-8
2
-
3
- require 'rubygems'
4
- require 'bundler'
5
- begin
6
- Bundler.setup(:default, :development)
7
- rescue Bundler::BundlerError => e
8
- $stderr.puts e.message
9
- $stderr.puts "Run `bundle install` to install missing gems"
10
- exit e.status_code
11
- end
12
- require 'rake'
13
-
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
17
- gem.name = "monsterid"
18
- gem.homepage = "http://github.com/knutaldrin/monsterid"
19
- gem.license = "CC BY 4.0"
20
- gem.summary = %Q{Generates tiny little monsters to discern users.}
21
- gem.description = %Q{Port/rework of the php script, with new monsters snatched from the WP plugin}
22
- gem.email = "knutaldrin@gmail.com"
23
- gem.authors = ["Knut Aldrin Wikström"]
24
- # dependencies defined in Gemfile
25
- end
26
- Jeweler::RubygemsDotOrgTasks.new
27
-
28
- require 'rake/testtask'
29
- Rake::TestTask.new(:test) do |test|
30
- test.libs << 'lib' << 'test'
31
- test.pattern = 'test/**/test_*.rb'
32
- test.verbose = true
33
- end
34
-
35
- desc "Code coverage detail"
36
- task :simplecov do
37
- ENV['COVERAGE'] = "true"
38
- Rake::Task['test'].execute
39
- end
40
-
41
- task :default => :test
42
-
43
- require 'rdoc/task'
44
- Rake::RDocTask.new do |rdoc|
45
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
46
-
47
- rdoc.rdoc_dir = 'rdoc'
48
- rdoc.title = "monsterid #{version}"
49
- rdoc.rdoc_files.include('README*')
50
- rdoc.rdoc_files.include('lib/**/*.rb')
51
- end
data/lib/parts/image.info DELETED
@@ -1,103 +0,0 @@
1
- image 120x120 C:\Documents_and_Settings\Scott_Sherrill-Mix\Desktop\wp_monsterid\parts\parts.xcf
2
- layer 120x120 0,0 mouth_S4.png
3
- layer 120x120 0,0 mouth_S3.png
4
- layer 120x120 0,0 mouth_S2.png
5
- layer 120x120 0,0 mouth_S1.png
6
- layer 120x120 0,0 mouth_10.png
7
- layer 120x120 0,0 mouth_S5.png
8
- layer 120x120 0,0 mouth_8.png
9
- layer 120x120 0,0 mouth_7.png
10
- layer 120x120 0,0 mouth_6.png
11
- layer 120x120 0,0 mouth_5.png
12
- layer 120x120 0,0 mouth_9.png
13
- layer 120x120 0,0 mouth_3.png
14
- layer 120x120 0,0 mouth_2.png
15
- layer 120x120 0,0 mouth_1.png
16
- layer 120x120 0,0 mouth_S7.png
17
- layer 120x120 0,0 mouth_S6.png
18
- layer 120x120 0,0 mouth_4.png
19
- layer 120x120 0,0 eyes_S3.png
20
- layer 120x120 0,0 eyes_S2.png
21
- layer 120x120 0,0 eyes_S1.png
22
- layer 120x120 0,0 eyes_15.png
23
- layer 120x120 0,0 eyes_14.png
24
- layer 120x120 0,0 eyes_13.png
25
- layer 120x120 0,0 eyes_12.png
26
- layer 120x120 0,0 eyes_11.png
27
- layer 120x120 0,0 eyes_10.png
28
- layer 120x120 0,0 eyes_9.png
29
- layer 120x120 0,0 eyes_8.png
30
- layer 120x120 0,0 eyes_7.png
31
- layer 120x120 0,0 eyes_6.png
32
- layer 120x120 0,0 eyes_5.png
33
- layer 120x120 0,0 eyes_4.png
34
- layer 120x120 0,0 eyes_3.png
35
- layer 120x120 0,0 eyes_2.png
36
- layer 120x120 0,0 eyes_1.png
37
- layer 120x120 0,0 eyes_S5.png
38
- layer 120x120 0,0 eyes_S4.png
39
- layer 120x120 0,0 body_S2.png
40
- layer 120x120 0,0 body_S1.png
41
- layer 120x120 0,0 body_15.png
42
- layer 120x120 0,0 body_14.png
43
- layer 120x120 0,0 body_13.png
44
- layer 120x120 0,0 body_12.png
45
- layer 120x120 0,0 body_11.png
46
- layer 120x120 0,0 body_10.png
47
- layer 120x120 0,0 body_9.png
48
- layer 120x120 0,0 body_8.png
49
- layer 120x120 0,0 body_7.png
50
- layer 120x120 0,0 body_6.png
51
- layer 120x120 0,0 body_5.png
52
- layer 120x120 0,0 body_4.png
53
- layer 120x120 0,0 body_3.png
54
- layer 120x120 0,0 body_2.png
55
- layer 120x120 0,0 body_1.png
56
- layer 120x120 0,0 body_S5.png
57
- layer 120x120 0,0 body_S4.png
58
- layer 120x120 0,0 body_S3.png
59
- layer 120x120 0,0 arms_S8.png
60
- layer 120x120 0,0 arms_S7.png
61
- layer 120x120 0,0 arms_S6.png
62
- layer 120x120 0,0 arms_S5.png
63
- layer 120x120 0,0 arms_S4.png
64
- layer 120x120 0,0 arms_S3.png
65
- layer 120x120 0,0 arms_S2.png
66
- layer 120x120 0,0 arms_S1.png
67
- layer 120x120 0,0 arms_5.png
68
- layer 120x120 0,0 arms_4.png
69
- layer 120x120 0,0 arms_3.png
70
- layer 120x120 0,0 arms_2.png
71
- layer 120x120 0,0 arms_1.png
72
- layer 120x120 0,0 arms_S9.png
73
- layer 120x120 0,0 hair_5.png
74
- layer 120x120 0,0 hair_4.png
75
- layer 120x120 0,0 hair_3.png
76
- layer 120x120 0,0 hair_2.png
77
- layer 120x120 0,0 hair_1.png
78
- layer 120x120 0,0 hair_S7.png
79
- layer 120x120 0,0 hair_S6.png
80
- layer 120x120 0,0 hair_S5.png
81
- layer 120x120 0,0 hair_S4.png
82
- layer 120x120 0,0 hair_S3.png
83
- layer 120x120 0,0 hair_S2.png
84
- layer 120x120 0,0 hair_S1.png
85
- layer 120x120 0,0 legs_S1.png
86
- layer 120x120 0,0 legs_5.png
87
- layer 120x120 0,0 legs_4.png
88
- layer 120x120 0,0 legs_3.png
89
- layer 120x120 0,0 legs_2.png
90
- layer 120x120 0,0 legs_1.png
91
- layer 120x120 0,0 legs_S13.png
92
- layer 120x120 0,0 legs_S12.png
93
- layer 120x120 0,0 legs_S11.png
94
- layer 120x120 0,0 legs_S10.png
95
- layer 120x120 0,0 legs_S9.png
96
- layer 120x120 0,0 legs_S8.png
97
- layer 120x120 0,0 legs_S7.png
98
- layer 120x120 0,0 legs_S6.png
99
- layer 120x120 0,0 legs_S5.png
100
- layer 120x120 0,0 legs_S4.png
101
- layer 120x120 0,0 legs_S3.png
102
- layer 120x120 0,0 legs_S2.png
103
- layer 120x120 0,0 Background
Binary file
data/monsterid.gemspec DELETED
@@ -1,175 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
- # stub: monsterid 0.1.0 ruby lib
6
-
7
- Gem::Specification.new do |s|
8
- s.name = "monsterid"
9
- s.version = "0.1.0"
10
-
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
- s.require_paths = ["lib"]
13
- s.authors = ["Knut Aldrin Wikstro\u{308}m"]
14
- s.date = "2014-06-19"
15
- s.description = "Port/rework of the php script, with new monsters snatched from the WP plugin"
16
- s.email = "knutaldrin@gmail.com"
17
- s.extra_rdoc_files = [
18
- "LICENSE",
19
- "README.md"
20
- ]
21
- s.files = [
22
- ".document",
23
- "Gemfile",
24
- "Gemfile.lock",
25
- "LICENSE",
26
- "README.md",
27
- "Rakefile",
28
- "VERSION",
29
- "lib/monsterid.rb",
30
- "lib/parts/arms_1.png",
31
- "lib/parts/arms_2.png",
32
- "lib/parts/arms_3.png",
33
- "lib/parts/arms_4.png",
34
- "lib/parts/arms_5.png",
35
- "lib/parts/arms_S1.png",
36
- "lib/parts/arms_S2.png",
37
- "lib/parts/arms_S3.png",
38
- "lib/parts/arms_S4.png",
39
- "lib/parts/arms_S5.png",
40
- "lib/parts/arms_S6.png",
41
- "lib/parts/arms_S7.png",
42
- "lib/parts/arms_S8.png",
43
- "lib/parts/arms_S9.png",
44
- "lib/parts/back.png",
45
- "lib/parts/body_1.png",
46
- "lib/parts/body_10.png",
47
- "lib/parts/body_11.png",
48
- "lib/parts/body_12.png",
49
- "lib/parts/body_13.png",
50
- "lib/parts/body_14.png",
51
- "lib/parts/body_15.png",
52
- "lib/parts/body_2.png",
53
- "lib/parts/body_3.png",
54
- "lib/parts/body_4.png",
55
- "lib/parts/body_5.png",
56
- "lib/parts/body_6.png",
57
- "lib/parts/body_7.png",
58
- "lib/parts/body_8.png",
59
- "lib/parts/body_9.png",
60
- "lib/parts/body_S1.png",
61
- "lib/parts/body_S2.png",
62
- "lib/parts/body_S3.png",
63
- "lib/parts/body_S4.png",
64
- "lib/parts/body_S5.png",
65
- "lib/parts/eyes_1.png",
66
- "lib/parts/eyes_10.png",
67
- "lib/parts/eyes_11.png",
68
- "lib/parts/eyes_12.png",
69
- "lib/parts/eyes_13.png",
70
- "lib/parts/eyes_14.png",
71
- "lib/parts/eyes_15.png",
72
- "lib/parts/eyes_2.png",
73
- "lib/parts/eyes_3.png",
74
- "lib/parts/eyes_4.png",
75
- "lib/parts/eyes_5.png",
76
- "lib/parts/eyes_6.png",
77
- "lib/parts/eyes_7.png",
78
- "lib/parts/eyes_8.png",
79
- "lib/parts/eyes_9.png",
80
- "lib/parts/eyes_S1.png",
81
- "lib/parts/eyes_S2.png",
82
- "lib/parts/eyes_S3.png",
83
- "lib/parts/eyes_S4.png",
84
- "lib/parts/eyes_S5.png",
85
- "lib/parts/hair_1.png",
86
- "lib/parts/hair_2.png",
87
- "lib/parts/hair_3.png",
88
- "lib/parts/hair_4.png",
89
- "lib/parts/hair_5.png",
90
- "lib/parts/hair_S1.png",
91
- "lib/parts/hair_S2.png",
92
- "lib/parts/hair_S3.png",
93
- "lib/parts/hair_S4.png",
94
- "lib/parts/hair_S5.png",
95
- "lib/parts/hair_S6.png",
96
- "lib/parts/hair_S7.png",
97
- "lib/parts/image.info",
98
- "lib/parts/legs_1.png",
99
- "lib/parts/legs_2.png",
100
- "lib/parts/legs_3.png",
101
- "lib/parts/legs_4.png",
102
- "lib/parts/legs_5.png",
103
- "lib/parts/legs_S1.png",
104
- "lib/parts/legs_S10.png",
105
- "lib/parts/legs_S11.png",
106
- "lib/parts/legs_S12.png",
107
- "lib/parts/legs_S13.png",
108
- "lib/parts/legs_S2.png",
109
- "lib/parts/legs_S3.png",
110
- "lib/parts/legs_S4.png",
111
- "lib/parts/legs_S5.png",
112
- "lib/parts/legs_S6.png",
113
- "lib/parts/legs_S7.png",
114
- "lib/parts/legs_S8.png",
115
- "lib/parts/legs_S9.png",
116
- "lib/parts/monsterparts.xcf",
117
- "lib/parts/mouth_1.png",
118
- "lib/parts/mouth_10.png",
119
- "lib/parts/mouth_2.png",
120
- "lib/parts/mouth_3.png",
121
- "lib/parts/mouth_4.png",
122
- "lib/parts/mouth_5.png",
123
- "lib/parts/mouth_6.png",
124
- "lib/parts/mouth_7.png",
125
- "lib/parts/mouth_8.png",
126
- "lib/parts/mouth_9.png",
127
- "lib/parts/mouth_S1.png",
128
- "lib/parts/mouth_S2.png",
129
- "lib/parts/mouth_S3.png",
130
- "lib/parts/mouth_S4.png",
131
- "lib/parts/mouth_S5.png",
132
- "lib/parts/mouth_S6.png",
133
- "lib/parts/mouth_S7.png",
134
- "monsterid.gemspec",
135
- "test/helper.rb"
136
- ]
137
- s.homepage = "http://github.com/knutaldrin/monsterid"
138
- s.licenses = ["CC BY 4.0"]
139
- s.rubygems_version = "2.3.0"
140
- s.summary = "Generates tiny little monsters to discern users."
141
-
142
- if s.respond_to? :specification_version then
143
- s.specification_version = 4
144
-
145
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
146
- s.add_runtime_dependency(%q<oily_png>, ["~> 1.1"])
147
- s.add_runtime_dependency(%q<color>, ["~> 1.7"])
148
- s.add_development_dependency(%q<shoulda>, [">= 0"])
149
- s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
150
- s.add_development_dependency(%q<bundler>, ["~> 1.0"])
151
- s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
152
- s.add_development_dependency(%q<simplecov>, [">= 0"])
153
- s.add_development_dependency(%q<rubocop>, [">= 0"])
154
- else
155
- s.add_dependency(%q<oily_png>, ["~> 1.1"])
156
- s.add_dependency(%q<color>, ["~> 1.7"])
157
- s.add_dependency(%q<shoulda>, [">= 0"])
158
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
159
- s.add_dependency(%q<bundler>, ["~> 1.0"])
160
- s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
161
- s.add_dependency(%q<simplecov>, [">= 0"])
162
- s.add_dependency(%q<rubocop>, [">= 0"])
163
- end
164
- else
165
- s.add_dependency(%q<oily_png>, ["~> 1.1"])
166
- s.add_dependency(%q<color>, ["~> 1.7"])
167
- s.add_dependency(%q<shoulda>, [">= 0"])
168
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
169
- s.add_dependency(%q<bundler>, ["~> 1.0"])
170
- s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
171
- s.add_dependency(%q<simplecov>, [">= 0"])
172
- s.add_dependency(%q<rubocop>, [">= 0"])
173
- end
174
- end
175
-
data/test/helper.rb DELETED
@@ -1,34 +0,0 @@
1
- require 'simplecov'
2
-
3
- module SimpleCov::Configuration
4
- def clean_filters
5
- @filters = []
6
- end
7
- end
8
-
9
- SimpleCov.configure do
10
- clean_filters
11
- load_adapter 'test_frameworks'
12
- end
13
-
14
- ENV["COVERAGE"] && SimpleCov.start do
15
- add_filter "/.rvm/"
16
- end
17
- require 'rubygems'
18
- require 'bundler'
19
- begin
20
- Bundler.setup(:default, :development)
21
- rescue Bundler::BundlerError => e
22
- $stderr.puts e.message
23
- $stderr.puts "Run `bundle install` to install missing gems"
24
- exit e.status_code
25
- end
26
- require 'test/unit'
27
- require 'shoulda'
28
-
29
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
30
- $LOAD_PATH.unshift(File.dirname(__FILE__))
31
- require 'monsterid'
32
-
33
- class Test::Unit::TestCase
34
- end