Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gadafi

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gadafi

  • 0.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

gadafi gem

This gem is a simple wrapper around the gadafi url shortening service, available at [http://gadaf.fi].

Installation

As with most ruby gems, just type this on the command line.

$ gem install gadafi

Usage

It's a pretty simple gem - just paste in the url you want to shorten, and it'll print the url for the short url to STDOUT:

$ gadafi http://en.wikipedia.org/wiki/URL_shortening        # http://www.gadaf.fi/1

TODO / Thoughts

  • I largely created it as a an exercise to help me learn how to make gems using bundler, by following along this tutorial here by radar.
  • I'm aware that this gem is a somewhat comical example of over-engineering - this could be accomplished much quicker by simply using an alias to curl for example, but the aim of this gem was learning how to make gems, rather than development minimalism :)
  • It uses minitest instead of rspec for testing, but otherwise, I've tried to follow it fairly faithfully.
  • I don't really expect any, but if you find this useful, I'd be happy to take feature requests, and pull requests.
  • TODO use mocks with the tests to stop hitting an actual api endpoint.
  • TODO use a local storage of some kind to cache already queried urls. Suggestions welcome!

Author

License

MIT LICENSE

Thanks

Christoffer Bjorkskog - for making a cool url service in the first place Ryan Bigg (on github as radar) - for making such a great guide to follow.

FAQs

Package last updated on 14 Aug 2011

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc