README.rdoc in enigma-0.0.1 vs README.rdoc in enigma-0.0.3

- old
+ new

@@ -1,97 +1,17 @@ = enigma -* http://github.com/teejayvanslyke/enigma +Description goes here. -== DESCRIPTION: +== 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. -Key/secret authentication for your web services +== Copyright -== FEATURES/PROBLEMS: - -* I just started implementing this today, so it's really not ready for use. I - would love your opinions about the current API and possible improvements. - -== SYNOPSIS: - -Let's say you have a web service endpoint coded in Sinatra that says "Hello, -world": - - # app.rb - get '/' do - "Hello, world!" - end - -Enigma will allow you to authenticate the service using a key/secret scheme: - - >> Enigma.generate_key - => "03637dee19a1c96c1547f8834ca5e96c" - >> Enigma.generate_secret - => "1f430a0481601697898a566ae54fde5a" - - # app.rb - - Enigma.find_secret do |key| - # Usually, you'd have these stored in your database. - # For this example, we'll just return the secret if we have a matching - # key. - if key == "03637dee19a1c96c1547f8834ca5e96c" - return "1f430a0481601697898a566ae54fde5a" - end - end - - get '/' do - if (params = Enigma.authenticate(params)) - "Hello, world." - else - "Not authorized." - end - end - -It provides a wrapper for the rest-client gem which properly encodes URI -parameters on the query string for consumption by Enigma: - - # client.rb - - client = Enigma::Client.new( - "03637dee19a1c96c1547f8834ca5e96c", - "1f430a0481601697898a566ae54fde5a" - ) - - client.get("http://localhost:4567").body - => "Hello, world." - -The Enigma.authenticate method returns the unencoded parameters if the -authentication is successful; otherwise it returns nil. - -== REQUIREMENTS: - -* ezcrypto - -== INSTALL: - - sudo gem install enigma - -== LICENSE: - -(The MIT License) - -Copyright (c) 2010 FIXME full name - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Copyright (c) 2010 teejayvanslyke. See LICENSE for details.