Permalink
Please sign in to comment.
Showing
with
205 additions
and 204 deletions.
- +1 −1 LICENSE
- +39 −38 README.markdown
- +9 −9 lib/faraday/raise_error.rb
- +7 −7 lib/{octopussy.rb → octokit.rb}
- +30 −0 lib/octokit/client.rb
- +1 −1 lib/{octopussy → octokit}/client/authentication.rb
- +1 −1 lib/{octopussy → octokit}/client/commits.rb
- +1 −1 lib/{octopussy → octokit}/client/connection.rb
- +1 −1 lib/{octopussy → octokit}/client/issues.rb
- +1 −1 lib/{octopussy → octokit}/client/network.rb
- +1 −1 lib/{octopussy → octokit}/client/objects.rb
- +1 −1 lib/{octopussy → octokit}/client/organizations.rb
- +1 −1 lib/{octopussy → octokit}/client/pulls.rb
- +1 −1 lib/{octopussy → octokit}/client/repositories.rb
- +1 −1 lib/{octopussy → octokit}/client/request.rb
- +1 −1 lib/{octopussy → octokit}/client/timelines.rb
- +1 −1 lib/{octopussy → octokit}/client/users.rb
- +2 −2 lib/{octopussy → octokit}/configuration.rb
- +1 −1 lib/{octopussy → octokit}/event.rb
- +1 −1 lib/{octopussy → octokit}/repository.rb
- +3 −0 lib/octokit/version.rb
- +0 −30 lib/octopussy/client.rb
- +0 −3 lib/octopussy/version.rb
- +5 −5 octopussy.gemspec → octokit.gemspec
- +21 −21 test/fixtures/timeline.json
- +3 −3 test/helper.rb
- +68 −68 test/{octopussy_test.rb → octokit_test.rb}
- +3 −3 test/repository_test.rb
@@ -1,68 +1,69 @@ | ||
-# octopussy | ||
- | ||
-<img src='http://upload.wikimedia.org/wikipedia/en/b/bb/007Octopussyposter.jpg' style='float: right; margin: 0 0 10px 10px'/> | ||
- | ||
+Octokit | ||
+======= | ||
Simple Ruby wrapper for the GitHub v2 API. | ||
-## Installation | ||
- | ||
- sudo gem install octopussy | ||
+Installation | ||
+------------ | ||
+ gem install octokit | ||
-## Some examples | ||
+Some examples | ||
+------------- | ||
### Show a user | ||
- Octopussy.user('pengwynn') | ||
+ Octokit.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') | ||
+ Octokit.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 | ||
- | ||
+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 | ||
+* instance of Repository | ||
### Show a repo | ||
- Octopussy.repo("pengwynn/linkedin") | ||
+ Octokit.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 | ||
- | ||
+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 = Octokit::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) | ||
- | ||
-## TODO | ||
+Read the full [docs](http://rdoc.info/projects/pengwynn/octokit) | ||
+TODO | ||
+---- | ||
* Feed parsing | ||
* More 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. | ||
+Submitting a Pull Request | ||
+------------------------- | ||
+1. Fork the project. | ||
+2. Create a topic branch. | ||
+3. Implement your feature or bug fix. | ||
+4. Add documentation for your feature or bug fix. | ||
+5. Run <tt>bundle exec rake doc:yard</tt>. If your changes are not 100% documented, go back to step 4. | ||
+6. Add specs for your feature or bug fix. | ||
+7. Run <tt>bundle exec rake spec</tt>. If your changes are not 100% covered, go back to step 6. | ||
+8. Commit and push your changes. | ||
+9. Submit a pull request. Please do not include changes to the version or gemspec. (If you want to create your own version for some reason, please do so in a separate commit.) | ||
+ | ||
+Credits | ||
+------- | ||
+Octokit is inspired by [Octopi](http://github.com/fcoury/octopi) and aims to be a lightweight, less active-resourcey alternative. | ||
+ | ||
+Copyright | ||
+--------- | ||
+Copyright (c) 2011 [Wynn Netherland](http://wynnnetherland.com), [Adam Stacoviak](http://adamstacoviak.com/), [Erik Michaels-Ober](https://github.com/sferik). | ||
+See [LICENSE](https://github.com/pengwynn/octokit/blob/master/LICENSE) for details. |
@@ -0,0 +1,30 @@ | ||
+require File.expand_path('../event', __FILE__) | ||
+require File.expand_path('../repository', __FILE__) | ||
+Dir[File.expand_path('../client/*.rb', __FILE__)].each{|file| require file} | ||
+ | ||
+module Octokit | ||
+ class Client | ||
+ attr_accessor *Configuration::VALID_OPTIONS_KEYS | ||
+ | ||
+ def initialize(options={}) | ||
+ options = Octokit.options.merge(options) | ||
+ Configuration::VALID_OPTIONS_KEYS.each do |key| | ||
+ send("#{key}=", options[key]) | ||
+ end | ||
+ end | ||
+ | ||
+ include Octokit::Client::Authentication | ||
+ include Octokit::Client::Connection | ||
+ include Octokit::Client::Request | ||
+ | ||
+ include Octokit::Client::Commits | ||
+ include Octokit::Client::Issues | ||
+ include Octokit::Client::Network | ||
+ include Octokit::Client::Objects | ||
+ include Octokit::Client::Organizations | ||
+ include Octokit::Client::Pulls | ||
+ include Octokit::Client::Repositories | ||
+ include Octokit::Client::Timelines | ||
+ include Octokit::Client::Users | ||
+ end | ||
+end |
@@ -0,0 +1,3 @@ | ||
+module Octokit | ||
+ VERSION = "0.3.0".freeze unless defined?(Octokit::VERSION) | ||
+end |
@@ -1,30 +0,0 @@ | ||
-require File.expand_path('../event', __FILE__) | ||
-require File.expand_path('../repository', __FILE__) | ||
-Dir[File.expand_path('../client/*.rb', __FILE__)].each{|file| require file} | ||
- | ||
-module Octopussy | ||
- class Client | ||
- attr_accessor *Configuration::VALID_OPTIONS_KEYS | ||
- | ||
- def initialize(options={}) | ||
- options = Octopussy.options.merge(options) | ||
- Configuration::VALID_OPTIONS_KEYS.each do |key| | ||
- send("#{key}=", options[key]) | ||
- end | ||
- end | ||
- | ||
- include Octopussy::Client::Authentication | ||
- include Octopussy::Client::Connection | ||
- include Octopussy::Client::Request | ||
- | ||
- include Octopussy::Client::Commits | ||
- include Octopussy::Client::Issues | ||
- include Octopussy::Client::Network | ||
- include Octopussy::Client::Objects | ||
- include Octopussy::Client::Organizations | ||
- include Octopussy::Client::Pulls | ||
- include Octopussy::Client::Repositories | ||
- include Octopussy::Client::Timelines | ||
- include Octopussy::Client::Users | ||
- end | ||
-end |
@@ -1,3 +0,0 @@ | ||
-module Octopussy | ||
- VERSION = "0.3.0".freeze unless defined?(Octopussy::VERSION) | ||
-end |

Oops, something went wrong.
0 comments on commit
f46bf33