fcoury / octopi

A Ruby interface to GitHub API v2
http://hasmany.info/2009/4/18/ruby-interface-to-github-api
MIT License
216 stars 47 forks source link

Explicit Authentication example is wrong #59

Closed jeffWelling closed 12 years ago

jeffWelling commented 13 years ago

The example of Explicit Authentication number 1 is wrong, trying this code in irb shows; http://pastie.org/1841919

radar commented 13 years ago

Are you able to submit a patch to fix this issue? I think it should be repo.issues.create.

nithinbekal commented 12 years ago

Shouldn't it be like this:

authenticated_with :login => 'nithinbekal', :token => '...' do
  repo = Repository.find(name:'test', user:'nithinbekal')
  issue = Issue.open :repo => repo, 
    :params => {:title=> "fake ticket", :body=> "This issue was opened with octopi"}
  puts issue.number
end

That worked when I tried to open an issue on one of my repositories.

radar commented 12 years ago

@nithinbekal: Are you able to submit a pull request with that fix then please? Just mainly so I can attribute it easily to you :) Thanks!

nithinbekal commented 12 years ago

@radar Done! :)

radar commented 12 years ago

Thank you!! <3