Skip to content

Commit

Permalink
add docs about authentication for api and publishing gems, close #4
Browse files Browse the repository at this point in the history
  • Loading branch information
cldwalker committed Aug 27, 2011
1 parent ac02999 commit 78eec7b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
17 changes: 9 additions & 8 deletions make-your-own-gem.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,17 @@ Of course, our smoke test isn’t over yet: Let’s `require` our gem and use it
>> Hola.hi
Hello world!

Hola now needs to be shared with the rest of the Ruby community. Publishing
your gem out to RubyGems.org only takes one command, granted you have an
account on the site. Once you’re signed up, then you can push out a gem.
Hola now needs to be shared with the rest of the Ruby community. Publishing your
gem out to RubyGems.org only takes one command, granted you have an account on
the site. To setup your computer with your rubygems account:

$ curl -u qrush https://rubygems.org/api/v1/api_key.yaml >
~/.gem/credentials
Enter host password for user 'qrush':

Once this has been setup, push out the gem:

% gem push hola-0.0.0.gem
Enter your RubyGems.org credentials.
Don't have an account yet? Create one at http://rubygems.org/sign_up
Email: [email protected]
Password:
Signed in.
Pushing gem to RubyGems.org...
Successfully registered gem: hola (0.0.0)

Expand Down
11 changes: 11 additions & 0 deletions rubygems-org-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ add owners, and more.
* [Webhook Methods](#webhook): Manage notifications for when gems are pushed
* [Misc Methods](#misc): Various other interactions with the site

<a id="authorization"> </a>
API Authorization
-----------------

Some API calls require an Authorization header. To find your API key, click on
your username when logged in and then click on 'Edit Profile'. An example of
using the API key:

$ curl -H 'Authorization:YOUR_API_KEY' \
https://rubygems.org/api/v1/some_api_call.json

<a id="library"> </a>
Ruby Library
------------
Expand Down

0 comments on commit 78eec7b

Please sign in to comment.