Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: octokit/octokit.rb
base: cb7d5480944229e1a5ddfa9d1113903628765584
...
head fork: octokit/octokit.rb
  • 18 commits
  • 37 files changed
  • 0 commit comments
  • 2 contributors
Showing with 2,878 additions and 27 deletions.
  1. +64 −0 README.markdown
  2. +0 −18 README.rdoc
  3. +12 −6 Rakefile
  4. +1 −0  VERSION
  5. +5 −0 changelog.markdown
  6. +134 −0 lib/octopussy.rb
  7. +393 −0 lib/octopussy/client.rb
  8. +33 −0 lib/octopussy/repo.rb
  9. +10 −0 test/fixtures/blob.json
  10. +6 −0 test/fixtures/branches.json
  11. +1 −0  test/fixtures/close_issue.json
  12. +1 −0  test/fixtures/collaborators.json
  13. +1 −0  test/fixtures/comment.json
  14. +1 −0  test/fixtures/emails.json
  15. +3 −0  test/fixtures/followers.json
  16. +27 −0 test/fixtures/full_user.json
  17. +14 −0 test/fixtures/issue.json
  18. +50 −0 test/fixtures/issues.json
  19. +1 −0  test/fixtures/keys.json
  20. +1 −0  test/fixtures/labels.json
  21. +1 −0  test/fixtures/languages.json
  22. +26 −0 test/fixtures/network.json
  23. +1 −0  test/fixtures/network_data.json
  24. +109 −0 test/fixtures/network_meta.json
  25. +1 −0  test/fixtures/open_issue.json
  26. +7 −0 test/fixtures/raw_git_data.json
  27. +1 −0  test/fixtures/reopen_issue.json
  28. +14 −0 test/fixtures/repo.json
  29. +452 −0 test/fixtures/repo_search.json
  30. +830 −0 test/fixtures/repos.json
  31. +44 −0 test/fixtures/search.json
  32. +8 −0 test/fixtures/tags.json
  33. +140 −0 test/fixtures/trees.json
  34. +16 −0 test/fixtures/user.json
  35. +36 −1 test/helper.rb
  36. +392 −2 test/test_octopussy.rb
  37. +42 −0 test/test_repo.rb
View
64 README.markdown
@@ -0,0 +1,64 @@
+
+# octopussy
+
+<img src='http://upload.wikimedia.org/wikipedia/en/b/bb/007Octopussyposter.jpg' style='float: right; margin: 0 0 10px 10px'/>
+
+Simple Ruby wrapper for the GitHub v2 API.
+
+## Installation
+
+ sudo gem install octopussy
+
+## Some examples
+
+### Show a user
+
+ Octopussy.user('pengwynn')
+ => <#Hashie::Mash blog="http://wynnnetherland.com" company="Orrka" created_at="2008/02/25 10:24:19 -0800" email="wynn.netherland@gmail.com" followers_count=21 following_count=55 id=865 location="Dallas, TX" login="pengwynn" name="Wynn Netherland" public_gist_count=4 public_repo_count=16>
+
+### Show who a user follows
+
+ Octopussy.following('pengwynn')
+ => ["cglee", "bryansray", "rails", "zachinglis", "wycats", "obie", "mully", "squeejee", "jderrett", "Shopify", "ReinH", "technoweenie", "errfree", "defunkt", "joshsusser", "hashrocket", "newbamboo", "bigtiger", "github", "jamis", "jeresig", "thoughtbot", "therealadam", "jnunemaker", "seaofclouds", "choan", "llimllib", "kwhinnery", "marshall", "handcrafted", "adamstac", "jashkenas", "dan", "remy", "hayesdavis", "documentcloud", "imathis", "mdeiters", "njonsson", "asenchi", "mattsa", "marclove", "webiest", "brogers", "polomasta", "stephp", "mchelen", "piyush", "davidnorth", "rmetzler", "jferris", "madrobby", "zh", "erikvold", "desandro"]
+
+## Working with repositories
+
+For convenience, methods that require a repo argument may be passed in any of the following forms
+
+* "pengwynn/linked"
+* {:username => 'pengwynn', :name => 'linkedin'}
+* {:username => 'pengwynn', :repo => 'linkedin'}
+* instance of Repo
+
+### Show a repo
+
+ Octopussy.repo("pengwynn/linkedin")
+ => <#Hashie::Mash description="Ruby wrapper for the LinkedIn API" fork=false forks=1 homepage="http://bit.ly/ruby-linkedin" name="linkedin" open_issues=2 owner="pengwynn" private=false url="http://github.com/pengwynn/linkedin" watchers=36>
+
+## Authenticated requests
+
+Some methods require authentication so you'll need to pass a login and an api_token. You can find your GitHub API token on your [account page](https://github.com/account)
+
+ client = Octopussy::Client.new(:login => 'pengwynn', :token => 'OU812')
+ client.follow!('adamstac')
+
+Read the full [docs](http://rdoc.info/projects/pengwynn/octopussy) or check out the [examples](http://github.com/pengwynn/octopussy/tree/master/examples)
+
+## Note on Patches/Pull Requests
+
+* Fork the project.
+* Make your feature addition or bug fix.
+* Add tests for it. This is important so I don't break it in a
+ future version unintentionally.
+* Commit, do not mess with rakefile, version, or history.
+ (if you want to have your own version, that is fine but
+ bump version in a commit by itself I can ignore when I pull)
+* Send me a pull request. Bonus points for topic branches.
+
+## Credits
+
+Octopussy is inspired by [Octopi](http://github.com/fcoury/octopi) and aims to be a lightweight, less active-resourcey alternative.
+
+## Copyright
+
+Copyright (c) 2009 [Wynn Netherland](http://wynnnetherland.com), [Adam Stacoviak](http://adamstacoviak.com/). See LICENSE for details.
View
18 README.rdoc
@@ -1,18 +0,0 @@
-= octopussy
-
-Description goes here.
-
-== Note on Patches/Pull Requests
-
-* Fork the project.
-* Make your feature addition or bug fix.
-* Add tests for it. This is important so I don't break it in a
- future version unintentionally.
-* Commit, do not mess with rakefile, version, or history.
- (if you want to have your own version, that is fine but
- bump version in a commit by itself I can ignore when I pull)
-* Send me a pull request. Bonus points for topic branches.
-
-== Copyright
-
-Copyright (c) 2009 Wynn Netherland. See LICENSE for details.
View
18 Rakefile
@@ -5,13 +5,19 @@ begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "octopussy"
- gem.summary = %Q{TODO: one-line summary of your gem}
- gem.description = %Q{TODO: longer description of your gem}
- gem.email = "wynn@squeejee.com"
+ gem.summary = %Q{Simple wrapper for the GitHub API}
+ gem.description = %Q{Simple wrapper for the GitHub API v2}
+ gem.email = "wynn.netherland@gmail.com"
gem.homepage = "http://github.com/pengwynn/octopussy"
- gem.authors = ["Wynn Netherland"]
- gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
+ gem.authors = ["Wynn Netherland", "Adam Stacoviak"]
+
+ gem.add_dependency('hashie', '~> 0.1.3')
+ gem.add_dependency('httparty', '~> 0.4.5')
+
+ gem.add_development_dependency('thoughtbot-shoulda', '>= 2.10.1')
+ gem.add_development_dependency('jnunemaker-matchy', '0.4.0')
+ gem.add_development_dependency('mocha', '0.9.4')
+ gem.add_development_dependency('fakeweb', '>= 1.2.5')
end
Jeweler::GemcutterTasks.new
rescue LoadError
View
1  VERSION
@@ -0,0 +1 @@
+0.0.1
View
5 changelog.markdown
@@ -0,0 +1,5 @@
+# Changelog
+
+## 0.0.1 Initial version
+
+* GitHub v2 API complete
View
134 lib/octopussy.rb
@@ -0,0 +1,134 @@
+require 'rubygems'
+
+gem 'hashie', '~> 0.1.3'
+require 'hashie'
+
+gem 'httparty', '~> 0.4.5'
+require 'httparty'
+
+directory = File.expand_path(File.dirname(__FILE__))
+
+Hash.send :include, Hashie::HashExtensions
+
+
+module Octopussy
+ class OctopussyError < StandardError
+ attr_reader :data
+
+ def initialize(data)
+ @data = data
+ super
+ end
+ end
+
+ class RateLimitExceeded < StandardError; end
+ class Unauthorized < StandardError; end
+ class General < OctopussyError; end
+
+ class Unavailable < StandardError; end
+ class InformOctopussy < StandardError; end
+ class NotFound < StandardError; end
+
+
+ def self.search_users(q)
+ Client.new.search_users(q)
+ end
+
+ def self.user(login)
+ Client.new.user(login)
+ end
+
+ def self.followers(login)
+ Client.new.followers(login)
+ end
+
+ def self.following(login)
+ Client.new.following(login)
+ end
+
+ def self.follows?(username, target)
+ Client.new.follows?(username, target)
+ end
+
+ def self.watched(login)
+ Client.new.watched(login)
+ end
+
+ # Issues
+
+ def self.search_issues(repo, state, q)
+ Client.new.search_issues(repo, state, q)
+ end
+
+ # repo, state
+ def self.issues(repo, state)
+ Client.new.issues(repo, state)
+ end
+
+ # repo, id
+ def self.issue(repo, id)
+ Client.new.issue(repo, id)
+ end
+
+ # Repos
+
+ def self.search_repos(q)
+ Client.new.search_repos(q)
+ end
+
+ def self.repo(repo)
+ Client.new.repo(repo)
+ end
+
+ def self.list_repos(username)
+ Client.new.list_repos(username)
+ end
+
+ def self.collaborators(repo)
+ Client.new.collaborators(repo)
+ end
+
+ def self.network(repo)
+ Client.new.network(repo)
+ end
+
+ def self.languages(repo)
+ Client.new.languages(repo)
+ end
+
+ def self.tags(repo)
+ Client.new.tags(repo)
+ end
+
+ def self.branches(repo)
+ Client.new.branches(repo)
+ end
+
+ # Network Meta
+
+ def self.network_meta(repo)
+ Client.new.network_meta(repo)
+ end
+
+ def self.network_data(repo, nethash)
+ Client.new.network_data(repo, nethash)
+ end
+
+ # Trees
+
+ def self.tree(repo, sha)
+ Client.new.tree(repo, sha)
+ end
+
+ def self.blob(repo, sha, path)
+ Client.new.blob(repo, sha, path)
+ end
+
+ def self.raw(repo, sha)
+ Client.new.raw(repo, sha)
+ end
+
+end
+
+require File.join(directory, 'octopussy', 'repo')
+require File.join(directory, 'octopussy', 'client')
View
393 lib/octopussy/client.rb
@@ -0,0 +1,393 @@
+require 'cgi'
+module Octopussy
+ class Client
+ include HTTParty
+ format :json
+ base_uri "http://github.com/api/v2/json"
+
+ attr_reader :login, :token
+
+ # :login => 'pengwynn', :token => 'your_github_api_key'
+ def initialize(auth={})
+ @login = auth[:login]
+ @token = auth[:token]
+ end
+
+ def search_users(q)
+ q = CGI.escape(q)
+ response = self.class.get("/user/search/#{q}")
+ handle_response(response)
+ Hashie::Mash.new(response).users
+ end
+
+ def user(login=self.login)
+ response = self.class.get("/user/show/#{login}", :query => auth_params)
+ handle_response(response)
+ Hashie::Mash.new(response).user
+ end
+
+
+ def update_user(values={})
+ response = self.class.post("/user/show/#{self.login}", :query => auth_params, :body => {:values => values})
+ handle_response(response)
+ Hashie::Mash.new(response).user
+ end
+
+ def followers(login=self.login)
+ response = self.class.get("/user/show/#{login}/followers")
+ handle_response(response)
+ Hashie::Mash.new(response).users
+ end
+
+ def following(login=self.login)
+ response = self.class.get("/user/show/#{login}/following")
+ handle_response(response)
+ Hashie::Mash.new(response).users
+ end
+
+ def follow!(username)
+ response = self.class.post("/user/follow/#{username}", :query => auth_params)
+ handle_response(response)
+ Hashie::Mash.new(response).users
+ end
+
+ def unfollow!(username)
+ response = self.class.post("/user/unfollow/#{username}", :query => auth_params)
+ handle_response(response)
+ Hashie::Mash.new(response).users
+ end
+
+ def follows?(*args)
+ target = args.pop
+ username = args.first
+ username ||= self.login
+ return if username.nil?
+ self.following(username).include?(target)
+ end
+
+ def watched(login=self.login)
+ response = self.class.get("/repos/watched/#{login}")
+ handle_response(response)
+ Hashie::Mash.new(response).repositories
+ end
+
+ def emails
+ response = self.class.get("/user/emails", :query => auth_params)
+ handle_response(response)
+ Hashie::Mash.new(response).emails
+ end
+
+ def add_email(email)
+ response = self.class.post("/user/email/add", :query => auth_params, :body => {:email => email})
+ handle_response(response)
+ Hashie::Mash.new(response).emails
+ end
+
+ def remove_email(email)
+ response = self.class.post("/user/email/remove", :query => auth_params, :body => {:email => email})
+ handle_response(response)
+ Hashie::Mash.new(response).emails
+ end
+
+ def keys
+ response = self.class.get("/user/keys", :query => auth_params)
+ handle_response(response)
+ Hashie::Mash.new(response).public_keys
+ end
+
+ def add_key(title, key)
+ response = self.class.post("/user/key/add", :query => auth_params, :body => {:title => title, :key => key})
+ handle_response(response)
+ Hashie::Mash.new(response).public_keys
+ end
+
+ def remove_key(id)
+ response = self.class.post("/user/key/remove", :query => auth_params, :body => {:id => id})
+ handle_response(response)
+ Hashie::Mash.new(response).public_keys
+ end
+
+ # Issues
+
+ def search_issues(repo, state, q)
+ repo = Repo.new(repo)
+ response = self.class.get("/issues/search/#{repo.username}/#{repo.name}/#{state}/#{q}")
+ handle_response(response)
+ Hashie::Mash.new(response).issues
+ end
+
+ def issues(repo, state)
+ repo = Repo.new(repo)
+ response = self.class.get("/issues/list/#{repo.username}/#{repo.name}/#{state}")
+ handle_response(response)
+ Hashie::Mash.new(response).issues
+ end
+
+ def issue(repo, id)
+ repo = Repo.new(repo)
+ response = self.class.get("/issues/show/#{repo.username}/#{repo.name}/#{id}")
+ handle_response(response)
+ Hashie::Mash.new(response).issue
+ end
+
+ def open_issue(repo, title, body)
+ repo = Repo.new(repo)
+ response = self.class.post("/issues/open/#{repo.username}/#{repo.name}", :body => {:title => title, :body => body})
+ handle_response(response)
+ Hashie::Mash.new(response).issue
+ end
+
+ def close_issue(repo, number)
+ repo = Repo.new(repo)
+ response = self.class.post("/issues/close/#{repo.username}/#{repo.name}/#{number}")
+ handle_response(response)
+ Hashie::Mash.new(response).issue
+ end
+
+ def reopen_issue(repo, number)
+ repo = Repo.new(repo)
+ response = self.class.post("/issues/reopen/#{repo.username}/#{repo.name}/#{number}")
+ handle_response(response)
+ Hashie::Mash.new(response).issue
+ end
+
+ def update_issue(repo, number, title, body)
+ repo = Repo.new(repo)
+ response = self.class.post("/issues/edit/#{repo.username}/#{repo.name}/#{number}", :body => {:title => title, :body => body})
+ handle_response(response)
+ Hashie::Mash.new(response).issue
+ end
+
+ def labels(repo)
+ repo = Repo.new(repo)
+ response = self.class.get("/issues/labels/#{repo.username}/#{repo.name}")
+ handle_response(response)
+ Hashie::Mash.new(response).labels
+ end
+
+ def add_label(repo, number, label)
+ repo = Repo.new(repo)
+ response = self.class.post("/issues/label/add/#{repo.username}/#{repo.name}/#{label}/#{number}")
+ handle_response(response)
+ Hashie::Mash.new(response).labels
+ end
+
+ def remove_label(repo, number, label)
+ repo = Repo.new(repo)
+ response = self.class.post("/issues/label/remove/#{repo.username}/#{repo.name}/#{label}/#{number}")
+ handle_response(response)
+ Hashie::Mash.new(response).labels
+ end
+
+ def add_comment(repo, number, comment)
+ repo = Repo.new(repo)
+ response = self.class.post("/issues/comment/#{repo.username}/#{repo.name}/#{number}", :body => {:comment => comment})
+ handle_response(response)
+ Hashie::Mash.new(response).comment
+ end
+
+ # Repos
+
+ def search_repos(q)
+ q = CGI.escape(q)
+ response = self.class.get("/repos/search/#{q}")
+ handle_response(response)
+ Hashie::Mash.new(response).repositories
+ end
+
+ def watch(repo)
+ repo = Repo.new(repo)
+ response = self.class.post("/repos/watch/#{repo.username}/#{repo.name}", :query => auth_params)
+ handle_response(response)
+ Hashie::Mash.new(response).repository
+ end
+
+ def unwatch(repo)
+ repo = Repo.new(repo)
+ response = self.class.post("/repos/unwatch/#{repo.username}/#{repo.name}", :query => auth_params)
+ handle_response(response)
+ Hashie::Mash.new(response).repository
+ end
+
+ def fork(repo)
+ repo = Repo.new(repo)
+ response = self.class.post("/repos/fork/#{repo.username}/#{repo.name}", :query => auth_params)
+ handle_response(response)
+ Hashie::Mash.new(response).repository
+ end
+
+ # :name, :description, :homepage, :public
+ def create(options)
+ response = self.class.post("/repos/create", :query => auth_params, :body => options)
+ handle_response(response)
+ Hashie::Mash.new(response).repository
+ end
+
+ def delete(repo, delete_token={})
+ repo = Repo.new(repo)
+ response = self.class.post("/repos/delete/#{repo.name}", :query => auth_params, :body => {:delete_token => delete_token})
+ handle_response(response)
+ Hashie::Mash.new(response).repository
+ end
+
+ def confirm_delete(repo, delete_token)
+ delete(repo, delete_token)
+ end
+
+ def set_private(repo)
+ repo = Repo.new(repo)
+ response = self.class.post("/repos/set/private/#{repo.name}", :query => auth_params)
+ handle_response(response)
+ Hashie::Mash.new(response).repository
+ end
+
+ def set_public(repo)
+ repo = Repo.new(repo)
+ response = self.class.post("/repos/set/public/#{repo.name}", :query => auth_params)
+ handle_response(response)
+ Hashie::Mash.new(response).repository
+ end
+
+ def deploy_keys(repo)
+ repo = Repo.new(repo)
+ response = self.class.get("/repos/keys/#{repo.name}", :query => auth_params)
+ handle_response(response)
+ Hashie::Mash.new(response).public_keys
+ end
+
+ def add_deploy_key(repo, key, title='')
+ repo = Repo.new(repo)
+ response = self.class.post("/repos/key/#{repo.name}/add", :query => auth_params, :body => {:title => title, :key => key})
+ handle_response(response)
+ Hashie::Mash.new(response).public_keys
+ end
+
+ def remove_deploy_key(repo, id)
+ repo = Repo.new(repo)
+ response = self.class.post("/repos/key/#{repo.name}/remove", :query => auth_params, :body => {:id => id})
+ handle_response(response)
+ Hashie::Mash.new(response).public_keys
+ end
+
+ def collaborators(repo)
+ repo = Repo.new(repo)
+ response = self.class.post("/repos/show/#{repo.username}/#{repo.name}/collaborators", :query => auth_params)
+ handle_response(response)
+ Hashie::Mash.new(response).collaborators
+ end
+
+ def repo(repo)
+ repo = Repo.new(repo)
+ response = self.class.get("/repos/show/#{repo.username}/#{repo.name}")
+ handle_response(response)
+ Hashie::Mash.new(response).repository
+ end
+
+ def list_repos(username)
+ response = self.class.get("/repos/show/#{username}")
+ handle_response(response)
+ Hashie::Mash.new(response).repositories
+ end
+
+ def add_collaborator(repo, collaborator)
+ repo = Repo.new(repo)
+ response = self.class.post("/repos/collaborators/#{repo.name}/add/#{collaborator}", :query => auth_params)
+ handle_response(response)
+ Hashie::Mash.new(response).collaborators
+ end
+
+ def remove_collaborator(repo, collaborator)
+ repo = Repo.new(repo)
+ response = self.class.post("/repos/collaborators/#{repo.name}/remove/#{collaborator}", :query => auth_params)
+ handle_response(response)
+ Hashie::Mash.new(response).collaborators
+ end
+
+ def network(repo)
+ repo = Repo.new(repo)
+ response = self.class.get("/repos/show/#{repo.username}/#{repo.name}/network")
+ handle_response(response)
+ Hashie::Mash.new(response).network
+ end
+
+ def languages(repo)
+ repo = Repo.new(repo)
+ response = self.class.get("/repos/show/#{repo.username}/#{repo.name}/languages")
+ handle_response(response)
+ Hashie::Mash.new(response).languages
+ end
+
+ def tags(repo)
+ repo = Repo.new(repo)
+ response = self.class.get("/repos/show/#{repo.username}/#{repo.name}/tags")
+ handle_response(response)
+ Hashie::Mash.new(response).tags
+ end
+
+ def branches(repo)
+ repo = Repo.new(repo)
+ response = self.class.get("/repos/show/#{repo.username}/#{repo.name}/branches")
+ handle_response(response)
+ Hashie::Mash.new(response).branches
+ end
+
+ # Network
+
+ def network_meta(repo)
+ repo = Repo.new(repo)
+ response = self.class.get("http://github.com/#{repo.username}/#{repo.name}/network_meta")
+ handle_response(response)
+ Hashie::Mash.new(response)
+ end
+
+ def network_data(repo, nethash)
+ repo = Repo.new(repo)
+ response = self.class.get("http://github.com/#{repo.username}/#{repo.name}/network_data_chunk", :query => {:nethash => nethash})
+ handle_response(response)
+ Hashie::Mash.new(response).commits
+ end
+
+ # Trees
+
+ def tree(repo, sha)
+ repo = Repo.new(repo)
+ response = self.class.get("http://github.com/api/v2/json/tree/show/#{repo.username}/#{repo.name}/#{sha}")
+ handle_response(response)
+ Hashie::Mash.new(response).tree
+ end
+
+ def blob(repo, sha, path)
+ repo = Repo.new(repo)
+ response = self.class.get("http://github.com/api/v2/json/blob/show/#{repo.username}/#{repo.name}/#{sha}/#{path}")
+ handle_response(response)
+ Hashie::Mash.new(response).blob
+ end
+
+ def raw(repo, sha)
+ repo = Repo.new(repo)
+ response = self.class.get("http://github.com/api/v2/yaml/blob/show/#{repo.username}/#{repo.name}/#{sha}")
+ handle_response(response)
+ response.body
+ end
+
+ private
+
+ def auth_params
+ @login.nil? ? {} : {:login => @login, :token => @token}
+ end
+
+ def handle_response(response)
+ case response.code
+ when 403
+ raise RateLimitExceeded.new
+ when 401
+ raise Unauthorized.new
+ when 404
+ raise NotFound.new
+ when 500
+ raise OctopussyError.new(500)
+ end
+ end
+
+ end
+end
View
33 lib/octopussy/repo.rb
@@ -0,0 +1,33 @@
+class Repo
+ attr_accessor :username, :name
+
+ def initialize(repo)
+ if repo.is_a?(String)
+ repo = repo.split("/")
+ @name = repo.pop
+ @username = repo.pop
+ elsif repo.is_a?(Repo)
+ @username = repo.username
+ @name = repo.name
+ elsif repo.is_a?(Hash)
+ @name = repo[:repo] ||= repo[:name]
+ @username = repo[:username] ||= repo[:user] ||= repo[:owner]
+ end
+ end
+
+ def slug
+ "#{@username}/#{@name}"
+ end
+
+ def user
+ @username
+ end
+
+ def repo
+ @name
+ end
+
+ def user=(val)
+ @username = val
+ end
+end
View
10 test/fixtures/blob.json
@@ -0,0 +1,10 @@
+{
+ "blob": {
+ "name": "README.txt",
+ "size": 178,
+ "sha": "d4fc2d5e810d9b4bc1ce67702603080e3086a4ed",
+ "data": "Please visit http://famspam.com/facebox/ or open index.html in your favorite browser.nnNeed help? Join our Google Groups mailing list:n http://groups.google.com/group/facebox/n",
+ "mode": "100644",
+ "mime_type": "text/plain"
+ }
+}
View
6 test/fixtures/branches.json
@@ -0,0 +1,6 @@
+{
+ "branches": {
+ "integration": "e5bb86437ec67c115eee85ce6bf0b3b513946cee",
+ "master": "a202fb290bac4a488f6aee9f2d30ee0738e08602"
+ }
+}
View
1  test/fixtures/close_issue.json
@@ -0,0 +1 @@
+{"issue":{"number":2,"votes":0,"created_at":"2009/12/10 12:14:34 -0800","body":"testing api","title":"testing","updated_at":"2009/12/10 12:18:52 -0800","closed_at":"2009/12/10 12:18:52 -0800","user":"pengwynn","labels":[],"state":"closed"}}
View
1  test/fixtures/collaborators.json
@@ -0,0 +1 @@
+{"collaborators":["pengwynn","adamstac"]}
View
1  test/fixtures/comment.json
@@ -0,0 +1 @@
+{"comment": {"comment": "Nice catch!", "status": "saved"}}
View
1  test/fixtures/emails.json
@@ -0,0 +1 @@
+{"emails":["wynn@squeejee.com","wynn.netherland@gmail.com","wynn@orrka.com"]}
View
3  test/fixtures/followers.json
@@ -0,0 +1,3 @@
+{
+ "users": ["cglee", "mattsa", "zachinglis", "seaofclouds", "njonsson", "davidnorth", "stephp", "polomasta", "webiest", "mchelen", "brogers", "marclove", "adamstac", "marshall", "handcrafted", "asenchi", "piyush", "rmetzler", "nileshtrivedi", "erikvold", "thechangelog"]
+}
View
27 test/fixtures/full_user.json
@@ -0,0 +1,27 @@
+{
+ "user": {
+ "plan": {
+ "name": "free",
+ "collaborators": 0,
+ "space": 307200,
+ "private_repos": 0
+ },
+ "name": "Wynn Netherland",
+ "company": "Orrka",
+ "location": "Dallas, TX",
+ "created_at": "2008/02/25 10:24:19 -0800",
+ "collaborators": 0,
+ "disk_usage": 85605,
+ "public_gist_count": 3,
+ "public_repo_count": 15,
+ "blog": "http://wynnnetherland.com",
+ "following_count": 55,
+ "id": 865,
+ "private_gist_count": 1,
+ "owned_private_repo_count": 0,
+ "total_private_repo_count": 0,
+ "followers_count": 21,
+ "login": "pengwynn",
+ "email": "wynn.netherland@gmail.com"
+ }
+}
View
14 test/fixtures/issue.json
@@ -0,0 +1,14 @@
+{
+ "issue": {
+ "number": 3,
+ "votes": 2,
+ "created_at": "2009/05/06 17:28:29 -0700",
+ "body": "Not sure if this is an issue with Crack or with this lib, but every time I try to create a friendship, I get this error:rnrn>> base.friendship_create('anyone')rnCrack::ParseError: Invalid JSON stringrntfrom /Library/Ruby/Gems/1.8/gems/crack-0.1.2/lib/crack/json.rb:14:in `parse'rntfrom /Library/Ruby/Gems/1.8/gems/twitter-0.6.8/lib/twitter/request.rb:73:in `parse'rntfrom /Library/Ruby/Gems/1.8/gems/twitter-0.6.8/lib/twitter/request.rb:48:in `make_friendly'rntfrom /Library/Ruby/Gems/1.8/gems/twitter-0.6.8/lib/twitter/request.rb:34:in `perform'rntfrom /Library/Ruby/Gems/1.8/gems/twitter-0.6.8/lib/twitter/request.rb:10:in `post'rntfrom /Library/Ruby/Gems/1.8/gems/twitter-0.6.8/lib/twitter/base.rb:162:in `perform_post'rntfrom /Library/Ruby/Gems/1.8/gems/twitter-0.6.8/lib/twitter/base.rb:76:in `friendship_create'rn",
+ "title": "Crack error when creating friendship",
+ "updated_at": "2009/08/17 14:25:17 -0700",
+ "closed_at": null,
+ "user": "shanev",
+ "labels": [],
+ "state": "open"
+ }
+}
View
50 test/fixtures/issues.json
@@ -0,0 +1,50 @@
+{
+ "issues": [{
+ "number": 3,
+ "votes": 2,
+ "created_at": "2009/05/06 17:28:29 -0700",
+ "body": "Not sure if this is an issue with Crack or with this lib, but every time I try to create a friendship, I get this error:\r\n\r\n>> base.friendship_create('anyone')\r\nCrack::ParseError: Invalid JSON string\r\n\tfrom /Library/Ruby/Gems/1.8/gems/crack-0.1.2/lib/crack/json.rb:14:in `parse'\r\n\tfrom /Library/Ruby/Gems/1.8/gems/twitter-0.6.8/lib/twitter/request.rb:73:in `parse'\r\n\tfrom /Library/Ruby/Gems/1.8/gems/twitter-0.6.8/lib/twitter/request.rb:48:in `make_friendly'\r\n\tfrom /Library/Ruby/Gems/1.8/gems/twitter-0.6.8/lib/twitter/request.rb:34:in `perform'\r\n\tfrom /Library/Ruby/Gems/1.8/gems/twitter-0.6.8/lib/twitter/request.rb:10:in `post'\r\n\tfrom /Library/Ruby/Gems/1.8/gems/twitter-0.6.8/lib/twitter/base.rb:162:in `perform_post'\r\n\tfrom /Library/Ruby/Gems/1.8/gems/twitter-0.6.8/lib/twitter/base.rb:76:in `friendship_create'\r\n",
+ "title": "Crack error when creating friendship",
+ "updated_at": "2009/08/17 14:25:17 -0700",
+ "closed_at": null,
+ "user": "shanev",
+ "labels": [],
+ "state": "open"
+ },
+ {
+ "number": 6,
+ "votes": 2,
+ "created_at": "2009/06/07 12:28:24 -0700",
+ "body": "The methods on the Twitter class (firehose, friend_ids, follower_ids, status, user) assume that no errors will occur, but all of them can at least return a 50x error. An example using FakeWeb:\r\n\r\n<pre>\r\n>> FakeWeb.register_uri(:get, 'http://twitter.com/statuses/public_timeline.json',\r\n?> :string => '{\"request\":\"\\/statuses\\/public_timeline.json\",\"error\":\"Bad gateway\"}',\r\n?> :status => ['502', 'Bad Gateway'])\r\n=> [#<FakeWeb::Responder:0x7f3b2138 @options={:status=>[\"502\", \"Bad Gateway\"], :string=>\"{\\\"request\\\":\\\"\\\\/statuses\\\\/public_timeline.json\\\",\\\"error\\\":\\\"Bad gateway\\\"}\"}, @method=:get, @uri=\"http://twitter.com/statuses/public_timeline.json\", @times=1>]\r\n>> Twitter.firehose\r\nNoMethodError: undefined method `stringify_keys' for [\"request\", \"/statuses/public_timeline.json\"]:Array\r\n from /usr/lib/ruby/gems/1.8/gems/mash-0.0.3/lib/mash.rb:131:in `deep_update'\r\n from /usr/lib/ruby/gems/1.8/gems/mash-0.0.3/lib/mash.rb:50:in `initialize'\r\n from /usr/lib/ruby/gems/1.8/gems/twitter-0.6.11/lib/twitter.rb:34:in `new'\r\n from /usr/lib/ruby/gems/1.8/gems/twitter-0.6.11/lib/twitter.rb:34:in `firehose' \r\n</pre>",
+ "title": "Methods on Twitter class don't check for errors",
+ "updated_at": "2009/10/29 16:28:45 -0700",
+ "closed_at": null,
+ "user": "bkocik",
+ "labels": [],
+ "state": "open"
+ },
+ {
+ "number": 8,
+ "votes": 0,
+ "created_at": "2009/06/17 14:40:43 -0700",
+ "body": "When you request a search with a :since_id parameter too old, according to [Twitter](http://apiwiki.twitter.com/Twitter-Search-API-Method%3A-search):\r\n\r\n> This method will return an HTTP 404 error if since_id is used and is too old to be in the search index\r\n\r\nwhich results in a +Crack::ParseError+ exception",
+ "title": "Error handling 404 from Twitter::Search (JSON error)",
+ "updated_at": "2009/06/17 14:40:43 -0700",
+ "closed_at": null,
+ "user": "chubas",
+ "labels": [],
+ "state": "open"
+ },
+ {
+ "number": 9,
+ "votes": 3,
+ "created_at": "2009/06/18 07:53:09 -0700",
+ "body": "happens periodically, presumably when twitter search services returns a string for a response instead of a hash?",
+ "title": "stringify_keys error in Mash.new when using Twitter::search",
+ "updated_at": "2009/11/12 08:52:13 -0800",
+ "closed_at": null,
+ "user": "metrostar",
+ "labels": [],
+ "state": "open"
+ }]
+}
View
1  test/fixtures/keys.json
@@ -0,0 +1 @@
+{"public_keys":[{"title":null,"id":2102,"key":"ssh-rsa AAAAB3NzaC1yc2EAAAAddBIwAAAasdfasdfQEAxfm4eG+Dasd3b/d41W3BR8h9IOv63ISyaVTVXLsiwAfGZw17Kc9xpdp1NblqvDIj+T1bI6U420/Jb5tBw0MlltgUxwwySVH1f37w89VzdC7ArsR6X3KOIz/fhtmUCNyPakO+BjKjK3MtLcQvrNY5s0B91D/klP1pgcGVUzJxw5kCtZ6By3HjGXDK5lW9qMAG93ncrFc6tTE3WQ30Wgcsqf+uNmc9tyR5cO0asKneDaz1t486ydF9P97dzwM+SMY9GcpZ2gvOp0UHdA59Wr3LEE6/EqGxAxRDrT/1wtPk5Ya1TEWWX+WdlfZ1zttd3h7dkVom1cKWCa262mU3THoe5aytJw=="},{"title":null,"id":2686,"key":"ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAw4GP0832tasCsbl2QcEehotpcjfMMgbep9xWuf0T6fmMXgLI9QkiPdjA2oqxdJp7l33Echsb5gVjbY+96KPd9Q6Q7FM9Si9srfJpw2folq89+LJWBYe0qw3BMDFfmBtcmTMZT1NWzZ1RT/crPqDSEGYMny9s2jR3spL2K8R9dcWalFgpasRbfEacr7xUvFbIcxeU2xsWvTjA8+YwoU2pc3tG8XX8LMMRdzadN5L9rOrxlo6XybOH6KgKPA02jKbdmsbIZ3umHylMdTckjLWSDut+7ACD+7ztuPkH9Ya9lYWBzn8kVzwL91+4T8RbYndD0VqS4GpuL2AOqVrDHMrsjw=="},{"title":null,"id":17725,"key":"ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAxvbvBp9ugiuHPr8LvhAjO1qHmzNSJp/SpJoP0ZXfVVR4+m9fti2Kuf5efgDIKsW4l1ODCuhuQLaa5TB+X4/uZB8PUKtZaUswNRfN/w8fzX24+pEMq9Jf2l++Nz7xyA1PngSLeZ/FWbFP5Nl8DnOnb1GiLIcGPb0rMZ4CvoxwNtp8bb2F5HVVSF0n2cyJvsb+ZqQRZwejYmLlrzagUAfrz0BWDkGw2QitZhIsy7XaqK+jDM8k9qugk19n69e5VVYZYLvFUJ16aX+zhWsx5+Li2jXFlJcYpadV3KjY4+KF2I26idO/qhQv31+QH9/gTQxKZKsWWbjFMfDlzoquG9FtZw=="},{"title":null,"id":22206,"key":"ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6JdBPCEoeH3nl93pjzkw88bJ3YSaZLUhe3rWULadU/fL0vxtRBaiRAfsSIq1/ank8fLnrl3TquQq26DOrZWyam4ODHQRzHdN4MlE3kH8tSHoRedwuzFyAjCC23QpLD+4vGwhyrJmuebT13mn2t0rbnOZMpKY1f9r97Tbhx6/sMIE+n6zaWBg/miOWMaR2rQ048vNuaA+hhJz+MdU6VL94GxchuQ7eeCP1tucbEG6qQraRhvWqV2GRDJ86Xc34uC2eMQaybk+UHH4TSe9DNYSRRpHWS5IgAPZHO267X3uOhSDOOXHQx/liVVWd6PTcJQkQ6u0W8hNBQVUZAHnTgG9cQ=="},{"title":"pengwynn","id":42883,"key":"ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA2QU45StpDGCM9KJgaIzv6/GXsUO8mrpOkfevd2ht7IMN5Fdl2R7jjCjv9eZmIWieBWsKiFUq2T5/+royc7jjHjGd9s8FGYIi9nACNblzDLT1w6WX6ORuS2LuUuq9uUdtAghbWImQSQDOpGaW73OCvBSuZKKKvqwSXsOFhstfwYaOLzfF9xdCVd02DJY75QSiUkNaaB4300yqQlVYdrtz2akXLXpxlzojALcoAHefuCOK7C8/J3LCiPVGftBZ7Fab6k6LV7rguhcfkyg4bwzAMMOcwx+AUj1WLv4rdDJOi4X6xJzEBitvhJFTQ4ynGXmaalKGwSzaIhByG74JsGq7Ew=="},{"title":"wynn@pengwynn.local","id":111978,"key":"ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAlugsW063BAHaUOYSJa+6T1/lKCIptIBXjppAXwnALKYJCfSTnQjEXhAv8CDXLkVDlF11A1rqYrHuVs/CdVJblRXfmHAhSy+3GcYqyrBNdRJtu/R1+ziDiAnSOTyZjLFwJwovy7coRJ4o2ZaZZkYhBQe6Th6cTtPFIho8yab3plxWzL7MvF6MPwIW3vJO38Z8c91SHBWQqbKBtLwjkWYjZSyu+MSB5BUXBIB6AcHcQOP0/0q/4rO4dk4qjkH5rXqa29knoCBHjpMJB7L3v0BedSzPN3/O7xwE85mok1OZaIYjFqNgSnEw3VVOiuJ95EVHN6ELR/gWbEYddvkRZUo8Pw=="}]}
View
1  test/fixtures/labels.json
@@ -0,0 +1 @@
+{"labels":["oauth"]}
View
1  test/fixtures/languages.json
@@ -0,0 +1 @@
+{"languages":{"Ruby":21515}}
View
26 test/fixtures/network.json
@@ -0,0 +1,26 @@
+{
+ "network": [{
+ "url": "http://github.com/pengwynn/linkedin",
+ "description": "Ruby wrapper for the LinkedIn API",
+ "homepage": "http://bit.ly/ruby-linkedin",
+ "fork": false,
+ "open_issues": 2,
+ "private": false,
+ "name": "linkedin",
+ "owner": "pengwynn",
+ "watchers": 36,
+ "forks": 1
+ },
+ {
+ "url": "http://github.com/nfo/linkedin",
+ "description": "Ruby wrapper for the LinkedIn API",
+ "homepage": "http://bit.ly/ruby-linkedin",
+ "fork": true,
+ "open_issues": 0,
+ "private": false,
+ "name": "linkedin",
+ "owner": "nfo",
+ "watchers": 1,
+ "forks": 0
+ }]
+}
View
1  test/fixtures/network_data.json
@@ -0,0 +1 @@
+{"commits": []}
View
109 test/fixtures/network_meta.json
@@ -0,0 +1,109 @@
+{
+ "blocks": [{
+ "name": "schacon",
+ "count": 3,
+ "start": 0
+ },
+ {
+ "name": "anlek",
+ "count": 3,
+ "start": 3
+ },
+ {
+ "name": "gitflow",
+ "count": 2,
+ "start": 6
+ },
+ {
+ "name": "tamtam",
+ "count": 1,
+ "start": 8
+ }],
+ "nethash": "c4589cdab8567be257cbb3509d22d4b937831c79",
+ "focus": 77,
+ "dates": ["2008-03-15", "2008-03-15", "2008-03-17", "2008-03-17", "2008-04-05", "2008-04-05", "2008-04-05", "2008-04-06", "2008-04-06", "2008-04-06", "2008-04-06", "2008-04-06", "2008-04-06", "2008-04-06", "2008-04-06", "2008-04-06", "2008-04-06", "2008-04-06", "2008-04-06", "2008-04-13", "2008-04-13", "2008-04-13", "2008-04-13", "2008-04-13", "2008-04-13", "2008-04-27", "2008-04-27", "2008-04-27", "2008-04-28", "2008-04-28", "2008-04-28", "2008-04-28", "2008-04-28", "2008-04-28", "2008-04-28", "2008-05-28", "2008-05-28", "2008-06-12", "2008-06-12", "2008-06-21", "2008-06-21", "2008-07-04", "2008-07-04", "2008-07-04", "2008-07-04", "2008-07-05", "2008-07-05", "2008-07-05", "2008-07-05", "2008-07-05", "2008-07-05", "2008-07-05", "2008-07-05", "2008-08-09", "2008-09-03", "2008-09-03", "2008-09-03", "2008-09-23", "2008-09-23", "2008-09-23", "2008-09-23", "2008-09-23", "2008-09-25", "2008-09-25", "2009-01-15", "2009-01-15", "2009-02-08", "2009-02-08", "2009-02-08", "2009-02-08", "2009-02-08", "2009-02-10", "2009-02-15", "2009-02-15", "2009-02-15", "2009-02-15", "2009-04-17", "2009-04-17", "2009-08-23", "2009-08-23", "2009-08-23", "2009-08-23", "2009-08-23", "2009-10-27", "2009-10-27", "2009-10-27", "2009-10-27", "2009-10-27", "2009-10-27"],
+ "users": [{
+ "repo": "simplegit",
+ "name": "schacon",
+ "heads": [{
+ "name": "master",
+ "id": "ca82a6dff817ec66f44342007202690a93763949"
+ },
+ {
+ "name": "integration",
+ "id": "7e7de73f7bd28f3841b51bf200669b1c392e36f3"
+ },
+ {
+ "name": "nolimit",
+ "id": "84958e805cb50f787e948f258e6627681eea5404"
+ },
+ {
+ "name": "qa/master",
+ "id": "ca82a6dff817ec66f44342007202690a93763949"
+ },
+ {
+ "name": "topic",
+ "id": "085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7"
+ }]
+ },
+ {
+ "repo": "simplegit",
+ "name": "anlek",
+ "heads": [{
+ "name": "master",
+ "id": "10c5bc85d9c2ea7f10610ab4e265127eb6f0a918"
+ },
+ {
+ "name": "test",
+ "id": "046d3c94ff641afd553d0dcccea3fe7d0e4802f4"
+ },
+ {
+ "name": "website",
+ "id": "29ddeaa83de0e300dd576f77a47de8a0ad5a86cd"
+ },
+ {
+ "name": "testing",
+ "id": "6529a78a220f944fc3f27a4e5f1c2030b233740e"
+ }]
+ },
+ {
+ "repo": "simplegit",
+ "name": "gitflow",
+ "heads": [{
+ "name": "master",
+ "id": "ca82a6dff817ec66f44342007202690a93763949"
+ },
+ {
+ "name": "topic",
+ "id": "085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7"
+ },
+ {
+ "name": "add-branching-support",
+ "id": "da1000302f62050bef893b022f3ceaf02d73c1ab"
+ },
+ {
+ "name": "nolimit",
+ "id": "84958e805cb50f787e948f258e6627681eea5404"
+ },
+ {
+ "name": "add-branch-switching",
+ "id": "c6c63002476ed3ba0b0e29cc76b8f87ecaceb60b"
+ },
+ {
+ "name": "add-clone-support",
+ "id": "fcef95b81ffc1adf410c15917bcb7f40556ff01a"
+ },
+ {
+ "name": "qa/master",
+ "id": "ca82a6dff817ec66f44342007202690a93763949"
+ }]
+ },
+ {
+ "repo": "tam_repo",
+ "name": "tamtam",
+ "heads": [{
+ "name": "master",
+ "id": "8bf4aeae935422e7bdbb30660b4f3642728a1397"
+ }]
+ }]
+}
View
1  test/fixtures/open_issue.json
@@ -0,0 +1 @@
+{"issue":{"number":2,"votes":0,"created_at":"2009/12/10 12:14:34 -0800","body":"testing api","title":"testing","updated_at":"2009/12/10 12:14:34 -0800","closed_at":null,"user":"pengwynn","labels":[],"state":"open"}}
View
7 test/fixtures/raw_git_data.json
@@ -0,0 +1,7 @@
+tree f7a5de2e224ec94182a3c2c081f4e7f35f70da4d
+parent cd13d9a61288dceb0a7aa73b55ed2fd019f4f1f7
+parent 3211367cab73233af66dac2710c94682f3f3b9b2
+author Chris Wanstrath <chris@ozmm.org> 1213837237 -0700
+committer Chris Wanstrath <chris@ozmm.org> 1213837237 -0700
+
+Merge branch 'master' of git://github.com/webweaver/facebox into webweaver/master
View
1  test/fixtures/reopen_issue.json
@@ -0,0 +1 @@
+{"issue":{"number":2,"votes":0,"created_at":"2009/12/10 12:14:34 -0800","body":"testing api","title":"testing","updated_at":"2009/12/10 12:19:04 -0800","closed_at":null,"user":"pengwynn","labels":[],"state":"open"}}
View
14 test/fixtures/repo.json
@@ -0,0 +1,14 @@
+{
+ "repository": {
+ "url": "http://github.com/pengwynn/linkedin",
+ "description": "Ruby wrapper for the LinkedIn API",
+ "watchers": 34,
+ "homepage": "http://bit.ly/ruby-linkedin",
+ "fork": false,
+ "private": false,
+ "name": "linkedin",
+ "owner": "pengwynn",
+ "forks": 1,
+ "open_issues": 2
+ }
+}
View
452 test/fixtures/repo_search.json
@@ -0,0 +1,452 @@
+{
+ "repositories": [{
+ "name": "compass",
+ "size": 6144,
+ "followers": 1383,
+ "username": "chriseppstein",
+ "language": "Ruby",
+ "fork": false,
+ "id": "repo-45300",
+ "type": "repo",
+ "pushed": "2009-12-03T08:55:01Z",
+ "forks": 70,
+ "description": "Compass is a Stylesheet Authoring Environment that makes your website design simpler to implement and easier to maintain.",
+ "score": 9.122609,
+ "created": "2008-08-23T17:02:18Z"
+ },
+ {
+ "name": "fancy-buttons",
+ "size": 2048,
+ "followers": 167,
+ "username": "imathis",
+ "language": "Ruby",
+ "fork": false,
+ "id": "repo-311527",
+ "type": "repo",
+ "pushed": "2009-12-09T22:30:39Z",
+ "forks": 4,
+ "description": "Fancy CSS Buttons using Compass",
+ "score": 0.6754447,
+ "created": "2009-09-19T03:40:21Z"
+ },
+ {
+ "name": "compass-960-plugin",
+ "size": 784,
+ "followers": 61,
+ "username": "chriseppstein",
+ "language": "Ruby",
+ "fork": false,
+ "id": "repo-99778",
+ "type": "repo",
+ "pushed": "2009-09-27T20:12:01Z",
+ "forks": 7,
+ "description": "Sass Port of 960.gs as part of the Compass Stylesheet Framework.",
+ "score": 5.0737286,
+ "created": "2009-01-02T17:36:27Z"
+ },
+ {
+ "name": "compass-colors",
+ "size": 1638,
+ "followers": 53,
+ "username": "chriseppstein",
+ "language": "Ruby",
+ "fork": false,
+ "id": "repo-266945",
+ "type": "repo",
+ "pushed": "2009-11-19T19:58:53Z",
+ "forks": 4,
+ "description": "Color Tools and Theme Support for Compass and Sass",
+ "score": 5.2134895,
+ "created": "2009-08-02T10:30:07Z"
+ },
+ {
+ "name": "compass-rails-sample-application",
+ "size": 4096,
+ "followers": 47,
+ "username": "chriseppstein",
+ "language": "Ruby",
+ "fork": false,
+ "id": "repo-58711",
+ "type": "repo",
+ "pushed": "2009-06-04T16:41:54Z",
+ "forks": 1,
+ "description": "Demonstrates how to configure a rails application to use Compass",
+ "score": 4.550148,
+ "created": "2008-10-02T07:20:24Z"
+ },
+ {
+ "name": "blueprint-sass",
+ "size": 204,
+ "followers": 36,
+ "username": "chriseppstein",
+ "language": "Ruby",
+ "fork": false,
+ "id": "repo-29145",
+ "type": "repo",
+ "pushed": "2008-08-27T16:41:10Z",
+ "forks": 0,
+ "description": "The blueprint stylesheet framework in sass. Development has moved to my project named Compass.",
+ "score": 0.46580324,
+ "created": "2008-06-27T02:44:41Z"
+ },
+ {
+ "name": "sass-recipes",
+ "size": 80,
+ "followers": 33,
+ "username": "chriseppstein",
+ "language": "",
+ "fork": false,
+ "id": "repo-32364",
+ "type": "repo",
+ "pushed": "2008-08-10T18:26:15Z",
+ "forks": 1,
+ "description": "Sass mixin examples and recipes that you can use or modify to suit your needs. Send a request for commit access to add your own. Most of these mixins are now part of my Compass project",
+ "score": 0.39592272,
+ "created": "2008-07-08T20:12:00Z"
+ },
+ {
+ "name": "compass-sinatra",
+ "size": 288,
+ "followers": 27,
+ "username": "seaofclouds",
+ "language": "Ruby",
+ "fork": false,
+ "id": "repo-151211",
+ "type": "repo",
+ "pushed": "2009-03-17T19:45:40Z",
+ "forks": 3,
+ "description": "a simple starting point for those wanting to explore compass with sinatra.",
+ "score": 5.0737286,
+ "created": "2009-03-15T07:25:08Z"
+ },
+ {
+ "name": "compass-jquery",
+ "size": 2048,
+ "followers": 18,
+ "username": "dturnbull",
+ "language": "JavaScript",
+ "fork": false,
+ "id": "repo-243944",
+ "type": "repo",
+ "pushed": "2009-08-06T23:51:30Z",
+ "forks": 2,
+ "description": "Integrates jQuery, jQuery UI, Themes, jqGrid, and more into Compass Sass framework.",
+ "score": 4.933967,
+ "created": "2009-07-06T00:45:52Z"
+ },
+ {
+ "name": "graphpaper",
+ "size": 2150,
+ "followers": 15,
+ "username": "alexcabrera",
+ "language": "Ruby",
+ "fork": false,
+ "id": "repo-201057",
+ "type": "repo",
+ "pushed": "2009-10-05T22:20:43Z",
+ "forks": 1,
+ "description": "A SASS library for use with Compass CSS",
+ "score": 0.60556424,
+ "created": "2009-05-14T17:46:32Z"
+ },
+ {
+ "name": "compass_blueprint_tmbundle",
+ "size": 2048,
+ "followers": 14,
+ "username": "grimen",
+ "language": "",
+ "fork": false,
+ "id": "repo-241265",
+ "type": "repo",
+ "pushed": "2009-07-24T20:06:11Z",
+ "forks": 2,
+ "description": "Textmate: A TextMate-bundle for more productive Compass + Blueprint development.",
+ "score": 4.933967,
+ "created": "2009-07-02T03:36:54Z"
+ },
+ {
+ "name": "staticmatic-compass-susy",
+ "size": 0,
+ "followers": 14,
+ "username": "charlesr",
+ "language": "Ruby",
+ "fork": false,
+ "id": "repo-344073",
+ "type": "repo",
+ "pushed": "2009-10-30T08:50:37Z",
+ "forks": 2,
+ "description": "A demo site using Staticmatic, Compass and Susy",
+ "score": 5.2134895,
+ "created": "2009-10-20T21:57:02Z"
+ },
+ {
+ "name": "handcrafted-rounded-corners",
+ "size": 384,
+ "followers": 13,
+ "username": "handcrafted",
+ "language": "",
+ "fork": false,
+ "id": "repo-254765",
+ "type": "repo",
+ "pushed": "2009-08-21T04:48:49Z",
+ "forks": 1,
+ "description": "Handcrafted Rounded Corners is a simple Compass mixin to round corners in Compass supported projects.",
+ "score": 0.58158505,
+ "created": "2009-07-19T05:35:19Z"
+ },
+ {
+ "name": "compass-baseline",
+ "size": 536,
+ "followers": 11,
+ "username": "tdreyno",
+ "language": "Ruby",
+ "fork": false,
+ "id": "repo-288926",
+ "type": "repo",
+ "pushed": "2009-11-23T18:24:58Z",
+ "forks": 1,
+ "description": "Implement the Baseline CSS framework in Sass",
+ "score": 2.2806022,
+ "created": "2009-08-26T17:54:33Z"
+ },
+ {
+ "name": "staticmatic-bootstrap",
+ "size": 916,
+ "followers": 11,
+ "username": "adamstac",
+ "language": "Ruby",
+ "fork": false,
+ "id": "repo-352479",
+ "type": "repo",
+ "pushed": "2009-12-08T22:38:13Z",
+ "forks": 1,
+ "description": "StaticMatic bootstrap with support for Haml, Sass, Compass and jQuery",
+ "score": 0.46580324,
+ "created": "2009-10-28T09:25:36Z"
+ },
+ {
+ "name": "CompassTest",
+ "size": 76,
+ "followers": 10,
+ "username": "fspeirs",
+ "language": "Objective-C",
+ "fork": false,
+ "id": "repo-231437",
+ "type": "repo",
+ "pushed": "2009-06-19T14:48:52Z",
+ "forks": 1,
+ "description": "Demo app for iPhone 3GS compass data",
+ "score": 5.0737286,
+ "created": "2009-06-19T14:48:35Z"
+ },
+ {
+ "name": "newyork",
+ "size": 540,
+ "followers": 10,
+ "username": "nmerouze",
+ "language": "JavaScript",
+ "fork": false,
+ "id": "repo-72801",
+ "type": "repo",
+ "pushed": "2008-11-26T16:24:09Z",
+ "forks": 2,
+ "description": "Easy website wireframing with HAML, SASS, Red, Compass, jQuery and Polypage.",
+ "score": 0.46580324,
+ "created": "2008-11-07T14:01:18Z"
+ },
+ {
+ "name": "compass-susy-plugin",
+ "size": 2662,
+ "followers": 9,
+ "username": "carljm",
+ "language": "Perl",
+ "fork": false,
+ "id": "repo-250141",
+ "type": "repo",
+ "pushed": "2009-10-17T01:52:20Z",
+ "forks": 2,
+ "description": "A grid framework for Compass.",
+ "score": 5.4930115,
+ "created": "2009-07-13T17:10:51Z"
+ },
+ {
+ "name": "sinatra-bootstrap",
+ "size": 512,
+ "followers": 9,
+ "username": "adamstac",
+ "language": "JavaScript",
+ "fork": false,
+ "id": "repo-352942",
+ "type": "repo",
+ "pushed": "2009-12-02T10:49:49Z",
+ "forks": 1,
+ "description": "Sinatra bootstrap project with support for Haml, Sass, Compass and jQuery",
+ "score": 0.53568375,
+ "created": "2009-10-28T16:40:04Z"
+ },
+ {
+ "name": "compass-jquery-plugin",
+ "size": 5324,
+ "followers": 9,
+ "username": "kosmas58",
+ "language": "JavaScript",
+ "fork": false,
+ "id": "repo-305728",
+ "type": "repo",
+ "pushed": "2009-12-06T19:04:36Z",
+ "forks": 1,
+ "description": "Plugin adds jQuery to compass framework. ",
+ "score": 5.2134895,
+ "created": "2009-09-13T13:47:42Z"
+ },
+ {
+ "name": "Compass.tmbundle",
+ "size": 324,
+ "followers": 8,
+ "username": "dougochris",
+ "language": "Ruby",
+ "fork": false,
+ "id": "repo-277857",
+ "type": "repo",
+ "pushed": "2009-08-20T01:45:44Z",
+ "forks": 1,
+ "description": "Compass TextMate bundle",
+ "score": 5.3532505,
+ "created": "2009-08-14T11:57:52Z"
+ },
+ {
+ "name": "compass-wordpress",
+ "size": 1740,
+ "followers": 8,
+ "username": "pengwynn",
+ "language": "PHP",
+ "fork": false,
+ "id": "repo-362916",
+ "type": "repo",
+ "pushed": "2009-12-10T16:29:28Z",
+ "forks": 2,
+ "description": "Compass plugin for creating WordPress themes using Sass",
+ "score": 5.0737286,
+ "created": "2009-11-06T04:17:42Z"
+ },
+ {
+ "name": "compass-style.org",
+ "size": 14336,
+ "followers": 7,
+ "username": "chriseppstein",
+ "language": "Ruby",
+ "fork": false,
+ "id": "repo-82767",
+ "type": "repo",
+ "pushed": "2009-09-10T15:06:29Z",
+ "forks": 3,
+ "description": "The Compass Stylesheet Framework's Website",
+ "score": 5.4930115,
+ "created": "2008-11-30T20:32:38Z"
+ },
+ {
+ "name": "compass-aristo-plugin",
+ "size": 2048,
+ "followers": 7,
+ "username": "hpoydar",
+ "language": "Ruby",
+ "fork": false,
+ "id": "repo-283188",
+ "type": "repo",
+ "pushed": "2009-08-24T18:53:35Z",
+ "forks": 1,
+ "description": "A Compass plugin that provides a CSS3 port of the Aristo UI elements",
+ "score": 4.933967,
+ "created": "2009-08-20T16:26:00Z"
+ },
+ {
+ "name": "compass-drupal-zen-plugin",
+ "size": 1024,
+ "followers": 7,
+ "username": "bangpound",
+ "language": "PHP",
+ "fork": false,
+ "id": "repo-184749",
+ "type": "repo",
+ "pushed": "2009-05-16T16:52:29Z",
+ "forks": 0,
+ "description": "Sass port of Drupal Zen 2 theme as part of the Compass Stylesheet Framework",
+ "score": 4.550148,
+ "created": "2009-04-24T18:56:34Z"
+ },
+ {
+ "name": "handcrafted-compass-mixins",
+ "size": 248,
+ "followers": 7,
+ "username": "handcrafted",
+ "language": "",
+ "fork": false,
+ "id": "repo-286797",
+ "type": "repo",
+ "pushed": "2009-08-25T18:44:52Z",
+ "forks": 2,
+ "description": "Handcrafted's various Compass mixins aimed at making life a little more pleasant",
+ "score": 4.933967,
+ "created": "2009-08-24T18:28:32Z"
+ },
+ {
+ "name": "compass-slickmap",
+ "size": 296,
+ "followers": 7,
+ "username": "tdreyno",
+ "language": "Ruby",
+ "fork": false,
+ "id": "repo-268168",
+ "type": "repo",
+ "pushed": "2009-12-03T20:55:49Z",
+ "forks": 2,
+ "description": "A Compass plugin for the SlickmapCSS sitemap",
+ "score": 5.2134895,
+ "created": "2009-08-03T22:12:38Z"
+ },
+ {
+ "name": "pinax-compass-integration",
+ "size": 2048,
+ "followers": 6,
+ "username": "durdn",
+ "language": "Python",
+ "fork": false,
+ "id": "repo-241237",
+ "type": "repo",
+ "pushed": "2009-09-21T15:28:55Z",
+ "forks": 1,
+ "description": "Simple integration to use Compass (http://compass-style.org) inside Pinax (http://pinaxproject.com)",
+ "score": 5.165531,
+ "created": "2009-07-02T02:45:21Z"
+ },
+ {
+ "name": "nanoc-bootstrap",
+ "size": 0,
+ "followers": 6,
+ "username": "adamstac",
+ "language": "Ruby",
+ "fork": false,
+ "id": "repo-333347",
+ "type": "repo",
+ "pushed": "2009-10-28T16:48:35Z",
+ "forks": 2,
+ "description": "Nanoc bootstrap with support for Haml, Sass, Compass and jQuery",
+ "score": 0.53568375,
+ "created": "2009-10-10T18:23:52Z"
+ },
+ {
+ "name": "compass-css-lightbox",
+ "size": 172,
+ "followers": 6,
+ "username": "ericam",
+ "language": "Ruby",
+ "fork": false,
+ "id": "repo-409243",
+ "type": "repo",
+ "pushed": "2009-12-09T09:22:18Z",
+ "forks": 1,
+ "description": "a css-only lightbox implementation for compass",
+ "score": 5.2134895,
+ "created": "2009-12-09T00:15:11Z"
+ }]
+}
View
830 test/fixtures/repos.json
@@ -0,0 +1,830 @@
+{
+ "repositories": [{
+ "url": "http://github.com/jnunemaker/twitter",
+ "description": "API wrapper for Twitter and Twitter Search API's",
+ "open_issues": 7,
+ "homepage": "http://twitter.rubyforge.org/",
+ "watchers": 609,
+ "fork": false,
+ "forks": 120,
+ "private": false,
+ "name": "twitter",
+ "owner": "jnunemaker",
+ "pledgie": 1193
+ },
+ {
+ "url": "http://github.com/mully/redmine_ticket_emailer",
+ "description": "Redmine plugin to allow users to email tickets to the Redmine issue tracking system",
+ "open_issues": 0,
+ "homepage": "http://www.redmine.org",
+ "watchers": 18,
+ "fork": false,
+ "forks": 4,
+ "private": false,
+ "name": "redmine_ticket_emailer",
+ "owner": "mully"
+ },
+ {
+ "url": "http://github.com/railsdog/spree",
+ "description": "Spree is a complete open source e-commerce solution for Ruby on Rails.",
+ "open_issues": 0,
+ "homepage": "http://spreecommerce.com",
+ "watchers": 892,
+ "fork": false,
+ "forks": 249,
+ "private": false,
+ "name": "spree",
+ "owner": "railsdog"
+ },
+ {
+ "url": "http://github.com/adamstac/jquery-qt-controller",
+ "description": "A jQuery powered Quicktime Interface Controller",
+ "open_issues": 0,
+ "homepage": "",
+ "watchers": 15,
+ "fork": false,
+ "forks": 3,
+ "private": false,
+ "name": "jquery-qt-controller",
+ "owner": "adamstac"
+ },
+ {
+ "url": "http://github.com/pengwynn/ujs_sort_helper",
+ "description": "Unobtrusive sort helper for Rails",
+ "open_issues": 1,
+ "homepage": "",
+ "watchers": 9,
+ "fork": false,
+ "forks": 3,
+ "private": false,
+ "name": "ujs_sort_helper",
+ "owner": "pengwynn"
+ },
+ {
+ "url": "http://github.com/TwP/webby",
+ "description": "A lightweight and flexible website management system.",
+ "open_issues": 0,
+ "homepage": "http://webby.rubyforge.org/",
+ "watchers": 280,
+ "fork": false,
+ "forks": 46,
+ "private": false,
+ "name": "webby",
+ "owner": "TwP"
+ },
+ {
+ "url": "http://github.com/edavis10/redmine",
+ "description": "Redmine is a flexible project management web application written using Ruby on Rails framework. This is the official git mirror of the svn repository",
+ "open_issues": 0,
+ "homepage": "http://www.redmine.org",
+ "watchers": 587,
+ "fork": false,
+ "forks": 191,
+ "private": false,
+ "name": "redmine",
+ "owner": "edavis10"
+ },
+ {
+ "url": "http://github.com/bdainton/camptweet",
+ "description": "A simple daemon that polls for updated Twitter statuses, Summize search results, and RSS/Atom feed items and posts them to a Campfire room.",
+ "open_issues": 0,
+ "homepage": "http://github.com/bdainton/camptweet",
+ "watchers": 16,
+ "fork": false,
+ "forks": 2,
+ "private": false,
+ "name": "camptweet",
+ "owner": "bdainton"
+ },
+ {
+ "url": "http://github.com/seaofclouds/tweet",
+ "description": "put twitter on your website with tweet, an unobtrusive javascript plugin for jquery",
+ "open_issues": 9,
+ "homepage": "http://tweet.seaofclouds.com",
+ "watchers": 103,
+ "fork": false,
+ "forks": 18,
+ "private": false,
+ "name": "tweet",
+ "owner": "seaofclouds"
+ },
+ {
+ "url": "http://github.com/squeejee/engines",
+ "description": "The Rails Engines plugin",
+ "open_issues": 0,
+ "homepage": "http://rails-engines.org",
+ "watchers": 8,
+ "fork": true,
+ "forks": 0,
+ "private": false,
+ "name": "engines",
+ "owner": "squeejee"
+ },
+ {
+ "url": "http://github.com/squeejee/redmine",
+ "description": "Redmine is a flexible project management web application written using Ruby on Rails framework. This is an *unofficial* git mirror of the svn repository",
+ "open_issues": 0,
+ "homepage": "http://www.redmine.org",
+ "watchers": 10,
+ "fork": true,
+ "forks": 1,
+ "private": false,
+ "name": "redmine",
+ "owner": "squeejee"
+ },
+ {
+ "url": "http://github.com/squeejee/acts_as_redeemable",
+ "description": "Adds redemption capability to a model for items like coupons, invitation codes, etc.",
+ "open_issues": 0,
+ "homepage": "http://squeejee.com",
+ "watchers": 59,
+ "fork": false,
+ "forks": 6,
+ "private": false,
+ "name": "acts_as_redeemable",
+ "owner": "squeejee"
+ },
+ {
+ "url": "http://github.com/nex3/jabl",
+ "description": "Javascript Abstraction Language",
+ "open_issues": 0,
+ "homepage": "",
+ "watchers": 56,
+ "fork": false,
+ "forks": 0,
+ "private": false,
+ "name": "jabl",
+ "owner": "nex3"
+ },
+ {
+ "url": "http://github.com/boof/action_sequence",
+ "description": "Action Sequencer for Ruby on Rails",
+ "open_issues": 0,
+ "homepage": "http://monkey-patch.me/ruby_on_rails/action_sequence",
+ "watchers": 4,
+ "fork": false,
+ "forks": 1,
+ "private": false,
+ "name": "action_sequence",
+ "owner": "boof"
+ },