Installation

Add this line to your application's Gemfile:

gem 'shrinker', git: '[email protected]:askcharlie/shrinker-ruby.git', branch: :master, require: 'shrinker'

And then execute:

$ bundle

Usage

Set Environment variables:

$ export SHRINKER_BASE_URL= short_url_of_a_shortener
$ export SHRINKER_API_SECRET= very_long_super_secure_string

That's what you need to get a short url like "https://chr.li/tT_gTg" :

Shrinker.shorten_url("https://www.reddit.com/r/all)

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake build and bundle exec rake install.