
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
RubyGem access to the SVGs on game-icons.net, an awesome library of free icons.
Add this line to your application's Gemfile:
gem 'game_icons'
And then execute:
$ bundle
Or install it yourself as:
$ gem install game_icons
require 'game_icons'
GameIcons.get('glass-heart').file # absolute path to glass-heart.svg, white-on-black
GameIcons.get('glass-heart.svg').file # .svg extension allowed too
GameIcons.get(:flame).file # symbols work too
GameIcons.get('glass-heart').string # the SVG string
GameIcons.get('glass-heart').string # the SVG string
GameIcons.get('glass-heart').recolor(fg: '333', bg: 'ccc').string # recolor the foreground and background to different shades of gray
GameIcons.get('glass-heart').recolor(fg: '333', bg: 'ccc', fg_opacity: 0.25, bg_opacity: 0.75).string # recolor with opacity c
GameIcons.names # returns an array of all names
GameIcons.get('skoll/jeep') # Add author name to disambiguate names
GameIcons.get('delapouite/jeep') # Add author name to disambiguate names
GameIcons.get('jeep') # Behavior undefined for ambiguous names
Squib is my other pet project. Here's some example usage:
require 'game_icons' # Be sure to also put this in your Gemfile and run "bundle install"
require 'squib'
Squib::Deck.new do
#You can access just the file
svg file: GameIcons.get('glass-heart').file
#Or you can get the data as a string
svg data: GameIcons.get('glass-heart').string
svg data: GameIcons.get('glass-heart').recolor(fg: '333', bg: 'ccc').string
end
You can do a whole lot with SVG data once you get it from this library. Take a look at this PR for some inspiration.
Sometimes I fall behind GameIcons in updating. If you want to update your gem locally, you can do the following:
bundle install
version.rb
to be something different for just you (e.g. 0.44.johndoe
)rake update
from the root of this reporake install
to install the new version of the gem.This is not affiliated with game-icons.net. They are awesome, talented artists who give away their hard work. I'm not them.
That said, the Ruby code surroudning this Gem is MIT licensed. The icons themselves are under a CC BY 3.0. Be sure to attribute them in your work.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that game_icons demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.