bitly 0.3 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -0
- data/Manifest +12 -1
- data/bitly.gemspec +4 -4
- data/lib/bitly.rb +0 -2
- data/lib/bitly/version.rb +1 -1
- data/test/fixtures/cnn.json +1 -0
- data/test/fixtures/cnn_and_google.json +1 -0
- data/test/fixtures/expand_cnn.json +1 -0
- data/test/fixtures/expand_cnn_and_google.json +1 -0
- data/test/fixtures/google_and_cnn_info.json +1 -0
- data/test/fixtures/google_info.json +1 -0
- data/test/fixtures/google_stats.json +1 -0
- data/test/fixtures/shorten_error.json +1 -0
- metadata +14 -4
- data/test/test_bitly.rb +0 -81
data/History.txt
CHANGED
data/Manifest
CHANGED
@@ -8,4 +8,15 @@ lib/bitly.rb
|
|
8
8
|
Manifest
|
9
9
|
Rakefile
|
10
10
|
README.txt
|
11
|
-
test/
|
11
|
+
test/bitly/test_client.rb
|
12
|
+
test/bitly/test_url.rb
|
13
|
+
test/bitly/test_utils.rb
|
14
|
+
test/fixtures/cnn.json
|
15
|
+
test/fixtures/cnn_and_google.json
|
16
|
+
test/fixtures/expand_cnn.json
|
17
|
+
test/fixtures/expand_cnn_and_google.json
|
18
|
+
test/fixtures/google_and_cnn_info.json
|
19
|
+
test/fixtures/google_info.json
|
20
|
+
test/fixtures/google_stats.json
|
21
|
+
test/fixtures/shorten_error.json
|
22
|
+
test/test_helper.rb
|
data/bitly.gemspec
CHANGED
@@ -2,22 +2,22 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{bitly}
|
5
|
-
s.version = "0.3"
|
5
|
+
s.version = "0.3.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Phil Nash"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-08-22}
|
10
10
|
s.description = %q{Use the bit.ly API to shorten or expand URLs}
|
11
11
|
s.email = %q{philnash@gmail.com}
|
12
12
|
s.extra_rdoc_files = ["lib/bitly/client.rb", "lib/bitly/url.rb", "lib/bitly/utils.rb", "lib/bitly/version.rb", "lib/bitly.rb", "README.txt"]
|
13
|
-
s.files = ["bitly.gemspec", "History.txt", "lib/bitly/client.rb", "lib/bitly/url.rb", "lib/bitly/utils.rb", "lib/bitly/version.rb", "lib/bitly.rb", "Manifest", "Rakefile", "README.txt", "test/
|
13
|
+
s.files = ["bitly.gemspec", "History.txt", "lib/bitly/client.rb", "lib/bitly/url.rb", "lib/bitly/utils.rb", "lib/bitly/version.rb", "lib/bitly.rb", "Manifest", "Rakefile", "README.txt", "test/bitly/test_client.rb", "test/bitly/test_url.rb", "test/bitly/test_utils.rb", "test/fixtures/cnn.json", "test/fixtures/cnn_and_google.json", "test/fixtures/expand_cnn.json", "test/fixtures/expand_cnn_and_google.json", "test/fixtures/google_and_cnn_info.json", "test/fixtures/google_info.json", "test/fixtures/google_stats.json", "test/fixtures/shorten_error.json", "test/test_helper.rb"]
|
14
14
|
s.homepage = %q{http://github.com/philnash/bitly}
|
15
15
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Bitly", "--main", "README.txt"]
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
s.rubyforge_project = %q{bitly}
|
18
18
|
s.rubygems_version = %q{1.3.4}
|
19
19
|
s.summary = %q{Use the bit.ly API to shorten or expand URLs}
|
20
|
-
s.test_files = ["test/bitly/test_client.rb", "test/bitly/test_url.rb", "test/bitly/test_utils.rb", "test/
|
20
|
+
s.test_files = ["test/bitly/test_client.rb", "test/bitly/test_url.rb", "test/bitly/test_utils.rb", "test/test_helper.rb"]
|
21
21
|
|
22
22
|
if s.respond_to? :specification_version then
|
23
23
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
data/lib/bitly.rb
CHANGED
data/lib/bitly/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
{ "errorCode": 0, "errorMessage": "", "results": { "http://cnn.com": { "hash": "31IqMl", "shortKeywordUrl": "", "shortUrl": "http://bit.ly/15DlK", "userHash": "15DlK" } }, "statusCode": "OK" }
|
@@ -0,0 +1 @@
|
|
1
|
+
{ "errorCode": 0, "errorMessage": "", "results": { "http://cnn.com": { "hash": "31IqMl", "shortKeywordUrl": "", "shortUrl": "http://bit.ly/15DlK", "userHash": "15DlK" }, "http://google.com": { "hash": "3j4ir4", "shortKeywordUrl": "", "shortUrl": "http://bit.ly/11etr", "userHash": "11etr" } }, "statusCode": "OK" }
|
@@ -0,0 +1 @@
|
|
1
|
+
{ "errorCode": 0, "errorMessage": "", "results": { "31IqMl": { "longUrl": "http://cnn.com/" } }, "statusCode": "OK" }
|
@@ -0,0 +1 @@
|
|
1
|
+
{ "errorCode": 0, "errorMessage": "", "results": { "15DlK": { "longUrl": "http://cnn.com/" }, "3j4ir4": { "longUrl": "http://google.com/" } }, "statusCode": "OK" }
|
@@ -0,0 +1 @@
|
|
1
|
+
{ "errorCode": 0, "errorMessage": "", "results": { "31IqMl": { "calais": {}, "calaisId": "", "calaisResolutions": {}, "contentLegth": 284.0, "contentLength": "", "contentType": "text/html", "exif": {}, "fileExtension": "", "globalHash": "31IqMl", "hash": "31IqMl", "htmlMetaDescription": "CNN.com delivers the latest breaking news and information on the latest top stories, weather, business, entertainment, politics, and more. For in-depth coverage, CNN.com provides special reports, video, audio, photo galleries, and interactive guides.", "htmlMetaKeywords": [ "CNN", "CNN news", "CNN.com", "CNN TV", "news", "news online", "breaking news", "U.S. news", "world news", "weather", "business", "CNN Money", "sports", "politics", "law", "technology", "entertainment", "education", "travel", "health", "special reports", "autos", "developing story", "news video", "CNN Intl" ], "htmlTitle": "CNN.com - Breaking News, U.S., World, Weather, Entertainment & Video News", "id3": {}, "indexed": 1246563927, "keyword": "", "keywords": [], "longUrl": "http://cnn.com/", "metacarta": [], "mirrorUrl": "", "shortenedByUser": "bitly", "surbl": 0, "thumbnail": { "large": "http://s.bit.ly/bitly/31IqMl/thumbnail_large.png", "medium": "http://s.bit.ly/bitly/31IqMl/thumbnail_medium.png", "small": "http://s.bit.ly/bitly/31IqMl/thumbnail_small.png" }, "urlFetched": "http://www.cnn.com/", "userHash": "", "users": [ "shmooved", "bitlybookmarklet", "thepalermoproject", "soundcloud", "todd", "johnb", "gfc", "selias22", "heme", "heavensrevenge", "tedroden", "showpopr", "toma", "invokemedia", "jonsteinberg", "shmoop", "crkn", "spol", "neilw", "superamit", "tadwook", "timkl", "elmerfudd", "directeur", "jamescrowley", "tickerhound", "twitterhound", "mobilemind", "thismagazine", "mpminer", "nok", "eljojo", "dumpkopf", "spreadmob", "nishith", "chorrell", "dave", "isayel", "revrev", "ideacol", "adelevie", "b2c", "zen", "tweepletwak", "stephdau", "jeton", "hiteck", "sonidolocal", "cavorite", "jay", "rajeshkp", "mailplane", "sbtodd", "bitohoney", "detect", "artd", "ivankirigin", "NeilCrosby", "mskadu", "dmpro", "millette", "mm", "aweissman", "nearlybot", "ajasver", "orenus", "yunfan", "vipeers", "michel", "spraycode", "fidlr", "supersuf", "abernathy", "zellmi", "kortina", "bitlyapidemo", "hp", "bojonas", "nickware", "adenner", "sigepjedi", "austinhill", "tigol", "vranx", "fabinho", "simonches", "RichMann", "claystreet", "trendly", "mzehrer", "TheN2S", "ffo", "mcgarty", "unquabain", "d", "springpad", "motuit", "sandya", "jstautz", "polymergirl", "HED", "colbypalmer", "patched", "vx", "trailerreview", "backtype", "nukirk", "tmadge", "garrettw", "runk", "dbingham", "ckaroli", "hsetty", "sharpshoot", "mamund", "gestes", "thesethings", "propel", "marsrc", "halvfet", "berberich", "imath", "mahawkins", "hayduke", "icecoldnews", "bren", "claudine", "munim", "utatane", "tanel", "karuizawa", "hpduong", "fewill", "JDM", "indbs", "chaodoze", "haydenonline", "matyyy", "shanink", "roguepost", "chad", "emrox", "bitlyspreadsheets", "evansolomon", "milq", "twitterfeed", "tweetieapp", "massless", "khuckvale", "iminlikewithyou", "bumpasaurus@gmail.com", "htmiguel", "shorter", "eh270", "Joe", "twittergadget", "quotd", "scotster", "bitlypreview", "gavola", "banterability", "SocialScope", "justhunger", "d2kagw", "Sam@TheCellist42.com", "manderson_ohio@yahoo.com", "bensmithuk", "gamers600", "magicquotes", "tweetthis", "ubervu", "bitlybox", "toledorodney", "retaggr", "sedwot", "Kersny", "bcse", "andy@commadelimited.com", "sreenivas", "z33m", "urlpackager", "dpjanes", "philnash", "bassdread", "Siriquelle", "trixtur", "austinmoody", "tav", "ivansf", "jfredson", "xklark", "srijken", "ttomegachunk", "AsaBerd", "softronic", "bfo", "royboyjoytoy2", "danl", "noelb", "thingsinjars", "commadelimited", "wanderingstan", "tweetdeckapi", "littlesnapper", "tweetmeme", "jps", "droolr", "man0l", "portaldofregues", "jugo", "ktgy", "twitterrific", "elbertf", "shareaholic", "rayd", "kengeo", "api@zensify.com", "shoutnow", "teisam", "bguthrie", "besttechdeals", "zensify", "icyou", "dwellicious", "raven", "kcu", "najimi", "howardbaines", "fitzage", "domado16", "tc", "bradarsenault", "trendyobot", "powertwitter", "netpro2k", "concerthash", "twtcode", "lizzer", "mefeed", "zacwest", "nleveler", "emendappdev", "emendapp", "redbassett", "epage", "codemypantsoff", "Urgo", "calais", "outbrain", "razorfishca", "toutmontreal", "quietube", "twiggler", "samlii", "userfly", "abrahamlloyd", "carlsverre", "dunkjmcd", "rubenolsen", "quotablebooks", "4gemedia", "rival", "operaportal", "charitybuzz", "brant", "chartbeat", "tweeklyfm", "ronn", "concept52", "coupa", "owlread", "scottkarp", "linkbitch", "vodpod", "slashgear", "arnaudsj", "bootstrap", "earthclassmail", "unhub", "kiko", "coldkeyboard", "madnashua", "fabiopili", "kaspar", "larrynichols", "trustmap", "codepress", "tivowatcher", "rossimo", "twhirl", "shanzynga", "ghuru", "allgamblingnews", "betternet", "edwinwang", "jarred", "picnik", "thismoment", "zocdoc", "thetechmogul", "rajesh", "yotify", "brad", "northisup", "dsa", "endurancejunkies", "mybooo", "geekboys", "prit", "altosresearch", "haitai", "vinhkhanhit", "gymsnearby", "snuten", "inewsapp", "flipflopr", "plexium", "cotweet", "mytrade", "wertletheturtle", "joestump", "zimmeee", "dcinzona", "nagesh", "thinkphp", "dailyfill", "vijaypatil", "amarkova1982", "vdibart", "keineahnung", "roosterteeth", "masterbaytor", "eightlines", "boctor", "crunch", "kbychu", "modaira", "sysdomatic", "jeffreytierney", "neonova", "theschnaz", "ez", "feedmy", "twitterauction", "twikini", "johnnywander", "fdeguzman", "oriolfb", "taftech", "mressay", "tbbtsite", "pricegrab", "dbperry", "peraperaprv", "atrothman223", "kcbigring", "theseries", "docgroove", "connections", "mab", "james", "cweider", "mistabell", "glennpmn", "mecravem", "icssidearm", "lewiswebdev", "philipecoutinho", "rmo", "takkyun", "to", "tweetvisor", "bim", "smonev", "krisempire", "petercasier", "laitaowa", "LaptopHeaven", "ruggedelegance", "odtv", "laz75", "eight7teen", "tweetevents", "gamespress", "elfster", "bobbyjason", "matlab", "fanfou", "rakurakuinc", "yegle", "dativestudios", "articleslash", "jrcdude", "adslzone", "shortmoney", "cutethingsinbed", "nealkerickson", "tootairapp", "gksperling", "tzangms", "jparkers", "textcube", "cmccann", "linuxkido", "noviceprogram", "voltron43", "aroussi", "turkerz", "janbui", "stockshouter", "mozbox", "nibirutech", "brotchie", "darkua", "wsmith", "t24kurage", "bodu", "imified", "vgdotd", "chcf", "everynumberone", "tweetnewz", "catshelpdesk", "simplybox", "dailyroads", "cookbot", "anirig", "gamesbond", "invernizzi", "fekaylius", "changents", "vanmacguy", "trendytweetsbitly", "adiumofficial", "webmeme", "leedumond", "jyro", "michaeld", "nsls", "crypto", "karthicksethu", "petermorano", "glipt", "rubayeet", "cutiethread", "insane", "pivotaltweed", "AdamHertz", "merchants", "industrie", "kaku1969", "xtw", "eanders", "discocreative", "astexception", "raineandhorne", "sparwelt", "kabayan", "image01", "tweetquip", "ischa", "godrops", "360works", "pasteshot", "jfinegold", "textlogic", "jmgtan", "aaronrussell", "iwasinturkey", "mattpowell", "captainstupid", "jove", "timanrebel", "delicious", "danielrehner", "aaldrich", "mychurch", "pareshvarde", "shrisha", "earlyshen", "dailymile", "hashads", "jopie", "feedalizr", "kennstdueinen", "md117", "cliqz", "newrelic", "milanzajic", "inkzee", "mikecosentino", "twilightaktuell", "rjae", "kelvinator44", "jobomix", "vitalik", "feedagg", "changcommaalex", "tzah", "24ur", "jobcast", "toratto", "talkwit", "metricstaxi", "nzeltzer", "alexweber", "goodwill", "streetfire", "jurai", "cpgroups", "emptyspaceads", "googlenewsjp", "craigae", "2night", "eoxlive", "kijijicanada", "wiglu", "openaccessweek", "anyclip", "dz0ny", "bawigga", "spazcore", "spazcer", "kevinmarks", "casarotti", "dpctest", "efusionid", "annstark", "cristdrive", "r2d2", "elwoodicious", "infopirat", "snoxd", "codejunky1", "sp33dfr34ksd", "jumpinggrendel", "optifyshorten", "oodlelistings", "blainetology", "iproperty", "twtbks", "prashantm", "drry", "chango", "jreynar", "rdaum", "kikinshare", "odinjobs", "wegame", "twse", "beatter", "launchset", "lyricskeeper", "wolfgang", "clickability", "yamli", "alexbosworth", "cashiesuktest", "meateam", "abartling", "fresheneesz", "dangerbell", "proxifeed", "twatme", "boyplankton", "wbio", "skychirp", "slideshare", "keepertestaccount", "valerietaesch", "splab", "gameproapi", "chssystems", "gobyo", "altcanvas", "ankitparekh", "dylanreeve", "sponsorlab", "socialdeck", "denisgurski", "boblog", "dprothro", "syberplanet", "marcparadise", "moneymakerhyip", "chrisedgemon", "camthompson", "nassersala", "meloco32", "ibiboisms", "mesodata", "jewishtimes", "izual", "infosage", "wac", "googlebooks", "buddybrain", "monk", "krishnan", "dothetest", "aktnow", "solmeliacuba" ], "version": 1.0 }, "3j4ir4": { "calais": {}, "calaisId": "", "calaisResolutions": {}, "contentLength": "", "contentType": "text/html; charset=ISO-8859-1", "exif": {}, "globalHash": "3j4ir4", "hash": "3j4ir4", "htmlMetaDescription": "", "htmlMetaKeywords": "", "htmlTitle": "Google", "id3": {}, "keyword": "", "keywords": [], "longUrl": "http://google.com/", "metacarta": [], "mirrorUrl": "", "shortenedByUser": "bitly", "surbl": 0, "thumbnail": { "large": "http://s.bit.ly/bitly/3j4ir4/thumbnail_large.png", "medium": "http://s.bit.ly/bitly/3j4ir4/thumbnail_medium.png", "small": "http://s.bit.ly/bitly/3j4ir4/thumbnail_small.png" }, "userHash": "", "users": [ "kortina", "jay", "bitlybookmarklet", "runcible", "ideacol", "spol", "adrian33", "debajit", "follow", "cosmic", "bitlyspreadsheets", "bitlyapidemo", "mskadu", "betons42", "colbypalmer", "derekpcollins", "enricus", "twitchboard", "massless", "grader", "nickware", "GeekLad", "bumpasaurus@gmail.com", "wac", "planetsdb", "bitlypreview", "twittergadget", "htmiguel", "shorter", "movies", "books", "tunes", "amelnikova", "Sam@TheCellist42.com", "samferry", "tboid", "manderson_ohio@yahoo.com", "benshead", "tbc", "gabe", "shmooved", "tweetieapp", "tweetthis", "mannincw", "newsx", "thefireus", "bitlybox", "chirp", "ashit@jooners.com", "z33m", "urlpackager", "philnash", "sreenivas", "lagiator", "kissmetrics", "matthewfl", "bobbyw", "cotweet", "alexannese", "richardxthripp", "tanel", "jfredson", "lynettechandler", "louismirra", "mattrobs", "stillframe", "ttomegachunk", "Inverted", "falicon", "royboyjoytoy2", "psifertex", "Dien", "tweetdeckapi", "dropiodev", "jasonkhanlar", "tweetalink", "commadelimited", "bck", "bigbig", "cspath", "bitlytextmate", "addtoany", "fitfindr", "adenner", "maximz2005", "grigs", "spipeshop", "omgig", "kortina101", "c4rves", "thingsinjars", "matthewfallshaw", "bguthrie", "powertwitter", "reduxo", "tweettrackjs", "loucypher", "nullwaver", "troynt", "bseanvt", "tc", "theonion", "dahammer", "twtcode", "mefeed", "emendapp", "emendappdev", "outbrain", "redbassett", "calais", "eurleif", "digomatic", "mc", "garno", "obbyyoyo", "lollapalooza", "twitscoop", "carlsverre", "ktgy", "cstejerean", "4gemedia", "zakgrim", "owlread", "ratsgoboom", "jayhickey", "emojitales", "ringlerun", "kupona", "renjithdas", "copress", "larrynichols", "bitlify", "pathfinder", "searchengineland", "raaartrex", "unhub", "twhirl", "rossimo", "cvertex", "spam4aj", "rrs", "mattietk", "jfdurocher", "josephscott", "imharoon2003", "pope52", "alexmg", "askyourtango", "rajesh", "tejas", "rubsta", "completelynovel", "hi675", "collegejersey", "altosresearch", "haitai", "gymsnearby", "artfire", "vision2000", "ivansf", "polymar", "anadeau", "wealltv", "arc90", "demnow", "labria", "wertletheturtle", "kiwiscanfly", "oliverash", "alexcvo", "dcinzona", "uservoice", "bwillums", "zupadupa", "feedmy", "corinne", "askme", "twikini", "chango", "mp3bible", "agqnetwork", "taftech", "atrothman223", "tbbtsite", "firerabbit", "spbose", "spellrus", "fn7", "bsd4pl", "groupcard", "monitter", "cweider", "mistabell", "ayn", "miki", "twitterrific", "bim", "seb2point0", "moomerman", "avilasexy", "zachera", "ksharkey", "obijan", "lostfilm", "magicscientist", "hmi", "ruggedelegance", "mogeethis", "nishantmodak", "talagy1", "delicious", "nickt", "opccalendar", "brightbold", "samuel", "gnintendo", "aurorafeint", "pkumat", "spinnaker", "opinmind", "drawohara", "ideelitest", "voltron43", "jolleyjoe", "orionlee", "fastdove", "stockshouter", "scrabbly", "darkua", "thangamkvp", "kanjifandom", "360hubs", "vivocom", "jepeng", "joemccann", "allynbauer", "destroytwitter", "medium", "bpark08", "twitknights", "adiumofficial", "leedumond", "confluxgroup", "40limbo", "cwalcott", "karthicksethu", "pron", "planettagger", "switchonthecode", "izeasponsoredtweets", "merchants", "humptydumptyegg", "user121", "andav", "cutiethread", "vmarquez", "hopkinsju", "tweetsimple", "saasbit", "aaad", "gohewitt", "yusuke0927", "vinced45", "fbmore", "northisup", "tt01311", "bleetbox", "gyokojp", "dentest", "headlineshirts", "gethighnote", "hashads", "racevine", "kelvinator44", "ajc308", "tweetw", "ibanezyaya", "abiko", "goseedo", "tzah", "gimmeanswers", "twitiq", "lehrblogger", "metricstaxi", "nzeltzer", "addly", "scph", "jrcdude", "mderk", "pullus", "googlenewsjp", "rjinla", "smithworx", "antiuser", "injeqt", "lovelykby", "wiglu", "demandspot", "spazcore", "ka2hiro", "namnum", "sventures", "twittersales", "buttreygoodness", "nagesh", "tribescape", "ohun002", "orsiso", "orymate", "yossilac", "klango", "sp33dfr34ksd", "tracksite", "tonysteward", "davidwalshblog", "ramses", "rdaum", "ookong", "pieceoflena", "wowgather", "caribryne", "alexbosworth", "apoenam", "keepertestaccount", "slideshare", "splab", "ankitparekh", "xtips", "hexmode", "ryanl229", "syberplanet", "gotwalt", "othman", "bunte", "tmeryu", "e", "pjstadig", "timi", "retweetjs", "sobees" ], "version": 1.0 } }, "statusCode": "OK" }
|
@@ -0,0 +1 @@
|
|
1
|
+
{ "errorCode": 0, "errorMessage": "", "results": { "3j4ir4": { "calais": {}, "calaisId": "", "calaisResolutions": {}, "contentLength": "", "contentType": "text/html; charset=ISO-8859-1", "exif": {}, "globalHash": "3j4ir4", "hash": "3j4ir4", "htmlMetaDescription": "", "htmlMetaKeywords": "", "htmlTitle": "Google", "id3": {}, "keyword": "", "keywords": [], "longUrl": "http://google.com/", "metacarta": [], "mirrorUrl": "", "shortenedByUser": "bitly", "surbl": 0, "thumbnail": { "large": "http://s.bit.ly/bitly/3j4ir4/thumbnail_large.png", "medium": "http://s.bit.ly/bitly/3j4ir4/thumbnail_medium.png", "small": "http://s.bit.ly/bitly/3j4ir4/thumbnail_small.png" }, "userHash": "", "users": [ "kortina", "jay", "bitlybookmarklet", "runcible", "ideacol", "spol", "adrian33", "debajit", "follow", "cosmic", "bitlyspreadsheets", "bitlyapidemo", "mskadu", "betons42", "colbypalmer", "derekpcollins", "enricus", "twitchboard", "massless", "grader", "nickware", "GeekLad", "bumpasaurus@gmail.com", "wac", "planetsdb", "bitlypreview", "twittergadget", "htmiguel", "shorter", "movies", "books", "tunes", "amelnikova", "Sam@TheCellist42.com", "samferry", "tboid", "manderson_ohio@yahoo.com", "benshead", "tbc", "gabe", "shmooved", "tweetieapp", "tweetthis", "mannincw", "newsx", "thefireus", "bitlybox", "chirp", "ashit@jooners.com", "z33m", "urlpackager", "philnash", "sreenivas", "lagiator", "kissmetrics", "matthewfl", "bobbyw", "cotweet", "alexannese", "richardxthripp", "tanel", "jfredson", "lynettechandler", "louismirra", "mattrobs", "stillframe", "ttomegachunk", "Inverted", "falicon", "royboyjoytoy2", "psifertex", "Dien", "tweetdeckapi", "dropiodev", "jasonkhanlar", "tweetalink", "commadelimited", "bck", "bigbig", "cspath", "bitlytextmate", "addtoany", "fitfindr", "adenner", "maximz2005", "grigs", "spipeshop", "omgig", "kortina101", "c4rves", "thingsinjars", "matthewfallshaw", "bguthrie", "powertwitter", "reduxo", "tweettrackjs", "loucypher", "nullwaver", "troynt", "bseanvt", "tc", "theonion", "dahammer", "twtcode", "mefeed", "emendapp", "emendappdev", "outbrain", "redbassett", "calais", "eurleif", "digomatic", "mc", "garno", "obbyyoyo", "lollapalooza", "twitscoop", "carlsverre", "ktgy", "cstejerean", "4gemedia", "zakgrim", "owlread", "ratsgoboom", "jayhickey", "emojitales", "ringlerun", "kupona", "renjithdas", "copress", "larrynichols", "bitlify", "pathfinder", "searchengineland", "raaartrex", "unhub", "twhirl", "rossimo", "cvertex", "spam4aj", "rrs", "mattietk", "jfdurocher", "josephscott", "imharoon2003", "pope52", "alexmg", "askyourtango", "rajesh", "tejas", "rubsta", "completelynovel", "hi675", "collegejersey", "altosresearch", "haitai", "gymsnearby", "artfire", "vision2000", "ivansf", "polymar", "anadeau", "wealltv", "arc90", "demnow", "labria", "wertletheturtle", "kiwiscanfly", "oliverash", "alexcvo", "dcinzona", "uservoice", "bwillums", "zupadupa", "feedmy", "corinne", "askme", "twikini", "chango", "mp3bible", "agqnetwork", "taftech", "atrothman223", "tbbtsite", "firerabbit", "spbose", "spellrus", "fn7", "bsd4pl", "groupcard", "monitter", "cweider", "mistabell", "ayn", "miki", "twitterrific", "bim", "seb2point0", "moomerman", "avilasexy", "zachera", "ksharkey", "obijan", "lostfilm", "magicscientist", "hmi", "ruggedelegance", "mogeethis", "nishantmodak", "talagy1", "delicious", "nickt", "opccalendar", "brightbold", "samuel", "gnintendo", "aurorafeint", "pkumat", "spinnaker", "opinmind", "drawohara", "ideelitest", "voltron43", "jolleyjoe", "orionlee", "fastdove", "stockshouter", "scrabbly", "darkua", "thangamkvp", "kanjifandom", "360hubs", "vivocom", "jepeng", "joemccann", "allynbauer", "destroytwitter", "medium", "bpark08", "twitknights", "adiumofficial", "leedumond", "confluxgroup", "40limbo", "cwalcott", "karthicksethu", "pron", "planettagger", "switchonthecode", "izeasponsoredtweets", "merchants", "humptydumptyegg", "user121", "andav", "cutiethread", "vmarquez", "hopkinsju", "tweetsimple", "saasbit", "aaad", "gohewitt", "yusuke0927", "vinced45", "fbmore", "northisup", "tt01311", "bleetbox", "gyokojp", "dentest", "headlineshirts", "gethighnote", "hashads", "racevine", "kelvinator44", "ajc308", "tweetw", "ibanezyaya", "abiko", "goseedo", "tzah", "gimmeanswers", "twitiq", "lehrblogger", "metricstaxi", "nzeltzer", "addly", "scph", "jrcdude", "mderk", "pullus", "googlenewsjp", "rjinla", "smithworx", "antiuser", "injeqt", "lovelykby", "wiglu", "demandspot", "spazcore", "ka2hiro", "namnum", "sventures", "twittersales", "buttreygoodness", "nagesh", "tribescape", "ohun002", "orsiso", "orymate", "yossilac", "klango", "sp33dfr34ksd", "tracksite", "tonysteward", "davidwalshblog", "ramses", "rdaum", "ookong", "pieceoflena", "wowgather", "caribryne", "alexbosworth", "apoenam", "keepertestaccount", "slideshare", "splab", "ankitparekh", "xtips", "hexmode", "ryanl229", "syberplanet", "gotwalt", "othman", "bunte", "tmeryu", "e", "pjstadig", "timi", "retweetjs", "sobees" ], "version": 1.0 } }, "statusCode": "OK" }
|
@@ -0,0 +1 @@
|
|
1
|
+
{ "errorCode": 0, "errorMessage": "", "results": { "clicks": 2644, "hash": "31IqMl", "referrers": { "": { "/index.html": 1, "None": 5, "direct": 2003 }, "api.bit.ly": { "/shorten": 2 }, "benny-web": { "/jseitel/bitly/install.html": 1 }, "bit.ly": { "/": 3, "/app/demos/info.html": 71, "/app/demos/stats.html": 305, "/app/demos/statsModule.html": 2, "/info/15DlK": 1, "/info/27I9Ll": 1, "/info/31IqMl": 2, "/info/hic4E": 1 }, "code.google.com": { "/p/bitly-api/wiki/ApiDocumentation": 1 }, "dev.chartbeat.com": { "/static/bitly.html": 1 }, "dev.unhub.com": { "/pnG8/": 1 }, "klout.net": { "/profiledetail.php": 1 }, "localhost": { "/New Folder/test1.php": 1 }, "mail.google.com": { "/mail/": 1 }, "partners.bit.ly": { "/td": 8 }, "powertwitter.me": { "/": 1 }, "quietube.com": { "/getbitly.php": 1 }, "search.twitter.com": { "/search": 3 }, "sfbay.craigslist.org": { "/sfc/rnr/891043787.html": 8 }, "spreadsheets.google.com": { "/ccc": 23, "/ccc2": 1 }, "strat.corp.advertising.com": { "/brandmaker/bitly.php": 4 }, "taggytext.com": { "/ganja": 1 }, "twitter.com": { "/": 3, "/SuperTestAcct": 1, "/TattoosOn": 1, "/WilliamWoods": 1, "/home": 6, "/ibiboisms": 2, "/kshanns": 1, "/matraji": 1, "/nathanfolkman": 1, "/pantaleonescu": 1, "/rubyisbeautiful": 1, "/williamwoods": 1 }, "twitturls.com": { "/": 21 }, "twitturly.com": { "": 17, "/urlinfo/url/2168a5e81280538cdbf6ad4c4ab019db/": 1 }, "url.ly": { "/": 19, "/info/27I9Ll": 1, "/info/31IqMl": 3 }, "urly.local:3600": { "/": 7 }, "v2.blogg.no": { "/test.cfm": 1 }, "www.facebook.com": { "/home.php": 1 }, "www.longurlplease.com": { "/": 3 }, "www.microblogbuzz.com": { "": 5 } } }, "statusCode": "OK" }
|
@@ -0,0 +1 @@
|
|
1
|
+
{ "errorCode": 1, "errorMessage": "Test error", "statusCode": "ERROR" }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phil Nash
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-08-22 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -46,7 +46,18 @@ files:
|
|
46
46
|
- Manifest
|
47
47
|
- Rakefile
|
48
48
|
- README.txt
|
49
|
-
- test/
|
49
|
+
- test/bitly/test_client.rb
|
50
|
+
- test/bitly/test_url.rb
|
51
|
+
- test/bitly/test_utils.rb
|
52
|
+
- test/fixtures/cnn.json
|
53
|
+
- test/fixtures/cnn_and_google.json
|
54
|
+
- test/fixtures/expand_cnn.json
|
55
|
+
- test/fixtures/expand_cnn_and_google.json
|
56
|
+
- test/fixtures/google_and_cnn_info.json
|
57
|
+
- test/fixtures/google_info.json
|
58
|
+
- test/fixtures/google_stats.json
|
59
|
+
- test/fixtures/shorten_error.json
|
60
|
+
- test/test_helper.rb
|
50
61
|
has_rdoc: true
|
51
62
|
homepage: http://github.com/philnash/bitly
|
52
63
|
licenses: []
|
@@ -84,5 +95,4 @@ test_files:
|
|
84
95
|
- test/bitly/test_client.rb
|
85
96
|
- test/bitly/test_url.rb
|
86
97
|
- test/bitly/test_utils.rb
|
87
|
-
- test/test_bitly.rb
|
88
98
|
- test/test_helper.rb
|
data/test/test_bitly.rb
DELETED
@@ -1,81 +0,0 @@
|
|
1
|
-
# require 'test/unit'
|
2
|
-
# require 'rubygems'
|
3
|
-
# require 'shoulda'
|
4
|
-
# require 'flexmock'
|
5
|
-
# require 'bitly'
|
6
|
-
#
|
7
|
-
# class TestBitly < Test::Unit::TestCase
|
8
|
-
#
|
9
|
-
# context "with a bitly client" do
|
10
|
-
# setup do
|
11
|
-
# @api_key = 'test_key'
|
12
|
-
# @login = 'test_account'
|
13
|
-
# @bitly = Bitly.new(@login,@api_key)
|
14
|
-
# end
|
15
|
-
#
|
16
|
-
# context "shortening" do
|
17
|
-
#
|
18
|
-
# context "a single url" do
|
19
|
-
# setup do
|
20
|
-
#
|
21
|
-
# end
|
22
|
-
# def test_returns_single_short_url
|
23
|
-
# url = @bitly.shorten("http://cnn.com")
|
24
|
-
# assert_kind_of Bitly::Url, url
|
25
|
-
# assert_equal "http://cnn.com", url.long_url
|
26
|
-
# assert_equal "http://bit.ly/15DlK", url.short_url
|
27
|
-
# end
|
28
|
-
#
|
29
|
-
# def test_shortens_multiple_urls
|
30
|
-
# urls = @bitly.shorten(["http://cnn.com","http://google.com"])
|
31
|
-
# assert_equal "http://cnn.com", urls[0].long_url
|
32
|
-
# assert_equal "http://bit.ly/15DlK", urls[0].short_url
|
33
|
-
# assert_equal "http://google.com", urls[1].long_url
|
34
|
-
# assert_equal "http://bit.ly/11etr", urls[1].short_url
|
35
|
-
# end
|
36
|
-
#
|
37
|
-
# def test_can_shorten_a_url_with_parameters
|
38
|
-
# url = @bitly.shorten("http://www.google.com/search?hl=en&q=url&btnG=Google+Search&aq=f&oq=")
|
39
|
-
# assert_kind_of Bitly::Url, url
|
40
|
-
# assert_equal "http://www.google.com/search?hl=en&q=url&btnG=Google+Search&aq=f&oq=", url.long_url
|
41
|
-
# assert_equal "http://bit.ly/NqK6i", url.short_url
|
42
|
-
# end
|
43
|
-
#
|
44
|
-
# def test_returns_a_long_url
|
45
|
-
# urls = @bitly.expand(["2bYgqR","1RmnUT"])
|
46
|
-
# assert_kind_of Bitly::Url, urls[0]
|
47
|
-
# assert_equal "http://cnn.com", urls[0].long_url
|
48
|
-
# assert_equal "2bYgqR", urls[0].hash
|
49
|
-
# assert_equal "http://google.com", urls[1].long_url
|
50
|
-
# assert_equal "1RmnUT", urls[1].hash
|
51
|
-
# url = @bitly.expand("http://bit.ly/wQaT")
|
52
|
-
# assert_kind_of Bitly::Url, url
|
53
|
-
# assert_equal "http://bit.ly/wQaT", url.short_url
|
54
|
-
# assert_equal "http://google.com/", url.long_url
|
55
|
-
# assert_equal "wQaT", url.hash
|
56
|
-
# url2 = @bitly.expand("wQaT")
|
57
|
-
# assert_kind_of Bitly::Url, url2
|
58
|
-
# assert_equal "wQaT", url2.hash
|
59
|
-
# assert_equal "http://bit.ly/wQaT", url2.short_url
|
60
|
-
# assert_equal "http://google.com/", url2.long_url
|
61
|
-
# end
|
62
|
-
#
|
63
|
-
# # def test_returns_keyword_url
|
64
|
-
# # #kind of ghetto test but we need it to be different every time
|
65
|
-
# # require 'digest/sha1'
|
66
|
-
# # keyword = Digest::SHA1.hexdigest(DateTime.now.to_s)
|
67
|
-
# #
|
68
|
-
# # url = @bitly.shorten("http://google.com", :keyword => keyword)
|
69
|
-
# # assert_equal url.short_keyword_url, "http://bit.ly/#{keyword}"
|
70
|
-
# # end
|
71
|
-
#
|
72
|
-
# def test_returns_error_on_existing_keyword
|
73
|
-
# keyword = 'apple'
|
74
|
-
# assert_raise BitlyError do
|
75
|
-
# @bitly.shorten("http://apple.com/itunes", :keyword => keyword)
|
76
|
-
# end
|
77
|
-
# end
|
78
|
-
#
|
79
|
-
#
|
80
|
-
#
|
81
|
-
# end
|