Permalink
Browse files

add docs about authentication for api and publishing gems, close #4

  • Loading branch information...
1 parent ac02999 commit 78eec7bd6c19a23d579c1e651fdaf60b940dd558 @cldwalker cldwalker committed Aug 27, 2011
Showing with 20 additions and 8 deletions.
  1. +9 −8 make-your-own-gem.md
  2. +11 −0 rubygems-org-api.md
View
@@ -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: nick@quaran.to
- Password:
- Signed in.
Pushing gem to RubyGems.org...
Successfully registered gem: hola (0.0.0)
View
@@ -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
------------

0 comments on commit 78eec7b

Please sign in to comment.