Permalink
Browse files

Use the .yml based method of storing keys

  • Loading branch information...
1 parent 2e6f1f4 commit ae8cb9597e8b3a47c4b1109c241d77afb6c8d5c1 @courtenay committed Jul 29, 2009
Showing with 5 additions and 3 deletions.
  1. +2 −1 .gitignore
  2. +3 −2 twifter.rb
View
@@ -1,3 +1,4 @@
cache/*.js
cache/*.json
-request.log
+request.log
+keys.yml
View
@@ -76,9 +76,10 @@ def get(path)
class OAuthLogin < R '/login_with_oauth'
def self.consumer
+ @keys ||= YAML.load_file 'keys.yml'
# contains our app details
- @consumer ||= OAuth::Consumer.new "app-token",
- "app-secret", { :site => "http://twitter.com" }
+ @consumer ||= OAuth::Consumer.new @keys['key'],
+ @keys['secret'], { :site => "http://twitter.com" }
end
def get
@request_token = OAuthLogin.consumer.get_request_token(:oauth_callback => "http://localhost:3301/consumer")

0 comments on commit ae8cb95

Please sign in to comment.