Socket
Book a DemoInstallSign in
Socket

ruby_svg_image_generator

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ruby_svg_image_generator

bundlerRubygems
Version
0.0.1
Version published
Maintainers
3
Created
Source

RubySvgImageGenerator

Build Status Coverage Status Code Climate

ruby_svg_image_generator is a great gem, created for you but specially for your web application users.

It is a SVG avatars generator gem based on themes which can be designed by users but also you can find some great pre-designed themes on it.

Demo App

We have implemented a demo app for you to try out: Demo App

Installation

Add this line to your application's Gemfile:

gem 'ruby_svg_image_generator'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ruby_svg_image_generator

Usage

Create a random svg image from selected theme

RubySvgImageGenerator.create_random(title, options={})

title: (String) Created SVG image name
options: (Hash)
  -  theme: (String) Theme where you get the random image

Example: RubySvgImageGenerator.create_random('awesome_random_avatar', {theme: RubySvgImageGenerator::T_MONKEY_AVATARS})

Create a random svg image from selected theme and save on the file system

RubySvgImageGenerator.create_random_and_save(filename, title, options={})

filename: (String): Created SVG image file name
title: (String) Created SVG image name
options: (Hash)
  -  theme: (String) Theme where you get the random image

Example: RubySvgImageGenerator.create_random_and_save('image.svg', 'awesome_random_avatar', {theme: RubySvgImageGenerator::T_LANDSCAPE_THEME})

Create an image from selected theme and specific values for parts

RubySvgImageGenerator.create(title, options={})

title: (String) Created SVG image name
options: (Hash)
  -  theme: (String) Theme where you get the image
  -  parts: (Array) Array of index of parts' values which compose the theme

Example: RubySvgImageGenerator.create('awesome_avatar', {theme: RubySvgImageGenerator::T_FACE_AVATARS, parts: [0, 1, 5, 0, 1]})

Create an image from selected theme with specific values for parts and save on the file system

RubySvgImageGenerator.create_and_save(filename, title, options={})

filename: (String): Created SVG image file name
title: (String) Created SVG image name
options: (Hash)
  -  theme: (String) Theme where you get the image
  -  parts: (Array) Array of index of parts' values which compose the theme

Example: RubySvgImageGenerator.create('face_avatar.svg', 'awesome_avatar', {theme: RubySvgImageGenerator::T_FACE_AVATARS, parts: [0, 1, 5, 0, 1]})

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/monkeyKoders/ruby_svg_image_generator. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 20 Jun 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.