horse 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +44 -0
- data/Rakefile +10 -0
- data/horse.gemspec +26 -0
- data/lib/horse/funny_tweet.rb +12 -0
- data/lib/horse/pending_tweets.rb +6 -0
- data/lib/horse/previously_made_tweets.rb +6 -0
- data/lib/horse/tweeter.rb +6 -0
- data/lib/horse/version.rb +3 -0
- data/lib/horse.rb +33 -0
- data/test/horse/funny_tweet_test.rb +90 -0
- data/test/horse/pending_tweets_test.rb +46 -0
- data/test/horse/previously_made_tweets_test.rb +22 -0
- data/test/horse/tweeter_test.rb +22 -0
- data/test/horse_test.rb +52 -0
- data/test/test_helper.rb +6 -0
- data/upcoming_tweets.txt +2 -0
- metadata +139 -0
    
        checksums.yaml
    ADDED
    
    | @@ -0,0 +1,7 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            SHA1:
         | 
| 3 | 
            +
              metadata.gz: 22170491444dd3e894eaf5a4f643dbe2e180823e
         | 
| 4 | 
            +
              data.tar.gz: 3a2eac39de166a871b6e37453b9ba4ec9faef7d2
         | 
| 5 | 
            +
            SHA512:
         | 
| 6 | 
            +
              metadata.gz: c9e3d18663be7b83e43435a3e7daedcf1036bb1b3e49c6c7fe037180bf71b1f8ba2b43a35c51d8ea7ca6b7133de896d11c3cf4c3bdc2d812908e7e5271e8d7ab
         | 
| 7 | 
            +
              data.tar.gz: 549b3a0ba51981cb2443aa8ed057edb3b94d036d1b27f42fd195f032ed42d14fbe9b004c33b0a269da25a9e86c040024cd6bbd07923a0aa4ab875abf3a6c5be6
         | 
    
        data/.gitignore
    ADDED
    
    
    
        data/Gemfile
    ADDED
    
    
    
        data/LICENSE.txt
    ADDED
    
    | @@ -0,0 +1,22 @@ | |
| 1 | 
            +
            Copyright (c) 2014 Darren Cauthon
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            MIT License
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            Permission is hereby granted, free of charge, to any person obtaining
         | 
| 6 | 
            +
            a copy of this software and associated documentation files (the
         | 
| 7 | 
            +
            "Software"), to deal in the Software without restriction, including
         | 
| 8 | 
            +
            without limitation the rights to use, copy, modify, merge, publish,
         | 
| 9 | 
            +
            distribute, sublicense, and/or sell copies of the Software, and to
         | 
| 10 | 
            +
            permit persons to whom the Software is furnished to do so, subject to
         | 
| 11 | 
            +
            the following conditions:
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            The above copyright notice and this permission notice shall be
         | 
| 14 | 
            +
            included in all copies or substantial portions of the Software.
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
         | 
| 17 | 
            +
            EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
         | 
| 18 | 
            +
            MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
         | 
| 19 | 
            +
            NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
         | 
| 20 | 
            +
            LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
         | 
| 21 | 
            +
            OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
         | 
| 22 | 
            +
            WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
         | 
    
        data/README.md
    ADDED
    
    | @@ -0,0 +1,44 @@ | |
| 1 | 
            +
            # Horse
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            Tweet things on twitter.
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            ## Usage
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            ````ruby
         | 
| 8 | 
            +
            options = {
         | 
| 9 | 
            +
                        consumer_key:        'your twitter consumer key',
         | 
| 10 | 
            +
                        consumer_secret:     'your twitter consumer secret',
         | 
| 11 | 
            +
                        access_token:        'your twitter access token',
         | 
| 12 | 
            +
                        access_token_secret: 'your twitter access token secret',
         | 
| 13 | 
            +
                        twitter_username:    'your twitter username',
         | 
| 14 | 
            +
                        pending_tweets:      -> { ["here's one tweet",
         | 
| 15 | 
            +
                                                   "here's another tweet"] }
         | 
| 16 | 
            +
                      }
         | 
| 17 | 
            +
            Horse.setup(options)
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            # this will tweet one of the pending tweets
         | 
| 20 | 
            +
            # that have not been tweeted previously
         | 
| 21 | 
            +
            Horse.tweet_something_new
         | 
| 22 | 
            +
            ````
         | 
| 23 | 
            +
             | 
| 24 | 
            +
            ## Installation
         | 
| 25 | 
            +
             | 
| 26 | 
            +
            Add this line to your application's Gemfile:
         | 
| 27 | 
            +
             | 
| 28 | 
            +
                gem 'horse'
         | 
| 29 | 
            +
             | 
| 30 | 
            +
            And then execute:
         | 
| 31 | 
            +
             | 
| 32 | 
            +
                $ bundle
         | 
| 33 | 
            +
             | 
| 34 | 
            +
            Or install it yourself as:
         | 
| 35 | 
            +
             | 
| 36 | 
            +
                $ gem install horse
         | 
| 37 | 
            +
             | 
| 38 | 
            +
            ## Contributing
         | 
| 39 | 
            +
             | 
| 40 | 
            +
            1. Fork it ( http://github.com/<my-github-username>/horse/fork )
         | 
| 41 | 
            +
            2. Create your feature branch (`git checkout -b my-new-feature`)
         | 
| 42 | 
            +
            3. Commit your changes (`git commit -am 'Add some feature'`)
         | 
| 43 | 
            +
            4. Push to the branch (`git push origin my-new-feature`)
         | 
| 44 | 
            +
            5. Create new Pull Request
         | 
    
        data/Rakefile
    ADDED
    
    
    
        data/horse.gemspec
    ADDED
    
    | @@ -0,0 +1,26 @@ | |
| 1 | 
            +
            # coding: utf-8
         | 
| 2 | 
            +
            lib = File.expand_path('../lib', __FILE__)
         | 
| 3 | 
            +
            $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
         | 
| 4 | 
            +
            require 'horse/version'
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            Gem::Specification.new do |spec|
         | 
| 7 | 
            +
              spec.name          = "horse"
         | 
| 8 | 
            +
              spec.version       = Horse::VERSION
         | 
| 9 | 
            +
              spec.authors       = ["Darren Cauthon"]
         | 
| 10 | 
            +
              spec.email         = ["darren@cauthon.com"]
         | 
| 11 | 
            +
              spec.summary       = %q{Automate your horse tweets.}
         | 
| 12 | 
            +
              spec.description   = %q{}
         | 
| 13 | 
            +
              spec.homepage      = ""
         | 
| 14 | 
            +
              spec.license       = "MIT"
         | 
| 15 | 
            +
             | 
| 16 | 
            +
              spec.files         = `git ls-files`.split($/)
         | 
| 17 | 
            +
              spec.executables   = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
         | 
| 18 | 
            +
              spec.test_files    = spec.files.grep(%r{^(test|spec|features)/})
         | 
| 19 | 
            +
              spec.require_paths = ["lib"]
         | 
| 20 | 
            +
             | 
| 21 | 
            +
              spec.add_development_dependency "bundler", "~> 1.5"
         | 
| 22 | 
            +
              spec.add_development_dependency "rake"
         | 
| 23 | 
            +
              spec.add_development_dependency "subtle"
         | 
| 24 | 
            +
              spec.add_development_dependency "mocha"
         | 
| 25 | 
            +
              spec.add_runtime_dependency "twitter"
         | 
| 26 | 
            +
            end
         | 
| @@ -0,0 +1,12 @@ | |
| 1 | 
            +
            module Horse::FunnyTweet
         | 
| 2 | 
            +
              def self.next
         | 
| 3 | 
            +
                results = Horse::PendingTweets.all
         | 
| 4 | 
            +
             | 
| 5 | 
            +
                previously_made_tweets = Horse::PreviouslyMadeTweets.all
         | 
| 6 | 
            +
                if previously_made_tweets.count > 0
         | 
| 7 | 
            +
                  results = results.reject { |x| previously_made_tweets.include? x }
         | 
| 8 | 
            +
                end
         | 
| 9 | 
            +
                results.sample
         | 
| 10 | 
            +
              end
         | 
| 11 | 
            +
            end
         | 
| 12 | 
            +
             | 
    
        data/lib/horse.rb
    ADDED
    
    | @@ -0,0 +1,33 @@ | |
| 1 | 
            +
            require 'twitter'
         | 
| 2 | 
            +
            Dir[File.dirname(__FILE__) + '/horse/*.rb'].each { |file| require file }
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            module Horse
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              def self.setup options
         | 
| 7 | 
            +
                @options = options
         | 
| 8 | 
            +
              end
         | 
| 9 | 
            +
             | 
| 10 | 
            +
              def self.tweet_something_new
         | 
| 11 | 
            +
                funny_tweet = FunnyTweet.next
         | 
| 12 | 
            +
                return unless funny_tweet
         | 
| 13 | 
            +
                Tweeter.tweet funny_tweet
         | 
| 14 | 
            +
              end
         | 
| 15 | 
            +
             | 
| 16 | 
            +
              def self.twitter_client
         | 
| 17 | 
            +
                @client ||= Twitter::REST::Client.new do |config|
         | 
| 18 | 
            +
                              config.consumer_key        = @options[:consumer_key]
         | 
| 19 | 
            +
                              config.consumer_secret     = @options[:consumer_secret]
         | 
| 20 | 
            +
                              config.access_token        = @options[:access_token]
         | 
| 21 | 
            +
                              config.access_token_secret = @options[:access_token_secret]
         | 
| 22 | 
            +
                            end
         | 
| 23 | 
            +
              end
         | 
| 24 | 
            +
             | 
| 25 | 
            +
              def self.twitter_username
         | 
| 26 | 
            +
                @options[:twitter_username]
         | 
| 27 | 
            +
              end
         | 
| 28 | 
            +
             | 
| 29 | 
            +
              def self.method_to_get_tweets
         | 
| 30 | 
            +
                @options[:pending_tweets]
         | 
| 31 | 
            +
              end
         | 
| 32 | 
            +
             | 
| 33 | 
            +
            end
         | 
| @@ -0,0 +1,90 @@ | |
| 1 | 
            +
            require_relative '../test_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe Horse::FunnyTweet do
         | 
| 4 | 
            +
             | 
| 5 | 
            +
              describe "determining the next tweet" do
         | 
| 6 | 
            +
             | 
| 7 | 
            +
                describe "when no tweets have been made previously" do
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                  before do
         | 
| 10 | 
            +
                    Horse::PreviouslyMadeTweets.stubs(:all).returns []
         | 
| 11 | 
            +
                  end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                  describe "no pending tweets exist" do
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                    it "should return nil" do
         | 
| 16 | 
            +
                      Horse::PendingTweets.stubs(:all).returns []
         | 
| 17 | 
            +
                      Horse::FunnyTweet.next.nil?.must_equal true
         | 
| 18 | 
            +
                    end
         | 
| 19 | 
            +
             | 
| 20 | 
            +
                  end
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                  describe "pending tweets exist" do
         | 
| 23 | 
            +
             | 
| 24 | 
            +
                    it "should return a random result" do
         | 
| 25 | 
            +
                      expected_result = Object.new
         | 
| 26 | 
            +
             | 
| 27 | 
            +
                      array = [1, 2, 3]
         | 
| 28 | 
            +
                      array.stubs(:sample).returns expected_result
         | 
| 29 | 
            +
             | 
| 30 | 
            +
                      Horse::PendingTweets.stubs(:all).returns array
         | 
| 31 | 
            +
             | 
| 32 | 
            +
                      Horse::FunnyTweet.next.must_be_same_as expected_result
         | 
| 33 | 
            +
                    end
         | 
| 34 | 
            +
             | 
| 35 | 
            +
                  end
         | 
| 36 | 
            +
             | 
| 37 | 
            +
                end
         | 
| 38 | 
            +
             | 
| 39 | 
            +
                describe "when tweets have been made previously" do
         | 
| 40 | 
            +
             | 
| 41 | 
            +
                  ['a', 'b', 'c'].each do |tweet|
         | 
| 42 | 
            +
             | 
| 43 | 
            +
                    describe "when one tweet exists that has been tweeted before" do
         | 
| 44 | 
            +
             | 
| 45 | 
            +
                      it "should return nothing" do
         | 
| 46 | 
            +
                        Horse::PendingTweets.stubs(:all).returns [tweet]
         | 
| 47 | 
            +
                        Horse::PreviouslyMadeTweets.stubs(:all).returns [tweet]
         | 
| 48 | 
            +
             | 
| 49 | 
            +
                        Horse::FunnyTweet.next.nil?.must_equal true
         | 
| 50 | 
            +
                      end
         | 
| 51 | 
            +
             | 
| 52 | 
            +
                    end
         | 
| 53 | 
            +
             | 
| 54 | 
            +
                    describe "when one tweet exists that has not been tweeted before" do
         | 
| 55 | 
            +
             | 
| 56 | 
            +
                      it "should return nothing" do
         | 
| 57 | 
            +
                        Horse::PendingTweets.stubs(:all).returns [tweet]
         | 
| 58 | 
            +
                        Horse::PreviouslyMadeTweets.stubs(:all).returns [tweet + '.']
         | 
| 59 | 
            +
             | 
| 60 | 
            +
                        Horse::FunnyTweet.next.must_equal tweet
         | 
| 61 | 
            +
                      end
         | 
| 62 | 
            +
             | 
| 63 | 
            +
                    end
         | 
| 64 | 
            +
             | 
| 65 | 
            +
                  end
         | 
| 66 | 
            +
             | 
| 67 | 
            +
                  describe "when multiple results and matches exist" do
         | 
| 68 | 
            +
                    it "should return a sample of the tweets that have not been tweeted before" do
         | 
| 69 | 
            +
             | 
| 70 | 
            +
                      Horse::PendingTweets.stubs(:all).returns ['a', 'b', 'c', 'd']
         | 
| 71 | 
            +
                      Horse::PreviouslyMadeTweets.stubs(:all).returns ['a', 'z', 'c', 'y']
         | 
| 72 | 
            +
             | 
| 73 | 
            +
             | 
| 74 | 
            +
                      matches = []
         | 
| 75 | 
            +
                      (1..1000).each do
         | 
| 76 | 
            +
                        result = Horse::FunnyTweet.next
         | 
| 77 | 
            +
                        ['b', 'd'].include?(result).must_equal true
         | 
| 78 | 
            +
                        matches << result
         | 
| 79 | 
            +
                      end
         | 
| 80 | 
            +
             | 
| 81 | 
            +
                      matches.group_by { |x| x }.map { |x| x[0] }.sort_by { |x| x }.must_equal ['b', 'd']
         | 
| 82 | 
            +
                    end
         | 
| 83 | 
            +
             | 
| 84 | 
            +
                  end
         | 
| 85 | 
            +
             | 
| 86 | 
            +
                end
         | 
| 87 | 
            +
             | 
| 88 | 
            +
              end
         | 
| 89 | 
            +
             | 
| 90 | 
            +
            end
         | 
| @@ -0,0 +1,46 @@ | |
| 1 | 
            +
            require_relative '../test_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe Horse::PendingTweets do
         | 
| 4 | 
            +
             | 
| 5 | 
            +
              describe 'one example' do
         | 
| 6 | 
            +
             | 
| 7 | 
            +
                let(:tweets) { ['one'] }
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                before do
         | 
| 10 | 
            +
                  method = -> { tweets }
         | 
| 11 | 
            +
                  Horse.stubs(:method_to_get_tweets).returns method
         | 
| 12 | 
            +
                end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                it "should return the tweets" do
         | 
| 15 | 
            +
                  Horse::PendingTweets.all.must_equal tweets
         | 
| 16 | 
            +
                end
         | 
| 17 | 
            +
              end
         | 
| 18 | 
            +
             | 
| 19 | 
            +
              describe 'another example' do
         | 
| 20 | 
            +
             | 
| 21 | 
            +
                let(:tweets) { ['one', 'two', 'three'] }
         | 
| 22 | 
            +
             | 
| 23 | 
            +
                before do
         | 
| 24 | 
            +
                  method = -> { tweets }
         | 
| 25 | 
            +
                  Horse.stubs(:method_to_get_tweets).returns method
         | 
| 26 | 
            +
                end
         | 
| 27 | 
            +
             | 
| 28 | 
            +
                it "should return the tweets" do
         | 
| 29 | 
            +
                  Horse::PendingTweets.all.must_equal tweets
         | 
| 30 | 
            +
                end
         | 
| 31 | 
            +
              end
         | 
| 32 | 
            +
             | 
| 33 | 
            +
              describe "example with extra whitespace" do
         | 
| 34 | 
            +
             | 
| 35 | 
            +
                let(:tweets) { [' one ', '    two ', "\tthree\n\n\n"] }
         | 
| 36 | 
            +
             | 
| 37 | 
            +
                before do
         | 
| 38 | 
            +
                  method = -> { tweets }
         | 
| 39 | 
            +
                  Horse.stubs(:method_to_get_tweets).returns method
         | 
| 40 | 
            +
                end
         | 
| 41 | 
            +
             | 
| 42 | 
            +
                it "should return the tweets" do
         | 
| 43 | 
            +
                  Horse::PendingTweets.all.must_equal ['one', 'two', 'three']
         | 
| 44 | 
            +
                end
         | 
| 45 | 
            +
              end
         | 
| 46 | 
            +
            end
         | 
| @@ -0,0 +1,22 @@ | |
| 1 | 
            +
            require_relative '../test_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe Horse::PreviouslyMadeTweets do
         | 
| 4 | 
            +
             | 
| 5 | 
            +
              it "should return the text of the tweets" do
         | 
| 6 | 
            +
                twitter_username = Object.new
         | 
| 7 | 
            +
                client           = Object.new
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                Horse.stubs(:twitter_username).returns twitter_username
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                tweets = [:text].to_objects { [[Object.new], [Object.new]] }
         | 
| 12 | 
            +
                client.stubs(:user_timeline).with(twitter_username).returns tweets
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                Twitter.stubs(:client).returns client
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                results = Horse::PreviouslyMadeTweets.all
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                results.count.must_equal 2
         | 
| 19 | 
            +
                tweets.each { |x| results.include?(x.text).must_equal true }
         | 
| 20 | 
            +
              end
         | 
| 21 | 
            +
             | 
| 22 | 
            +
            end
         | 
| @@ -0,0 +1,22 @@ | |
| 1 | 
            +
            require_relative '../test_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe Horse::Tweeter do
         | 
| 4 | 
            +
             | 
| 5 | 
            +
              describe "tweet" do
         | 
| 6 | 
            +
             | 
| 7 | 
            +
                it "should pass the tweet to the Twitter client update" do
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                  tweet = Object.new
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                  client = Object.new
         | 
| 12 | 
            +
                  client.expects(:update).with tweet
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                  Horse.expects(:twitter_client).returns client
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                  Horse::Tweeter.tweet tweet
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                end
         | 
| 19 | 
            +
             | 
| 20 | 
            +
              end
         | 
| 21 | 
            +
             | 
| 22 | 
            +
            end
         | 
    
        data/test/horse_test.rb
    ADDED
    
    | @@ -0,0 +1,52 @@ | |
| 1 | 
            +
            require_relative 'test_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe Horse do
         | 
| 4 | 
            +
             | 
| 5 | 
            +
              describe "setting up" do
         | 
| 6 | 
            +
                it "should be able to pull a twitter client" do
         | 
| 7 | 
            +
                  Horse.setup({})
         | 
| 8 | 
            +
                  Horse.twitter_client.is_a?(Twitter::REST::Client).must_equal true
         | 
| 9 | 
            +
                end
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                it "should pass the pending tweets as a block" do
         | 
| 12 | 
            +
                  method = Object.new
         | 
| 13 | 
            +
                  Horse.setup( { pending_tweets: method } )
         | 
| 14 | 
            +
                  Horse.method_to_get_tweets.must_be_same_as method
         | 
| 15 | 
            +
                end
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                it "should pass the twitter username" do
         | 
| 18 | 
            +
                  username = Object.new
         | 
| 19 | 
            +
                  Horse.setup( { twitter_username: username } )
         | 
| 20 | 
            +
                  Horse.twitter_username.must_be_same_as username
         | 
| 21 | 
            +
                end
         | 
| 22 | 
            +
              end
         | 
| 23 | 
            +
             | 
| 24 | 
            +
              describe "tweeting something new" do
         | 
| 25 | 
            +
             | 
| 26 | 
            +
                describe "a new funny tweet exists" do
         | 
| 27 | 
            +
             | 
| 28 | 
            +
                  it "should tweet it" do
         | 
| 29 | 
            +
                    funny_tweet = Object.new
         | 
| 30 | 
            +
             | 
| 31 | 
            +
                    Horse::FunnyTweet.stubs(:next).returns funny_tweet
         | 
| 32 | 
            +
                    Horse::Tweeter.expects(:tweet).with funny_tweet
         | 
| 33 | 
            +
             | 
| 34 | 
            +
                    Horse.tweet_something_new
         | 
| 35 | 
            +
                  end
         | 
| 36 | 
            +
             | 
| 37 | 
            +
                end
         | 
| 38 | 
            +
             | 
| 39 | 
            +
                describe "no funny tweet exists" do
         | 
| 40 | 
            +
             | 
| 41 | 
            +
                  it "should not tweet it" do
         | 
| 42 | 
            +
                    Horse::FunnyTweet.stubs(:next).returns nil
         | 
| 43 | 
            +
                    Horse::Tweeter.expects(:tweet).never
         | 
| 44 | 
            +
             | 
| 45 | 
            +
                    Horse.tweet_something_new
         | 
| 46 | 
            +
                  end
         | 
| 47 | 
            +
             | 
| 48 | 
            +
                end
         | 
| 49 | 
            +
             | 
| 50 | 
            +
              end
         | 
| 51 | 
            +
             | 
| 52 | 
            +
            end
         | 
    
        data/test/test_helper.rb
    ADDED
    
    
    
        data/upcoming_tweets.txt
    ADDED
    
    
    
        metadata
    ADDED
    
    | @@ -0,0 +1,139 @@ | |
| 1 | 
            +
            --- !ruby/object:Gem::Specification
         | 
| 2 | 
            +
            name: horse
         | 
| 3 | 
            +
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            +
              version: 0.0.1
         | 
| 5 | 
            +
            platform: ruby
         | 
| 6 | 
            +
            authors:
         | 
| 7 | 
            +
            - Darren Cauthon
         | 
| 8 | 
            +
            autorequire: 
         | 
| 9 | 
            +
            bindir: bin
         | 
| 10 | 
            +
            cert_chain: []
         | 
| 11 | 
            +
            date: 2014-01-22 00:00:00.000000000 Z
         | 
| 12 | 
            +
            dependencies:
         | 
| 13 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 14 | 
            +
              name: bundler
         | 
| 15 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 16 | 
            +
                requirements:
         | 
| 17 | 
            +
                - - "~>"
         | 
| 18 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            +
                    version: '1.5'
         | 
| 20 | 
            +
              type: :development
         | 
| 21 | 
            +
              prerelease: false
         | 
| 22 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 | 
            +
                requirements:
         | 
| 24 | 
            +
                - - "~>"
         | 
| 25 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            +
                    version: '1.5'
         | 
| 27 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 28 | 
            +
              name: rake
         | 
| 29 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 30 | 
            +
                requirements:
         | 
| 31 | 
            +
                - - ">="
         | 
| 32 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            +
                    version: '0'
         | 
| 34 | 
            +
              type: :development
         | 
| 35 | 
            +
              prerelease: false
         | 
| 36 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 37 | 
            +
                requirements:
         | 
| 38 | 
            +
                - - ">="
         | 
| 39 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 40 | 
            +
                    version: '0'
         | 
| 41 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 42 | 
            +
              name: subtle
         | 
| 43 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 44 | 
            +
                requirements:
         | 
| 45 | 
            +
                - - ">="
         | 
| 46 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            +
                    version: '0'
         | 
| 48 | 
            +
              type: :development
         | 
| 49 | 
            +
              prerelease: false
         | 
| 50 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 51 | 
            +
                requirements:
         | 
| 52 | 
            +
                - - ">="
         | 
| 53 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            +
                    version: '0'
         | 
| 55 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 56 | 
            +
              name: mocha
         | 
| 57 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 58 | 
            +
                requirements:
         | 
| 59 | 
            +
                - - ">="
         | 
| 60 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 61 | 
            +
                    version: '0'
         | 
| 62 | 
            +
              type: :development
         | 
| 63 | 
            +
              prerelease: false
         | 
| 64 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 65 | 
            +
                requirements:
         | 
| 66 | 
            +
                - - ">="
         | 
| 67 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 68 | 
            +
                    version: '0'
         | 
| 69 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 70 | 
            +
              name: twitter
         | 
| 71 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 72 | 
            +
                requirements:
         | 
| 73 | 
            +
                - - ">="
         | 
| 74 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 75 | 
            +
                    version: '0'
         | 
| 76 | 
            +
              type: :runtime
         | 
| 77 | 
            +
              prerelease: false
         | 
| 78 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 79 | 
            +
                requirements:
         | 
| 80 | 
            +
                - - ">="
         | 
| 81 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 82 | 
            +
                    version: '0'
         | 
| 83 | 
            +
            description: ''
         | 
| 84 | 
            +
            email:
         | 
| 85 | 
            +
            - darren@cauthon.com
         | 
| 86 | 
            +
            executables: []
         | 
| 87 | 
            +
            extensions: []
         | 
| 88 | 
            +
            extra_rdoc_files: []
         | 
| 89 | 
            +
            files:
         | 
| 90 | 
            +
            - ".gitignore"
         | 
| 91 | 
            +
            - Gemfile
         | 
| 92 | 
            +
            - LICENSE.txt
         | 
| 93 | 
            +
            - README.md
         | 
| 94 | 
            +
            - Rakefile
         | 
| 95 | 
            +
            - horse.gemspec
         | 
| 96 | 
            +
            - lib/horse.rb
         | 
| 97 | 
            +
            - lib/horse/funny_tweet.rb
         | 
| 98 | 
            +
            - lib/horse/pending_tweets.rb
         | 
| 99 | 
            +
            - lib/horse/previously_made_tweets.rb
         | 
| 100 | 
            +
            - lib/horse/tweeter.rb
         | 
| 101 | 
            +
            - lib/horse/version.rb
         | 
| 102 | 
            +
            - test/horse/funny_tweet_test.rb
         | 
| 103 | 
            +
            - test/horse/pending_tweets_test.rb
         | 
| 104 | 
            +
            - test/horse/previously_made_tweets_test.rb
         | 
| 105 | 
            +
            - test/horse/tweeter_test.rb
         | 
| 106 | 
            +
            - test/horse_test.rb
         | 
| 107 | 
            +
            - test/test_helper.rb
         | 
| 108 | 
            +
            - upcoming_tweets.txt
         | 
| 109 | 
            +
            homepage: ''
         | 
| 110 | 
            +
            licenses:
         | 
| 111 | 
            +
            - MIT
         | 
| 112 | 
            +
            metadata: {}
         | 
| 113 | 
            +
            post_install_message: 
         | 
| 114 | 
            +
            rdoc_options: []
         | 
| 115 | 
            +
            require_paths:
         | 
| 116 | 
            +
            - lib
         | 
| 117 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 118 | 
            +
              requirements:
         | 
| 119 | 
            +
              - - ">="
         | 
| 120 | 
            +
                - !ruby/object:Gem::Version
         | 
| 121 | 
            +
                  version: '0'
         | 
| 122 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 123 | 
            +
              requirements:
         | 
| 124 | 
            +
              - - ">="
         | 
| 125 | 
            +
                - !ruby/object:Gem::Version
         | 
| 126 | 
            +
                  version: '0'
         | 
| 127 | 
            +
            requirements: []
         | 
| 128 | 
            +
            rubyforge_project: 
         | 
| 129 | 
            +
            rubygems_version: 2.2.1
         | 
| 130 | 
            +
            signing_key: 
         | 
| 131 | 
            +
            specification_version: 4
         | 
| 132 | 
            +
            summary: Automate your horse tweets.
         | 
| 133 | 
            +
            test_files:
         | 
| 134 | 
            +
            - test/horse/funny_tweet_test.rb
         | 
| 135 | 
            +
            - test/horse/pending_tweets_test.rb
         | 
| 136 | 
            +
            - test/horse/previously_made_tweets_test.rb
         | 
| 137 | 
            +
            - test/horse/tweeter_test.rb
         | 
| 138 | 
            +
            - test/horse_test.rb
         | 
| 139 | 
            +
            - test/test_helper.rb
         |