game_icons 0.24.0.20151111 → 0.25.0.20151202
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +16 -16
- data/Gemfile +4 -4
- data/LICENSE.txt +22 -22
- data/game_icons.gemspec +1 -1
- data/lib/game_icons.rb +14 -14
- data/lib/game_icons/tasks/sanity_test.rb +25 -25
- data/lib/game_icons/tasks/update.rb +30 -30
- data/lib/game_icons/version.rb +1 -1
- data/resources/UPDATING.md +6 -6
- data/resources/icons/license.txt +1 -0
- data/spec/regression_spec.rb +1 -1
- metadata +27 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac898c4f2d0599d318b670418bf115a48d8f9a98
|
4
|
+
data.tar.gz: 2c8aefc992ebc41d8bb14044b7485d17f48e3572
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3e042a35b7528afdde9a315f4d0b2993a28da36495288e1249cc2a7d23d81c9ee17271fbb2afa6920beed33e13dc18088ed74b9586f9821ad15e416bca10dc3
|
7
|
+
data.tar.gz: e9cad35b9afd50247dcc33c2715b33e0073cfa64b2ea3307d0a2c1ed6d19845a9c7ba95834c5a13ee379dfe09950008eee4add69d27c4f2a3e35942faa24b519
|
data/.gitignore
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
/.bundle/
|
2
|
-
/.yardoc
|
3
|
-
/Gemfile.lock
|
4
|
-
/_yardoc/
|
5
|
-
/coverage/
|
6
|
-
/doc/
|
7
|
-
/pkg/
|
8
|
-
/spec/reports/
|
9
|
-
/tmp/
|
10
|
-
*.bundle
|
11
|
-
*.so
|
12
|
-
*.o
|
13
|
-
*.a
|
14
|
-
mkmf.log
|
15
|
-
.DS_Store
|
16
|
-
sanity_test.png
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/Gemfile.lock
|
4
|
+
/_yardoc/
|
5
|
+
/coverage/
|
6
|
+
/doc/
|
7
|
+
/pkg/
|
8
|
+
/spec/reports/
|
9
|
+
/tmp/
|
10
|
+
*.bundle
|
11
|
+
*.so
|
12
|
+
*.o
|
13
|
+
*.a
|
14
|
+
mkmf.log
|
15
|
+
.DS_Store
|
16
|
+
sanity_test.png
|
17
17
|
game-icons.net.svg.zip
|
data/Gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in game_icons.gemspec
|
4
|
-
gemspec
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in game_icons.gemspec
|
4
|
+
gemspec
|
data/LICENSE.txt
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
Copyright (c) 2015 Andy Meneely
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1
|
+
Copyright (c) 2015 Andy Meneely
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/game_icons.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_development_dependency "rake"
|
27
27
|
spec.add_development_dependency 'rspec', '~> 3.2'
|
28
28
|
spec.add_development_dependency 'coveralls'
|
29
|
-
spec.add_development_dependency 'nokogiri'
|
29
|
+
spec.add_development_dependency 'nokogiri', '~> 1.6.7'
|
30
30
|
spec.add_development_dependency 'cairo'
|
31
31
|
spec.add_development_dependency 'pango'
|
32
32
|
spec.add_development_dependency 'rsvg2'
|
data/lib/game_icons.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
require "game_icons/version"
|
2
|
-
require 'game_icons/finder'
|
3
|
-
require 'game_icons/db'
|
4
|
-
require 'game_icons/optional_deps'
|
5
|
-
|
6
|
-
module GameIcons
|
7
|
-
def self.get(name)
|
8
|
-
Finder.new.find(name)
|
9
|
-
end
|
10
|
-
|
11
|
-
def self.names
|
12
|
-
DB.names
|
13
|
-
end
|
14
|
-
end
|
1
|
+
require "game_icons/version"
|
2
|
+
require 'game_icons/finder'
|
3
|
+
require 'game_icons/db'
|
4
|
+
require 'game_icons/optional_deps'
|
5
|
+
|
6
|
+
module GameIcons
|
7
|
+
def self.get(name)
|
8
|
+
Finder.new.find(name)
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.names
|
12
|
+
DB.names
|
13
|
+
end
|
14
|
+
end
|
@@ -1,26 +1,26 @@
|
|
1
|
-
require 'game_icons'
|
2
|
-
require 'cairo'
|
3
|
-
require 'pango'
|
4
|
-
require 'rsvg2'
|
5
|
-
|
6
|
-
module GameIcons
|
7
|
-
class SanityTest
|
8
|
-
def self.run(size: 100)
|
9
|
-
num = GameIcons.names.count
|
10
|
-
cc = Cairo::Context.new(Cairo::ImageSurface.new(1200, ((num / 12) + 1) * size))
|
11
|
-
scale = size / 512.0
|
12
|
-
cc.scale(size / 512.0, size / 512.0)
|
13
|
-
GameIcons.names.each_with_index do |icon, i|
|
14
|
-
icon = GameIcons.get(icon).recolor(fg: '#CBB08B', bg: '#5F443A')
|
15
|
-
svg = RSVG::Handle.new_from_data(icon.string)
|
16
|
-
x = (i % 12) * size / scale
|
17
|
-
y = (i / 12) * size / scale
|
18
|
-
cc.translate(x, y)
|
19
|
-
cc.render_rsvg_handle(svg)
|
20
|
-
cc.translate(-x, -y)
|
21
|
-
end
|
22
|
-
cc.target.write_to_png('sanity_test.png')
|
23
|
-
puts "Done!"
|
24
|
-
end
|
25
|
-
end
|
1
|
+
require 'game_icons'
|
2
|
+
require 'cairo'
|
3
|
+
require 'pango'
|
4
|
+
require 'rsvg2'
|
5
|
+
|
6
|
+
module GameIcons
|
7
|
+
class SanityTest
|
8
|
+
def self.run(size: 100)
|
9
|
+
num = GameIcons.names.count
|
10
|
+
cc = Cairo::Context.new(Cairo::ImageSurface.new(1200, ((num / 12) + 1) * size))
|
11
|
+
scale = size / 512.0
|
12
|
+
cc.scale(size / 512.0, size / 512.0)
|
13
|
+
GameIcons.names.each_with_index do |icon, i|
|
14
|
+
icon = GameIcons.get(icon).recolor(fg: '#CBB08B', bg: '#5F443A')
|
15
|
+
svg = RSVG::Handle.new_from_data(icon.string)
|
16
|
+
x = (i % 12) * size / scale
|
17
|
+
y = (i / 12) * size / scale
|
18
|
+
cc.translate(x, y)
|
19
|
+
cc.render_rsvg_handle(svg)
|
20
|
+
cc.translate(-x, -y)
|
21
|
+
end
|
22
|
+
cc.target.write_to_png('sanity_test.png')
|
23
|
+
puts "Done!"
|
24
|
+
end
|
25
|
+
end
|
26
26
|
end
|
@@ -1,31 +1,31 @@
|
|
1
|
-
require 'game_icons'
|
2
|
-
require 'open-uri'
|
3
|
-
|
4
|
-
module GameIcons
|
5
|
-
class Update
|
6
|
-
@@URL = 'http://game-icons.net/archives/svg/zip/ffffff/000000/game-icons.net.svg.zip'
|
7
|
-
@@TMP_ZIP = 'game-icons.net.svg.zip'
|
8
|
-
|
9
|
-
def self.run
|
10
|
-
puts "Downloading..."
|
11
|
-
download
|
12
|
-
puts "Unzipping..."
|
13
|
-
unzip
|
14
|
-
puts "Done."
|
15
|
-
end
|
16
|
-
|
17
|
-
private
|
18
|
-
def self.download
|
19
|
-
File.open("resources/#{@@TMP_ZIP}", 'wb+') do |save_file|
|
20
|
-
open(@@URL, 'rb') { |read_file| save_file.write(read_file.read) }
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def self.unzip
|
25
|
-
Dir.chdir('./resources/') do
|
26
|
-
`unzip -o game-icons.net.svg.zip`
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
end
|
1
|
+
require 'game_icons'
|
2
|
+
require 'open-uri'
|
3
|
+
|
4
|
+
module GameIcons
|
5
|
+
class Update
|
6
|
+
@@URL = 'http://game-icons.net/archives/svg/zip/ffffff/000000/game-icons.net.svg.zip'
|
7
|
+
@@TMP_ZIP = 'game-icons.net.svg.zip'
|
8
|
+
|
9
|
+
def self.run
|
10
|
+
puts "Downloading..."
|
11
|
+
download
|
12
|
+
puts "Unzipping..."
|
13
|
+
unzip
|
14
|
+
puts "Done."
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
def self.download
|
19
|
+
File.open("resources/#{@@TMP_ZIP}", 'wb+') do |save_file|
|
20
|
+
open(@@URL, 'rb') { |read_file| save_file.write(read_file.read) }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.unzip
|
25
|
+
Dir.chdir('./resources/') do
|
26
|
+
`unzip -o game-icons.net.svg.zip`
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
31
|
end
|
data/lib/game_icons/version.rb
CHANGED
@@ -3,5 +3,5 @@ module GameIcons
|
|
3
3
|
# e.g. "0.1.0.20150413.alpha" will eventually become "0.1.0.20150413"
|
4
4
|
# Uses semantic versioning: http://semver.org/
|
5
5
|
# The date after the semver numbers is the build date from game-icons.net
|
6
|
-
VERSION = '0.
|
6
|
+
VERSION = '0.25.0.20151202'
|
7
7
|
end
|
data/resources/UPDATING.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# Updating icons
|
2
|
-
|
3
|
-
When a new update to game-icons.net comes out, this directory can be updated by:
|
4
|
-
|
5
|
-
1. Download the SVG zip file, white-on-black.
|
6
|
-
2. Extract into here, preferably with the same directory structure so individual files can be tracked.
|
1
|
+
# Updating icons
|
2
|
+
|
3
|
+
When a new update to game-icons.net comes out, this directory can be updated by:
|
4
|
+
|
5
|
+
1. Download the SVG zip file, white-on-black.
|
6
|
+
2. Extract into here, preferably with the same directory structure so individual files can be tracked.
|
data/resources/icons/license.txt
CHANGED
@@ -14,6 +14,7 @@ Each subfolders in this archive correspond to a different contributor :
|
|
14
14
|
- Viscious Speed, http://viscious-speed.deviantart.com
|
15
15
|
- Lord Berandas, http://berandas.deviantart.com
|
16
16
|
- Irongamer, http://ecesisllc.wix.com/home
|
17
|
+
- HeavenlyDog, http://www.gnomosygoblins.blogspot.com
|
17
18
|
|
18
19
|
Please, include a mention "Icons made by {author}" in your derivative work.
|
19
20
|
|
data/spec/regression_spec.rb
CHANGED
@@ -4,7 +4,7 @@ require 'game_icons'
|
|
4
4
|
# These are tests that will change with each release, but might find brokenness as we go.
|
5
5
|
|
6
6
|
describe GameIcons do
|
7
|
-
it('has the expected number of icons') { expect(GameIcons.names.count).to eq(
|
7
|
+
it('has the expected number of icons') { expect(GameIcons.names.count).to eq(2011) }
|
8
8
|
|
9
9
|
it 'loads known svg data' do
|
10
10
|
exp = <<-EOSVG
|
metadata
CHANGED
@@ -1,139 +1,139 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: game_icons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.25.0.20151202
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Meneely
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-04 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
19
|
version: '1.7'
|
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
26
|
version: '1.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.2'
|
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
54
|
version: '3.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: coveralls
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: nokogiri
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 1.6.7
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 1.6.7
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: cairo
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: pango
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rsvg2
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: launchy
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
description: Access and manipulate the scalable, free icons of game-icons.net
|
@@ -143,8 +143,8 @@ executables: []
|
|
143
143
|
extensions: []
|
144
144
|
extra_rdoc_files: []
|
145
145
|
files:
|
146
|
-
- .gitignore
|
147
|
-
- .travis.yml
|
146
|
+
- ".gitignore"
|
147
|
+
- ".travis.yml"
|
148
148
|
- CHANGELOG.md
|
149
149
|
- Gemfile
|
150
150
|
- LICENSE.txt
|
@@ -2197,17 +2197,17 @@ require_paths:
|
|
2197
2197
|
- lib
|
2198
2198
|
required_ruby_version: !ruby/object:Gem::Requirement
|
2199
2199
|
requirements:
|
2200
|
-
- -
|
2200
|
+
- - ">="
|
2201
2201
|
- !ruby/object:Gem::Version
|
2202
2202
|
version: 2.0.0
|
2203
2203
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2204
2204
|
requirements:
|
2205
|
-
- -
|
2205
|
+
- - ">="
|
2206
2206
|
- !ruby/object:Gem::Version
|
2207
2207
|
version: '0'
|
2208
2208
|
requirements: []
|
2209
2209
|
rubyforge_project:
|
2210
|
-
rubygems_version: 2.4.
|
2210
|
+
rubygems_version: 2.4.6
|
2211
2211
|
signing_key:
|
2212
2212
|
specification_version: 2
|
2213
2213
|
summary: Icons from game-icons.net
|
@@ -2220,4 +2220,3 @@ test_files:
|
|
2220
2220
|
- spec/optional_deps_spec.rb
|
2221
2221
|
- spec/regression_spec.rb
|
2222
2222
|
- spec/spec_helper.rb
|
2223
|
-
has_rdoc:
|