Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

moving to environment keys

  • Loading branch information...
commit 44275282c07821ddde04599ed690ffa4da10d351 1 parent 33c4536
@ScotterC authored
Showing with 13 additions and 11 deletions.
  1. +5 −5 app.rb
  2. +3 −1 config.ru
  3. +4 −4 tweet_filter.rb
  4. +1 −1  views/clientside.erb
View
10 app.rb
@@ -72,9 +72,9 @@ class App < Sinatra::Base
get '/auth/:provider/callback' do
auth_params = {
- 'username' => 'scott@artsicle.com',
- 'password' => '4braves',
- 'api_token' => 'vsbpJJGisCGibogmzJCEAdcobHtIpGua'
+ 'username' => ENV['POSTEROUS_EMAIL'],
+ 'password' => ENV['POSTEROUS_PASSWORD'],
+ 'api_token' => ENV['POSTEROUS_API_TOKEN']
}
omniauth = request.env['omniauth.auth']
@@ -155,8 +155,8 @@ class App < Sinatra::Base
User.create!(:uid => omniauth[:uid], :nickname => omniauth[:info][:nickname], :token => omniauth[:credentials][:token], :email => omniauth[:info][:email])
- api_key = "9c62b0d2526dee43a19e9a2e3c246dca"
- api_secret = "ac8af199056669266585dd34ee7680be"
+ api_key = ENV['FACE_KEY']
+ api_secret = ENV['FACE_TOKEN']
uids = "#{omniauth[:uid]}@facebook.com"
namespace = "facebook.com"
View
4 config.ru
@@ -8,8 +8,10 @@ if ENV['RACK_ENV'] == 'development'
end
else
use OmniAuth::Builder do
- provider :facebook, '179805312129831', '5c1dcb88994d19b2bb1ea581fe518da9', :scope => SCOPE
+ provider :facebook, ENV['FACEBOOK_KEY'], ENV['FACEBOOK_SECRET'], :scope => SCOPE
end
end
+
+
run App.new
View
8 tweet_filter.rb
@@ -23,10 +23,10 @@ def start(path, query_parameters = {}, &block) #:nodoc:
TweetStream.configure do |config|
- config.consumer_key = 'lDfxmkGkdIZrlMqxciCJ6A'
- config.consumer_secret = 'u84I8ZGY9bjZl2GoG6BwLSV78oj7YtFLzr5ZMkgbfG8'
- config.oauth_token = '90048571-JSrGz2lVHuKpqDLV6FFKI0dT51TNwsQfUs3nOtUGy'
- config.oauth_token_secret = 'Kzp1P40Sa7X0aUADDKQThPUapghR2JfMb5iZc6j8qNY'
+ config.consumer_key = ENV['TWITTER_KEY']
+ config.consumer_secret = ENV['TWITTER_SECRET']
+ config.oauth_token = ENV['TWITTER_OAUTH_TOKEN']
+ config.oauth_token_secret = ENV['TWITTER_OAUTH_SECRET']
config.auth_method = :oauth
config.parser = :yajl
end
View
2  views/clientside.erb
@@ -4,7 +4,7 @@
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
- appId : "<%= ENV['RACK_ENV'] == 'development' ? '282199255185714' : '179805312129831' %>",
+ appId : "<%= ENV['RACK_ENV'] == 'development' ? '282199255185714' : ENV['FACEBOOK_KEY'] %>",
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
Please sign in to comment.
Something went wrong with that request. Please try again.