Skip to content

Commit

Permalink
Small logging/naming tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
rwdaigle committed May 23, 2011
1 parent 69f80df commit 0932746
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
1 change: 1 addition & 0 deletions .rvmrc
@@ -0,0 +1 @@
rvm use ruby-1.9.2@demo.tweetstream --create
12 changes: 12 additions & 0 deletions DEMO
@@ -0,0 +1,12 @@
# Setup

git clone git@github.com:rwdaigle/tweetstream.git
bundle install

# Create & configure

heroku create ryan-tweetstream --stack cedar
heroku config:set TWITTER_USERNAME=rwdaigle TWITTER_PASSWORD=mypass TWITTER_KEYWORD=mykeyword
heroku addons:add pusher:test
heroku addons:upgrade logging:expanded releases:advanced
git push heroku master
2 changes: 1 addition & 1 deletion Gemfile.lock
Expand Up @@ -25,7 +25,7 @@ GEM
simple_oauth (0.1.5)
sinatra (1.2.6)
rack (~> 1.1)
tilt (>= 1.2.2, < 2.0)
tilt (< 2.0, >= 1.2.2)
thin (1.2.11)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
Expand Down
2 changes: 1 addition & 1 deletion Procfile
@@ -1,3 +1,3 @@
web: bundle exec thin start -p $PORT -e $RACK_ENV
worker: bundle exec rake jobs:work
stream: bundle exec rake tweetstream:stream --trace
clock: bundle exec clockwork clock.rb
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -6,7 +6,7 @@ require "tweetstream"

STDOUT.sync = true

task "jobs:work" do
task "tweetstream:stream" do
Pusher.app_id =
TweetStream::Client.new(ENV["TWITTER_USERNAME"], ENV["TWITTER_PASSWORD"]).track(ENV["TWITTER_KEYWORD"]) do |status|
puts "%s: %s" % [ status[:user][:screen_name], status[:text] ]
Expand Down
5 changes: 5 additions & 0 deletions views/index.erb
Expand Up @@ -6,6 +6,11 @@
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js"></script>
<script>
$(window).ready(function() {

Pusher.log = function(message) {
if (window.console && window.console.log) window.console.log(message);
};

var pusher = new Pusher('<%= pusher_api_key %>');
var channel = pusher.subscribe('tweets');

Expand Down

0 comments on commit 0932746

Please sign in to comment.