game_icons 0.4.0.20150521 → 0.5.0.20150601
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 +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +4 -0
- data/RELEASE TODO.md +0 -1
- data/Rakefile +20 -13
- data/game_icons.gemspec +35 -34
- data/lib/game_icons/tasks/sanity_test.rb +26 -0
- data/lib/game_icons/tasks/update.rb +31 -0
- data/lib/game_icons/version.rb +7 -7
- data/resources/icons/delapouite/originals/svg/castle.svg +1 -0
- data/resources/icons/delapouite/originals/svg/crucifix.svg +1 -0
- data/resources/icons/delapouite/originals/svg/graduate-cap.svg +1 -0
- data/resources/icons/delapouite/originals/svg/kimono.svg +1 -0
- data/resources/icons/delapouite/originals/svg/log.svg +1 -0
- data/resources/icons/delapouite/originals/svg/roman-shield.svg +1 -0
- data/resources/icons/delapouite/originals/svg/watch.svg +1 -0
- data/resources/icons/lorc/originals/svg/celebration-fire.svg +1 -0
- data/resources/icons/lorc/originals/svg/energy-breath.svg +1 -0
- data/resources/icons/lorc/originals/svg/swan-breeze.svg +1 -0
- data/spec/regression_spec.rb +1 -1
- metadata +29 -4
- data/lib/game_icons/sanity_test.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 918321b1fb9d7eb8491a3b6998791822350ad01a
|
4
|
+
data.tar.gz: 04a9454bb36473abc8716ea69b627996a991d90a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 724e81948cb2737f372c000f2b349304a169f1d73322ad47e25d690e44c5e48e9437d419222f9a13e48cd361539ac8c9aeff36bd436370a860d141a1bdaae6f4
|
7
|
+
data.tar.gz: 02ea0dcecba78a1186267a2d6063f965d6344c431d721717dbbae8a6886c6caeb13b683d1582f938cd7f246dfd303ef4bbddad9cf724d801bb0f8a6b5f4c58b1
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ This gem follows [semantic versioning](http://semver.org), with the date of the
|
|
4
4
|
|
5
5
|
e.g. "0.1.0.20150413.alpha" has the April 13, 2015 release of game-icons.net
|
6
6
|
|
7
|
+
## v0.5.0 / 2015-06-01
|
8
|
+
* Updated for June 1 icons
|
9
|
+
* Refactored the tests, started `rake update`
|
10
|
+
|
7
11
|
## v0.4.0 / 2015-05-21
|
8
12
|
* Updated for May 21 icons
|
9
13
|
|
data/RELEASE TODO.md
CHANGED
data/Rakefile
CHANGED
@@ -1,13 +1,20 @@
|
|
1
|
-
require "bundler/gem_tasks"
|
2
|
-
require 'rspec/core/rake_task'
|
3
|
-
require 'launchy'
|
4
|
-
|
5
|
-
task default: [:install, :spec]
|
6
|
-
|
7
|
-
RSpec::Core::RakeTask.new(:spec)
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
require 'launchy'
|
4
|
+
|
5
|
+
task default: [:install, :spec]
|
6
|
+
|
7
|
+
RSpec::Core::RakeTask.new(:spec)
|
8
|
+
|
9
|
+
desc 'Stitch and recolor every icon into a giant sheet'
|
10
|
+
task :sanity => :install do
|
11
|
+
require 'game_icons/tasks/sanity_test'
|
12
|
+
GameIcons::SanityTest.run
|
13
|
+
Launchy.open("file:///" + File.expand_path('./sanity_test.png', File.dirname(__FILE__)))
|
14
|
+
end
|
15
|
+
|
16
|
+
desc 'Download and unzip the latest icons'
|
17
|
+
task :update do
|
18
|
+
require 'game_icons/tasks/update'
|
19
|
+
GameIcons::Update.run
|
20
|
+
end
|
data/game_icons.gemspec
CHANGED
@@ -1,34 +1,35 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'game_icons/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.specification_version = 2 if spec.respond_to? :specification_version=
|
8
|
-
spec.required_rubygems_version = Gem::Requirement.new('>= 0') if spec.respond_to? :required_rubygems_version=
|
9
|
-
spec.required_ruby_version = '>= 2.0.0'
|
10
|
-
|
11
|
-
spec.name = "game_icons"
|
12
|
-
spec.version = GameIcons::VERSION
|
13
|
-
spec.authors = ["Andy Meneely"]
|
14
|
-
spec.email = ["andy.meneely@gmail.com"]
|
15
|
-
spec.summary = %q{Icons from game-icons.net}
|
16
|
-
spec.description = %q{Access and manipulate the scalable, free icons of game-icons.net}
|
17
|
-
spec.homepage = "https://github.com/andymeneely/squib"
|
18
|
-
spec.license = "MIT"
|
19
|
-
|
20
|
-
spec.files = `git ls-files -z`.split("\x0")
|
21
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
22
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
23
|
-
spec.require_paths = ["lib"]
|
24
|
-
|
25
|
-
spec.add_development_dependency "bundler", "~> 1.7"
|
26
|
-
spec.add_development_dependency "rake"
|
27
|
-
spec.add_development_dependency 'rspec', '~> 3.2'
|
28
|
-
spec.add_development_dependency 'coveralls'
|
29
|
-
spec.add_development_dependency 'nokogiri'
|
30
|
-
spec.add_development_dependency 'cairo'
|
31
|
-
spec.add_development_dependency 'pango'
|
32
|
-
spec.add_development_dependency 'rsvg2'
|
33
|
-
spec.add_development_dependency 'launchy'
|
34
|
-
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'game_icons/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.specification_version = 2 if spec.respond_to? :specification_version=
|
8
|
+
spec.required_rubygems_version = Gem::Requirement.new('>= 0') if spec.respond_to? :required_rubygems_version=
|
9
|
+
spec.required_ruby_version = '>= 2.0.0'
|
10
|
+
|
11
|
+
spec.name = "game_icons"
|
12
|
+
spec.version = GameIcons::VERSION
|
13
|
+
spec.authors = ["Andy Meneely"]
|
14
|
+
spec.email = ["andy.meneely@gmail.com"]
|
15
|
+
spec.summary = %q{Icons from game-icons.net}
|
16
|
+
spec.description = %q{Access and manipulate the scalable, free icons of game-icons.net}
|
17
|
+
spec.homepage = "https://github.com/andymeneely/squib"
|
18
|
+
spec.license = "MIT"
|
19
|
+
|
20
|
+
spec.files = `git ls-files -z`.split("\x0")
|
21
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
22
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
26
|
+
spec.add_development_dependency "rake"
|
27
|
+
spec.add_development_dependency 'rspec', '~> 3.2'
|
28
|
+
spec.add_development_dependency 'coveralls'
|
29
|
+
spec.add_development_dependency 'nokogiri'
|
30
|
+
spec.add_development_dependency 'cairo'
|
31
|
+
spec.add_development_dependency 'pango'
|
32
|
+
spec.add_development_dependency 'rsvg2'
|
33
|
+
spec.add_development_dependency 'launchy'
|
34
|
+
spec.add_development_dependency 'rubyzip'
|
35
|
+
end
|
@@ -0,0 +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
|
26
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'game_icons'
|
2
|
+
require 'open-uri'
|
3
|
+
require 'zip'
|
4
|
+
|
5
|
+
module GameIcons
|
6
|
+
class Update
|
7
|
+
@@URL = 'http://game-icons.net/archives/svg/zip/ffffff/000000/game-icons.net.svg.zip'
|
8
|
+
@@TMP_ZIP = 'game-icons.net.svg.zip'
|
9
|
+
|
10
|
+
def self.run
|
11
|
+
puts "Downloading..."
|
12
|
+
download
|
13
|
+
puts "Unzipping won't work because rubyzip is dumb..."
|
14
|
+
# unzip
|
15
|
+
puts "Done."
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
def self.download
|
20
|
+
File.open(@@TMP_ZIP, 'w+') do |save_file|
|
21
|
+
open(@@URL, 'rb') { |read_file| save_file.write(read_file.read) }
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
# def self.unzip
|
26
|
+
# zf = Zip::File.open('game-icons.net.svg.zip') # FAIL!!
|
27
|
+
# # puts zf.get_next_entry
|
28
|
+
# end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
data/lib/game_icons/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
module GameIcons
|
2
|
-
# The next version of the GameIcons gem to be released
|
3
|
-
# e.g. "0.1.0.20150413.alpha" will eventually become "0.1.0.20150413"
|
4
|
-
# Uses semantic versioning: http://semver.org/
|
5
|
-
# The date after the semver numbers is the build date take from game-icons.net
|
6
|
-
VERSION = "0.
|
7
|
-
end
|
1
|
+
module GameIcons
|
2
|
+
# The next version of the GameIcons gem to be released
|
3
|
+
# e.g. "0.1.0.20150413.alpha" will eventually become "0.1.0.20150413"
|
4
|
+
# Uses semantic versioning: http://semver.org/
|
5
|
+
# The date after the semver numbers is the build date take from game-icons.net
|
6
|
+
VERSION = "0.5.0.20150601"
|
7
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z"/><path fill="#fff" d="M255.95 27.11l-75.348 80.506 150.7 1.168-75.35-81.674zM25 102.89v67.996l19.527 26.004h71.06L135 170.9v-68.01h-14v23h-18v-23H89v23H71v-23H57v23H39v-23H25zm352 7.007v68l19.527 26h71.06L487 177.907v-68.01h-14v15.993h-18v-15.993h-14v15.993h-18v-15.993h-14v15.993h-18v-15.993h-14zm-176 15.877V260.89h110V126.628l-110-.854zm55 20.116c8 0 16 4 16 12v32h-32v-32c0-8 8-12 16-12zm-215 69v270h78v-270H41zm352 7.007V484.89h78V221.897h-78zM56 241.89c4 0 8 4 8 12v32H48v-32c0-8 4-12 8-12zm400 0c4 0 8 4 8 12v32h-16v-32c0-8 4-12 8-12zm-303 37v23h-16v183h87v-55c0-24 16-36 32-36s32 12 32 36v55h87v-183h-16v-23h-14v23h-18v-23h-14v23h-18v-23h-14v23h-18v-23h-14v23h-18v-23h-14v23h-18v-23h-14v23h-18v-23h-14zm-49 38.83c4 0 8 4 8 12v32H96v-32c0-8 4-12 8-12zm72 4.17c8 0 16 4 16 12v32h-32v-32c0-8 8-12 16-12zm80 0c8 0 16 4 16 12v32h-32v-32c0-8 8-12 16-12zm80 0c8 0 16 4 16 12v32h-32v-32c0-8 8-12 16-12zm72 0c4 0 8 4 8 12v32h-16v-32c0-8 4-12 8-12zm-352 64c4 0 8 4 8 12v32H48v-32c0-8 4-12 8-12zm400 0c4 0 8 4 8 12v32h-16v-32c0-8 4-12 8-12z"/></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z"/><path fill="#fff" d="M369.842 28.045l-56.086 69.44 33.695 21.06 55.35-68.527-32.958-21.973zm-175.2 16.22l-22.013 33.014 240.73 150.456 22.01-33.015-73.247-45.78L407 92.843v-20.52l-46 53.653v22.26L194.64 44.265zM169 96.237v26.774l67.117 41.947 14.37-17.792L169 96.238zm96.863 60.54L45.2 429.983l32.958 21.973L299.56 177.838l-33.697-21.06zm56.29 35.18v26.774L407 271.762v-26.774l-84.848-53.03zM304 204.614L88.848 470.38v18.462L304 224v-19.387zm135 17.112l-14 21v15.55l14-21v-15.55zM41 448.815V475.1l30 19.375v-25.66l-30-20z"/></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z"/><path fill="#fff" d="M256 89.61L22.486 177.18 256 293.937l111.22-55.61-104.337-31.9A16 16 0 0 1 256 208a16 16 0 0 1-16-16 16 16 0 0 1 16-16l-2.646 8.602 18.537 5.703a16 16 0 0 1 .008.056l27.354 8.365L455 246.645v12.146a16 16 0 0 0-7 13.21 16 16 0 0 0 7.293 13.406C448.01 312.932 448 375.383 448 400c16 10.395 16 10.775 32 0 0-24.614-.008-87.053-7.29-114.584A16 16 0 0 0 480 272a16 16 0 0 0-7-13.227v-25.42L413.676 215.1l75.838-37.92L256 89.61zM119.623 249L106.5 327.74c26.175 3.423 57.486 18.637 86.27 36.627 16.37 10.232 31.703 21.463 44.156 32.36 7.612 6.66 13.977 13.05 19.074 19.337 5.097-6.288 11.462-12.677 19.074-19.337 12.453-10.897 27.785-22.128 44.156-32.36 28.784-17.99 60.095-33.204 86.27-36.627L392.375 249h-6.25L256 314.063 125.873 249h-6.25z"/></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z"/><path fill="#fff" d="M192 24l-9.617 9.617c.586.598 1.085 1.276 1.484 2.012l72.596 130.67L328.11 35.673c.128-.237.266-.467.415-.692L320 24c-32 23.71-96 21.265-128 0zm-22.62 22.62L160 56c-16 0-48 16-64 32L16 248l80 48 48-112-9.158 87h64.195l47.195-86.05zm171.155 3.827L228.342 255H297v16h80.158L368 184l48 112 80-48-80-160c-13.322-12.132-48-32-71.154-32zM129.578 321l-9.982 94.84L171.613 321zm62.565 0l-76.868 135.88C114.277 458.763 112 488 112 488h288l-17.578-167h-79.86l48 96h-52.125L256 332.127 213.562 417h-52.087c15.955-32.003 31.827-64.05 47.884-96z"/></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z"/><path fill="#fff" d="M391.69 15.94c-16.368.073-31 5.07-41.975 16.044L73.83 307.87c4.225-.493 8.42-.613 12.56-.372 3.104.18 6.177.564 9.21 1.14 13.84 2.63 26.617 8.977 37.984 17.714 27.167-24.11 141.885-119.71 141.885-119.71-40.545 46.737-88.255 89.892-120.536 140.76.593.734 1.195 1.46 1.775 2.205 15.83 20.355 26.67 45.27 29.923 69.563.955 7.135 1.235 14.277.74 21.23l181.06-181.06-7.742-4.647c-.48.215-.962.43-1.493.647l-45.254 22.627 45.254-45.254c0 .09.02.18.026.27l.072-.12 43.52 26.114c1.272-5.898 3.794-11.413 7.824-16.05 4.662-5.37 11.21-9.078 19-10.74l-26.124-43.542 15.435-9.262 11.04 18.4 42.762-42.762c21.036-21.035 26.396-41.327 23.27-60.39-1.63-9.942-5.823-19.683-11.913-28.747l-72.876 72.875 63.522-84.697c-3.586-3.89-7.52-7.585-11.752-11.03-8.926-7.268-19.102-13.37-29.695-17.936.182.177.37.35.55.527l-56.567 33.942 21.668-43.337c-1.333-.107-2.66-.187-3.974-.233-1.106-.04-2.205-.055-3.297-.05zm43.593 233.36c-5.373.6-8.696 2.71-11.058 5.43-2.093 2.41-3.55 5.79-4.127 9.872 4.65-.945 7.952-2.652 10.228-4.928 2.3-2.3 4.02-5.645 4.957-10.375zM81.69 325.282c-15.297-.065-31.403 6.298-48.342 23.08-14.82 15.01-19.83 34.54-17.672 55.385 2.17 20.985 12 42.9 26.424 59.945 2.267 2.68 4.655 5.22 7.125 7.633 3.784-12.452 22.964-33.344 33.912-49.724-7.955 21.334-13.49 43.014-12.62 65.61 7.806 4.22 16.034 7.09 24.415 8.25 19.47 2.693 40.22-3.064 61.29-23.92 11.398-11.606 15.307-29.53 12.57-49.983-2.76-20.61-12.425-43.073-26.292-60.902-13.867-17.83-31.744-30.818-50.262-34.338-3.472-.66-6.987-1.022-10.547-1.037zm-8.21 19.8a73.833 55.395 45 0 1 60.14 26.034 73.833 55.395 45 0 1 13.038 91.377 73.833 55.395 45 0 1-46.732 11.692 61.463 48 45 0 0 29.154-11.608 61.463 48 45 0 0-9.52-77.4 61.463 48 45 0 0-77.402-9.522 61.463 48 45 0 0-11.62 29.147A73.833 55.395 45 0 1 42.24 358.08a73.833 55.395 45 0 1 31.237-12.998z"/></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z"/><path fill="#fff" d="M256 20c-52 0-104 4-160 12-16.432 224-16 224 0 448 112 16 208 16 320 0 16-224 16-224 0-448-56-8-108-12-160-12zm0 12l16 16h-7v151h18.184l25.234-37.854L275.27 128l32.003-32-32.002-32L297.6 41.676l-5.143-5.143h22.627V59.16l-4.758-4.758L300.727 64l32.002 32-32.003 32 30.855 30.854-25.873 38.808c44.373-18.947 68.128-73.205 53.56-131.478l-6.61-26.432 21.053 17.293c21.43 17.606 36.194 44.522 42.748 72.883 6.555 28.36 4.962 58.503-8.628 82.506-9.45 16.688-24.175 26.49-41.7 31.257-5.4 1.47-11.08 2.536-17.058 3.31H416v18h-66.926c5.978.774 11.657 1.84 17.057 3.31 17.527 4.766 32.253 14.568 41.702 31.256 13.59 24.003 15.183 54.145 8.63 82.506-6.555 28.36-21.318 55.277-42.75 72.883l-21.052 17.293 6.61-26.432c14.568-58.273-9.187-112.53-53.56-131.478l25.872 38.808L300.727 384l32.002 32-32.003 32 9.597 9.598 4.758-4.758v22.627h-22.627l5.143-5.143L275.27 448l32.003-32-32.002-32 33.148-33.146L283.184 313H265v151h7l-16 16-16-16h7V313h-18.184l-25.234 37.854L236.73 384l-32.003 32 32.002 32-22.328 22.324 5.143 5.143h-22.627V452.84l4.758 4.758 9.597-9.598-32.002-32 32.003-32-30.855-30.854 25.873-38.808c-44.373 18.947-68.128 73.205-53.56 131.478l6.61 26.432-21.053-17.293c-21.43-17.606-36.194-44.522-42.748-72.883-6.555-28.36-4.962-58.503 8.628-82.506 9.45-16.688 24.175-26.49 41.7-31.257 5.4-1.47 11.08-2.536 17.058-3.31H96v-18h66.926c-5.978-.774-11.657-1.84-17.057-3.31-17.527-4.766-32.253-14.568-41.702-31.256-13.59-24.003-15.183-54.145-8.63-82.506 6.555-28.36 21.318-55.277 42.75-72.883l21.052-17.293-6.61 26.432c-14.568 58.273 9.187 112.53 53.56 131.478l-25.872-38.808L211.273 128 179.27 96l32.003-32-9.597-9.598-4.758 4.758V36.533h22.627l-5.143 5.143L236.73 64l-32.003 32 32.002 32-33.148 33.146L228.816 199H247V48h-7l16-16zM130.822 92.42c-8.118 12.284-14.306 26.675-17.746 41.56-5.764 24.943-3.88 50.8 6.756 69.586 7.17 12.664 16.443 18.86 30.762 22.756 12.425 3.38 28.78 4.365 48.406 4.58v-16.94c-44.835-19.294-70.83-67.72-68.178-121.542zm250.356 0c2.652 53.823-23.343 102.248-68.178 121.543v16.94c19.625-.216 35.98-1.2 48.406-4.58 14.32-3.896 23.592-10.093 30.762-22.757 10.636-18.785 12.52-44.643 6.756-69.586-3.44-14.885-9.628-29.276-17.746-41.56zM217 217v26.412c4.057-12.462 13.95-22.355 26.412-26.412H217zm51.588 0c12.462 4.057 22.355 13.95 26.412 26.412V217h-26.412zM256 233c-12.81 0-23 10.19-23 23s10.19 23 23 23 23-10.19 23-23-10.19-23-23-23zm-39 35.588V295h26.412c-12.462-4.057-22.355-13.95-26.412-26.412zm78 0c-4.057 12.462-13.95 22.355-26.412 26.412H295v-26.412zm-96 12.51c-19.625.215-35.98 1.2-48.406 4.58-14.32 3.895-23.592 10.092-30.762 22.756-10.636 18.785-12.52 44.643-6.756 69.586 3.44 14.885 9.628 29.276 17.746 41.56-2.652-53.823 23.343-102.248 68.178-121.543v-16.94zm114 0v16.94c44.835 19.294 70.83 67.72 68.178 121.542 8.118-12.284 14.306-26.675 17.746-41.56 5.764-24.943 3.88-50.8-6.756-69.586-7.17-12.664-16.443-18.86-30.762-22.756-12.425-3.38-28.78-4.365-48.406-4.58z"/></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z"/><path fill="#fff" d="M151 23v9c0 21.038-3.39 52.724-8.523 85.336 31.097-25.51 70.354-41.053 111.2-40.756 5.227-.05 10.467.13 15.696.547 36.83 2.13 71.78 16.79 99.924 39.824-5.164-32.6-8.523-64.168-8.297-84.852l.1-9.098H151zm105 72.488c-88.543 0-160.514 71.967-160.514 160.51 0 88.543 71.97 160.516 160.514 160.516 88.543 0 160.514-71.973 160.514-160.516 0-88.543-71.97-160.51-160.514-160.51zm0 17.998c78.815 0 142.514 63.697 142.514 142.512S334.814 398.516 256 398.516c-78.815 0-142.514-63.703-142.514-142.518S177.186 113.486 256 113.486zM174.115 161.3l-12.734 12.72 76.48 76.558a18.94 18.94 0 0 0-.8 5.422A18.94 18.94 0 0 0 256 274.94a18.94 18.94 0 0 0 16.66-9.94h59.096v-17.998h-59.11a18.94 18.94 0 0 0-16.646-9.94 18.94 18.94 0 0 0-5.398.8l-76.487-76.563zm253.233 61.32v64.003h21.306V222.62h-21.306zm-57.96 172.888c-49.015 40.244-119.824 51.034-178.92 27.547-17.515-6.406-33.528-15.775-47.663-27.375 5.107 32.376 8.42 63.672 8.195 84.222l-.1 9.098H361v-9c0-20.857 3.33-52.178 8.39-84.492z"/></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z"/><path fill="#fff" d="M290.72 13.396c-79.94 38.87 9.013 152.854-74.402 191.567 21.946-43.348 30.93-118.453-39.69-169.342v.003c57.41 92.152-39.578 101.073 10.68 235.037.884 2.098 1.724 4.216 2.467 6.383-.86-2.16-1.682-4.286-2.468-6.383-17.056-40.42-58.356-69.442-47.875-146.558-92.397 139.136 61.726 179.234 39.968 296.226-20.22-52.322-96.068-38.077-65.88-94.582-81.617 64.483 68 99.77-25.282 168.19h349.006c-44.892-35.722-38.733-108.488-9.29-92.71-14.63-42.75-54.515-10.383-56.477 22.604-15.55-101.866 86.23-108.78 74.388-226.197-19.395 67.794-73.366 65.522-92.71 55.322 68.964-32.598 91.818-125.04 17.15-161.248 23.033 28.635 15.785 123.762-33.243 84.998-18.193-14.385-70.182-60.235-46.34-163.31zm-165.656 4.778c-6.35.16-12.967 2.232-19.62 6.578 38.005 7.337 57.7 61.682 52.892 122.08 34.38-59.225 5.54-129.638-33.272-128.658zm218.29 44.633c8.507 47.444-17.105 75.028-38.82 30.52 22.306 83.01 95.766 93.25 38.82-30.52zm103.84 93.88c35.616 36.454 25.294 104.74-14.133 160.057 81.137-36.52 81.26-153.81 14.133-160.057zm-379.22 78.917c19.553 54.61-90.043 56.077 5.62 157.767-38.953-68.595 67.41-69.424-5.62-157.766z"/></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z"/><path fill="#fff" d="M21.094 18.738l2.648 324.412c18.77-2.59 45.98-7.852 64.945-12.642-64.106-101.55-51.257-197.104 2.327-249.63 53.662-52.602 146.447-59.914 233.177 7.337 4.84-9.857 10.42-22.838 16.794-36.006 5.47-11.3 11.646-22.644 18.895-32.767l-338.786-.705zm474.963 4.528v.004c0-.002 0-.003.002-.004h-.003zm0 .004c-61.196 95.76-153.25 141.768-246.823 130.314l.018-.09c-44.04-8.138-80.08-48.272-88.258-90.97l-5.1.978c-4.382 1.34-8.652 2.905-12.804 4.674 5.02 23.956 17.053 46.75 34.045 64.994-23.395-10.524-46.4-24.868-68.545-43.14-1.53 1.363-3.03 2.76-4.494 4.195-10.57 10.36-19.463 22.714-26.19 36.744 78.998 89.616 102.237 198.926 67.586 288.587a19.04 19.04 0 0 1 .024 0 19.04 19.04 0 0 1 18.494 19.04 19.04 19.04 0 0 1-33.54 12.434c-8.678 15.057-19.207 29.335-31.603 42.613h87.746c39.76-99.513 23.982-199.025-19.246-298.538 67.318 99.592 90.826 196.925 82.403 298.538h40.86c6.338-49.1-1.414-99.91-17.83-151.262 27.98 51.95 42.662 101.905 46.167 151.263h80.418c-7.116-82.67-59.353-161.448-136.016-238.282 51.847 37.27 99.116 74.24 137.67 113.58a28.06 28.06 0 0 1 26.353-16.5 28.06 28.06 0 0 1 27.253 28.064 28.06 28.06 0 0 1-19.53 26.857c21.467 27.107 38.57 55.61 50.107 86.283h10.834v-251.73c-90.946 14.794-178.154.85-267.36-51.786 28.81 10.04 57.617 17.515 86.426 21.637a15.033 15.033 0 0 1-.81-4.73 15.033 15.033 0 0 1 15.472-15.026 15.033 15.033 0 0 1 14.594 15.027 15.033 15.033 0 0 1-2.124 7.608c51.267 3.417 102.534-4.68 153.8-28.997V132.79c-13.638 7.018-27.81 13.495-42.56 19.394a19.04 19.04 0 0 1-32.117 11.59c-23.378 7.59-48.116 13.84-74.41 18.585 23.985-9.113 46.94-19.303 68.655-30.768a19.04 19.04 0 0 1-.072-1.617 19.04 19.04 0 0 1 19.588-19.04 19.04 19.04 0 0 1 10.442 3.51c17.903-11.117 34.778-23.286 50.475-36.648V23.27zM195.8 57.664c-5.448-.005-10.796.308-16.036.904l95.56 65.895 18.936-34.887c-34.17-22.12-67.845-31.884-98.46-31.912zM63.72 196.322c.062 32.42 9.328 68.888 30.667 107.545l22.33-13.244-52.996-94.3zm329.33 88.944a19.04 19.04 0 0 1 18.493 19.043 19.04 19.04 0 1 1-38.082 0 19.04 19.04 0 0 1 19.59-19.044z"/></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z"/><path fill="#fff" d="M117.848 64.37c-4.216-.027-8.49.18-12.8.634-55.17 5.8-95.806 49.862-90.71 98.35.106 1.01.203 2.193.334 3.183.927-1.65 1.642-3.144 2.717-4.79 25.247-38.602 83.043-59.15 129.063-45.745 46.02 13.403 62.854 55.91 37.608 94.516-2.82 4.32-6.102 8.118-9.68 11.962 26.987-18.47 43.175-48.472 39.847-80.138-4.7-44.703-46.632-77.64-96.38-77.97zm375.004 33.525c-42.71 89.996-101.97 173.25-167.03 230.687-44.41 39.21-113.416 70.452-164.107 39.715-30.767-18.66-42.313-70.813-15.77-116.22-53.058 22.698-93.682 100.59-64.242 161.773 45.65 94.867 165.072 93.635 286.17 42.048 55.41-23.603 89.392-40.718 124.98-65.41v-33.066c-61.925 43.79-116.094 73.34-196.953 96.22 78.083-36.174 130.285-70.63 196.952-124.476V274.81c-67.75 72.44-145.933 116.294-223.89 154.854 80.25-47.795 155.855-110.53 223.89-186.113v-44.224c-42.886 57.34-97.62 102.83-150.82 149.85 54.818-60.357 107.696-122.268 150.82-191.983V97.895z"/></svg>
|
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(1702) }
|
8
8
|
|
9
9
|
it 'loads known svg data' do
|
10
10
|
exp = <<-EOSVG
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: game_icons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0.20150601
|
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-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - '>='
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubyzip
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
139
153
|
description: Access and manipulate the scalable, free icons of game-icons.net
|
140
154
|
email:
|
141
155
|
- andy.meneely@gmail.com
|
@@ -157,7 +171,8 @@ files:
|
|
157
171
|
- lib/game_icons/finder.rb
|
158
172
|
- lib/game_icons/icon.rb
|
159
173
|
- lib/game_icons/optional_deps.rb
|
160
|
-
- lib/game_icons/sanity_test.rb
|
174
|
+
- lib/game_icons/tasks/sanity_test.rb
|
175
|
+
- lib/game_icons/tasks/update.rb
|
161
176
|
- lib/game_icons/version.rb
|
162
177
|
- resources/UPDATING.md
|
163
178
|
- resources/icons/carl-olsen/originals/svg/brutal-helm.svg
|
@@ -228,6 +243,7 @@ files:
|
|
228
243
|
- resources/icons/delapouite/originals/svg/calendar.svg
|
229
244
|
- resources/icons/delapouite/originals/svg/car-key.svg
|
230
245
|
- resources/icons/delapouite/originals/svg/carrot.svg
|
246
|
+
- resources/icons/delapouite/originals/svg/castle.svg
|
231
247
|
- resources/icons/delapouite/originals/svg/cctv-camera.svg
|
232
248
|
- resources/icons/delapouite/originals/svg/cherry.svg
|
233
249
|
- resources/icons/delapouite/originals/svg/chest.svg
|
@@ -242,6 +258,7 @@ files:
|
|
242
258
|
- resources/icons/delapouite/originals/svg/corporal.svg
|
243
259
|
- resources/icons/delapouite/originals/svg/croissant.svg
|
244
260
|
- resources/icons/delapouite/originals/svg/crosshair.svg
|
261
|
+
- resources/icons/delapouite/originals/svg/crucifix.svg
|
245
262
|
- resources/icons/delapouite/originals/svg/cupcake.svg
|
246
263
|
- resources/icons/delapouite/originals/svg/diamond-ring.svg
|
247
264
|
- resources/icons/delapouite/originals/svg/drakkar.svg
|
@@ -262,6 +279,7 @@ files:
|
|
262
279
|
- resources/icons/delapouite/originals/svg/full-motorcycle-helmet.svg
|
263
280
|
- resources/icons/delapouite/originals/svg/gamepad.svg
|
264
281
|
- resources/icons/delapouite/originals/svg/gauls-helm.svg
|
282
|
+
- resources/icons/delapouite/originals/svg/graduate-cap.svg
|
265
283
|
- resources/icons/delapouite/originals/svg/grass.svg
|
266
284
|
- resources/icons/delapouite/originals/svg/greaves.svg
|
267
285
|
- resources/icons/delapouite/originals/svg/greek-temple.svg
|
@@ -286,10 +304,12 @@ files:
|
|
286
304
|
- resources/icons/delapouite/originals/svg/jug.svg
|
287
305
|
- resources/icons/delapouite/originals/svg/jump-across.svg
|
288
306
|
- resources/icons/delapouite/originals/svg/keyboard.svg
|
307
|
+
- resources/icons/delapouite/originals/svg/kimono.svg
|
289
308
|
- resources/icons/delapouite/originals/svg/klingon.svg
|
290
309
|
- resources/icons/delapouite/originals/svg/ladder.svg
|
291
310
|
- resources/icons/delapouite/originals/svg/life-buoy.svg
|
292
311
|
- resources/icons/delapouite/originals/svg/lighthouse.svg
|
312
|
+
- resources/icons/delapouite/originals/svg/log.svg
|
293
313
|
- resources/icons/delapouite/originals/svg/look-at.svg
|
294
314
|
- resources/icons/delapouite/originals/svg/lungs.svg
|
295
315
|
- resources/icons/delapouite/originals/svg/magick-trick.svg
|
@@ -337,6 +357,7 @@ files:
|
|
337
357
|
- resources/icons/delapouite/originals/svg/ribbon-medal.svg
|
338
358
|
- resources/icons/delapouite/originals/svg/ring.svg
|
339
359
|
- resources/icons/delapouite/originals/svg/robin-hood-hat.svg
|
360
|
+
- resources/icons/delapouite/originals/svg/roman-shield.svg
|
340
361
|
- resources/icons/delapouite/originals/svg/round-star.svg
|
341
362
|
- resources/icons/delapouite/originals/svg/rupee.svg
|
342
363
|
- resources/icons/delapouite/originals/svg/safety-pin.svg
|
@@ -378,6 +399,7 @@ files:
|
|
378
399
|
- resources/icons/delapouite/originals/svg/union-jack.svg
|
379
400
|
- resources/icons/delapouite/originals/svg/walkie-talkie.svg
|
380
401
|
- resources/icons/delapouite/originals/svg/warlock-eye.svg
|
402
|
+
- resources/icons/delapouite/originals/svg/watch.svg
|
381
403
|
- resources/icons/delapouite/originals/svg/watchtower.svg
|
382
404
|
- resources/icons/delapouite/originals/svg/wheelbarrow.svg
|
383
405
|
- resources/icons/delapouite/originals/svg/whistle.svg
|
@@ -624,6 +646,7 @@ files:
|
|
624
646
|
- resources/icons/lorc/originals/svg/cash.svg
|
625
647
|
- resources/icons/lorc/originals/svg/castle.svg
|
626
648
|
- resources/icons/lorc/originals/svg/cauldron.svg
|
649
|
+
- resources/icons/lorc/originals/svg/celebration-fire.svg
|
627
650
|
- resources/icons/lorc/originals/svg/centipede.svg
|
628
651
|
- resources/icons/lorc/originals/svg/chained-heart.svg
|
629
652
|
- resources/icons/lorc/originals/svg/chalice-drops.svg
|
@@ -803,6 +826,7 @@ files:
|
|
803
826
|
- resources/icons/lorc/originals/svg/empty-hourglass.svg
|
804
827
|
- resources/icons/lorc/originals/svg/energise.svg
|
805
828
|
- resources/icons/lorc/originals/svg/energy-arrow.svg
|
829
|
+
- resources/icons/lorc/originals/svg/energy-breath.svg
|
806
830
|
- resources/icons/lorc/originals/svg/energy-shield.svg
|
807
831
|
- resources/icons/lorc/originals/svg/energy-sword.svg
|
808
832
|
- resources/icons/lorc/originals/svg/engagement-ring.svg
|
@@ -1467,6 +1491,7 @@ files:
|
|
1467
1491
|
- resources/icons/lorc/originals/svg/surprised.svg
|
1468
1492
|
- resources/icons/lorc/originals/svg/suspicious.svg
|
1469
1493
|
- resources/icons/lorc/originals/svg/swallow.svg
|
1494
|
+
- resources/icons/lorc/originals/svg/swan-breeze.svg
|
1470
1495
|
- resources/icons/lorc/originals/svg/swan.svg
|
1471
1496
|
- resources/icons/lorc/originals/svg/swap-bag.svg
|
1472
1497
|
- resources/icons/lorc/originals/svg/sword-array.svg
|
@@ -1892,7 +1917,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1892
1917
|
version: '0'
|
1893
1918
|
requirements: []
|
1894
1919
|
rubyforge_project:
|
1895
|
-
rubygems_version: 2.
|
1920
|
+
rubygems_version: 2.4.5
|
1896
1921
|
signing_key:
|
1897
1922
|
specification_version: 2
|
1898
1923
|
summary: Icons from game-icons.net
|
@@ -1,24 +0,0 @@
|
|
1
|
-
require 'game_icons'
|
2
|
-
require 'cairo'
|
3
|
-
require 'pango'
|
4
|
-
require 'rsvg2'
|
5
|
-
|
6
|
-
class SanityTest
|
7
|
-
def self.run(size: 100)
|
8
|
-
num = GameIcons.names.count
|
9
|
-
cc = Cairo::Context.new(Cairo::ImageSurface.new(1200, ((num / 12) + 1) * size))
|
10
|
-
scale = size / 512.0
|
11
|
-
cc.scale(size / 512.0, size / 512.0)
|
12
|
-
GameIcons.names.each_with_index do |icon, i|
|
13
|
-
icon = GameIcons.get(icon).recolor(fg: '#CBB08B', bg: '#5F443A')
|
14
|
-
svg = RSVG::Handle.new_from_data(icon.string)
|
15
|
-
x = (i % 12) * size / scale
|
16
|
-
y = (i / 12) * size / scale
|
17
|
-
cc.translate(x, y)
|
18
|
-
cc.render_rsvg_handle(svg)
|
19
|
-
cc.translate(-x, -y)
|
20
|
-
end
|
21
|
-
cc.target.write_to_png('sanity_test.png')
|
22
|
-
puts "Done!"
|
23
|
-
end
|
24
|
-
end
|