Skip to content

Commit

Permalink
check in config file
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengjia committed May 22, 2011
1 parent 02966be commit ca9eaba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
oauth.yml
7 changes: 4 additions & 3 deletions lib/unwatch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ class Unwatch < Sinatra::Base
set :secret, ENV['secret']
else
config = YAML::load(File.open('oauth.yml'))
set :client_id, config['client_id']
set :secret, config['secret']
set :client_id, config['development']['client_id']
set :secret, config['development']['secret']
end
enable :sessions unless test?
enable :static
set :static, true
set :public, 'public'
set :session_secret, "unwatch" # shotgun bug
end

Expand Down
7 changes: 7 additions & 0 deletions oauth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
production:
client_id:
secret:

development:
client_id: bc6bc54131c5a1c2e778
secret: a601e786aaf74b80ea0f742b331a2c9e934d2529

0 comments on commit ca9eaba

Please sign in to comment.