game_icons 0.19.0.20150910 → 0.20.0.20151001

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
2
  SHA1:
3
- metadata.gz: d3a37cc2e4cb8374ba5e6e578a90ec12b849c09c
4
- data.tar.gz: 01a5cbc8e0e013bdb93f479aee197c61e4f13f97
3
+ metadata.gz: 8bae6deadf14d0201b7c883ae417f8fff6c5faff
4
+ data.tar.gz: 83b0455dbd0bb4ba0762a447c468f97f401b8e9a
5
5
  SHA512:
6
- metadata.gz: 278d33de9b899bbb5eb1ed932f9e952bb2b0e882472b251a3609ff91f80d3f5e0fed8de1dfdd7980f3b1c4fbb81b843cda98641d1db0e998673284a239bce953
7
- data.tar.gz: 04ed237c83d2847ebc2299c02374f3a88339dfd0aca2150fd2da73ca5e01d7217b4b0124d4e5da6273eeee81b6e15f81aba8275ca48eaf8a71e55ff65712fbbc
6
+ metadata.gz: 5862dc184c8cf9b85c580b6fcf4c67d19a479af273850d8aab24817d726519c1bfef803bcafa779fbaac39c9cbbaa87ca8c8b3219d827d10c01b9f61b80e3d55
7
+ data.tar.gz: b040e8ed6f3ad3b70ce824a5d531d38939c66c40eb7e8fd68663b670d16fb3be840b9d2105fa7cc4c35210801b6592c63841905bcd6f0f516f066a146550c1ac
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.
@@ -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
@@ -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.19.0.20150910'
6
+ VERSION = '0.20.0.20151001'
7
7
  end
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,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.
@@ -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(1934) }
7
+ it('has the expected number of icons') { expect(GameIcons.names.count).to eq(1944) }
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.19.0.20150910
4
+ version: 0.20.0.20151001
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-09-11 00:00:00.000000000 Z
11
+ date: 2015-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -2139,7 +2139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2139
2139
  version: '0'
2140
2140
  requirements: []
2141
2141
  rubyforge_project:
2142
- rubygems_version: 2.4.6
2142
+ rubygems_version: 2.4.5
2143
2143
  signing_key:
2144
2144
  specification_version: 2
2145
2145
  summary: Icons from game-icons.net
@@ -2152,3 +2152,4 @@ test_files:
2152
2152
  - spec/optional_deps_spec.rb
2153
2153
  - spec/regression_spec.rb
2154
2154
  - spec/spec_helper.rb
2155
+ has_rdoc: