Project

quotify

0.01
No commit activity in last 3 years
No release in over 3 years
Generates random quotes. Perfect placeholder text.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0
 Project Readme

Quotify Build Status codecov Maintainability Gem Version

Add random quotes to your app effortlessly

How to install

Install via:

gem install quotify

Then start using it:

require 'quotify'

Usage

You can generate a new quote quickly by calling the generate function:

puts Quotify.generate
=> You must be the change you wish to see in the world. - Logan Paul

super_fancy_quote = Quotify.generate
puts super_fancy_quote.author
=> Sarah Palin
puts super_fancy_quote.quote
=> C++ supports OOP

generate returns a Quotify::Quote object. You can then use your favorite methods on it (to_s, to_h, to_json). Currently XML is not supported. If there is a demand, we will consider adding it in the next release.

You can also use the fancy spacer option in to_s to create majestic quotes:

Quotify::Quote.new.to_s(spacer: " 🔥 ")
 => Those were alternative facts 🔥 Soulja Boy

Quotify the quote list and spacer can be updated at runtime using the configure method

Quotify.configure(spacer: ' -OG- ')
Quotify.configure(authors: ['Justin', 'Michel'])
...
Quotify.reset_config # returns to default configurations

You can also load your own config file using configure_with. Here is an example of a valid config file custom_quotes.yml

Quotify.configure_with(File.join(__dir__, 'custom_quotes.yml'))

Update the quote database

To pull the newest database version with all those spicy quotes, run quotify update or quotify u in the terminal.

Contributing

You can run all the tests with:

bundle exec rake

If you wish to add new quotes, head over to quotes.yml and do a PR to add new ones. I'll merge pretty much everything for this file (given that it doesn't mess up the yaml).

Tip Jar

Since maintaining quotify is my full time job, I need money to pay the bills. Please donate your crypto pocket change to these addresses.

ETH: 0x67833AA7fa3eA8a515860C70c4b99dAe028D81da

BTC: 15TsW6spmpY71qq5V14mq2CzCxasnap94v

LTC: LZsHU9mp7C4wn7g1MxKRpjeJogbkajSRoe

BCH: LOL

LICENSE

This gem is MIT licensed, please see LICENSE for more information.