Giter VIP home page Giter VIP logo

expurrel's People

Contributors

japetheape avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

expurrel's Issues

problem adding providers

hey awesome gem! super simple and effective.

I couldn't get the add provider method to work, so I ended up adding the ones I needed.

e = Expurrel.PROVIDERS << 'bit.ly'
returns:
undefined method `PROVIDERS' for Expurrel:Class (NoMethodError)

I'm using ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]

here is the list of providers I added:
on.fb.me
nyt.ms
cot.ag

I'm new to ruby and somewhat new to programming, sorry if this is too basic!

error on adding providers function and with t.co

This is indeed two issues.

I could't get the add provider function to work.

=> true
e = Expurrel.PROVIDERS << 'bit.ly'
NoMethodError: undefined method`PROVIDERS' for Expurrel:Class

so i added the providers I needed directly (list at the end)

but here is the real problem:
twitter shortener is t.co
and after adding it started getting errors with domains like:
http://editorial-afriquenord-tunisie.blogspot.com/2011/03/les-objectifs-de-la-revolution.html

so i digged in the code and found that the domain was being isolated and compared with include?, so domains that contained t.co returned true.

so i changed that line from:
if domain.include?(l)
to
if domain == l

and problem solved! you'll probably miss some but at least it's safer.

here's the list of shorteners i added:
f24.my
reut.rs
wp.me
shar.es
shr.tn
t.co
j.mp
tl.gd
j.mp
goo.gl
dlvr.it
on.fb.me
fb.me
nyti.ms
cot.ag

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.