Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

HAPPINESS!!!

  • Loading branch information...
commit 4dcc274b6f16e6db5fae1386f28cf6fa164fbbfc 0 parents
@coreyhaines authored
1  .rvmrc
@@ -0,0 +1 @@
+rvm use 1.9.2@happinessbot
12 Gemfile
@@ -0,0 +1,12 @@
+source "http://rubygems.org"
+gem "tweetbot", "~> 0.1.3"
+
+group "development" do
+ gem 'heroku'
+ gem 'foreman'
+end
+
+
+group "development", "test" do
+ gem 'rspec'
+end
70 Gemfile.lock
@@ -0,0 +1,70 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ activesupport (3.1.3)
+ multi_json (~> 1.0)
+ addressable (2.2.6)
+ daemons (1.1.4)
+ diff-lcs (1.1.3)
+ eventmachine (0.12.10)
+ faraday (0.7.5)
+ addressable (~> 2.2.6)
+ multipart-post (~> 1.1.3)
+ rack (< 2, >= 1.1.0)
+ foreman (0.26.1)
+ term-ansicolor (~> 1.0.5)
+ thor (>= 0.13.6)
+ heroku (2.14.0)
+ launchy (>= 0.3.2)
+ rest-client (~> 1.6.1)
+ rubyzip
+ term-ansicolor (~> 1.0.5)
+ http_parser.rb (0.5.3)
+ launchy (2.0.5)
+ addressable (~> 2.2.6)
+ mime-types (1.17.2)
+ multi_json (1.0.3)
+ multipart-post (1.1.3)
+ rack (1.3.5)
+ rest-client (1.6.7)
+ mime-types (>= 1.16)
+ rspec (2.7.0)
+ rspec-core (~> 2.7.0)
+ rspec-expectations (~> 2.7.0)
+ rspec-mocks (~> 2.7.0)
+ rspec-core (2.7.1)
+ rspec-expectations (2.7.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.7.0)
+ rubyzip (0.9.4)
+ simple_oauth (0.1.5)
+ term-ansicolor (1.0.7)
+ thor (0.14.6)
+ tweetbot (0.1.5)
+ tweetstream
+ twitter
+ tweetstream (1.1.3)
+ daemons (~> 1.1.4)
+ multi_json (~> 1.0.3)
+ twitter-stream (~> 0.1.14)
+ twitter (2.0.0)
+ activesupport (~> 3.0)
+ faraday (~> 0.7)
+ multi_json (~> 1.0)
+ simple_oauth (~> 0.1)
+ twitter-text (~> 1.4)
+ twitter-stream (0.1.14)
+ eventmachine (>= 0.12.8)
+ http_parser.rb (~> 0.5.1)
+ simple_oauth (~> 0.1.4)
+ twitter-text (1.4.13)
+ activesupport
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ foreman
+ heroku
+ rspec
+ tweetbot (~> 0.1.3)
1  Procfile
@@ -0,0 +1 @@
+bot: bundle exec ruby run_bot.rb
22 run_bot.rb
@@ -0,0 +1,22 @@
+load 'twitter_auth.rb'
+require 'tweetbot'
+
+bot = TweetBot.configure do |config|
+ config.response_frequency = 1
+
+ config.respond_to_phrase "good morning" do |responses|
+ responses << "And a good morning to you! Have a fantastic day today! Remember how awesome you are!" << "It is a good morning. And the world is better because you are here."<< "Good Morning! You deserve a fantastic day today! Enjoy!"<< "And a wonderful morning to you, too! Every day opens with new possibilities. Enjoy!"<< "Good Morning! Thanks for being awesome. Enjoy your day!" << "Enjoy your day! Life is great, and you make it even better!" << "I hope your day today is wonderful! You deserve it!" << "I hope today is wonderful for you. Thanks for being great!" << "Every day has new potential and possibilities. You deserve to enjoy them!" << "Enjoy your morning! Relax and take a deep breath. Remember you are awesome!"
+ end
+
+ # config.respond_to_phrase "good day" do |responses|
+ # responses << "What a great day, indeed! Enjoy it, because you deserve it!" << "This day really is better because you are here. Thanks for being awesome!"
+ # end
+
+ # config.respond_to_phrase "good night" do |responses|
+ # responses << "Sweet dreams! I hope your day was great and tomorrow is better!" << "Thanks for the good night wishes! Enjoy your rest and have a great day tomorrow!"
+ # end
+
+ config.twitter_auth = TwitterAuth::AuthKeys
+end
+
+bot.talk
14 twitter_auth.rb
@@ -0,0 +1,14 @@
+module TwitterAuth
+ MyName = ENV["BOT_NAME"]
+ ApigeeEnpoint = ENV["APIGEE_TWITTER_API_ENDPOINT"]
+ def self.use_apigee?
+ !ApigeeEnpoint.nil?
+ end
+ AuthKeys = {
+ consumer_key: ENV["BOT_TWITTER_CONSUMER_KEY"],
+ consumer_secret: ENV["BOT_TWITTER_CONSUMER_SECRET"],
+ oauth_token: ENV["BOT_TWITTER_OAUTH_TOKEN"],
+ oauth_token_secret: ENV["BOT_TWITTER_OAUTH_TOKEN_SECRET"]
+ }
+end
+
Please sign in to comment.
Something went wrong with that request. Please try again.