0.0
No commit activity in last 3 years
No release in over 3 years
FiddleFart is the parsing tool which takes a URL from any of the following services and normalizes the embed data.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 1.5
>= 0
 Project Readme

FiddleFart

Build Status Gem Version Code Climate

FiddleFart is the parsing tool which takes a URL from any of the following services and normalizes the embed data.

The goal of this gem is to make it very easy to extract out embed URLs (for use in other future applications).

Installation

Add this line to your application's Gemfile:

gem 'fiddle_fart'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fiddle_fart

Usage

require 'fiddle_fart'

url = "http://jsbin.com/eyOlOFI/7/edit"
obj = FiddleFart::Parser.parse(url)
obj.embed_url # => "http://jsbin.com/eyOlOFI/7/embed"

url = "http://codepen.io/cmykw/pen/krqIt"
obj = FiddleFart::Parser.parse(url)
obj.share_link # => "http://codepen.io/cmykw/full/krqIt"

url = "http://jsfiddle.net/cavneb/sKfS8/"
obj = FiddleFart::Parser.parse(url)
obj.embed_url # => "http://jsfiddle.net/cavneb/sKfS8//embedded/result/"

url = "http://plnkr.co/edit/ZTArBF?p=info"
obj = FiddleFart::Parser.parse(url)
obj.embed_url # => "http://embed.plnkr.co/ZTArBF/preview"

Contributing

  1. Fork it ( http://github.com//fiddle_fart/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request