Last active
October 15, 2015 01:09
-
-
Save netbe/52a3a45e5e1392129877 to your computer and use it in GitHub Desktop.
Tweet article if not published
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
desc "Tweet the newly published article" | |
task :tweet do | |
if File.exists?(TWEET_FILE) | |
message = File.read(TWEET_FILE) | |
puts "Tweeting #{message}" | |
`bundle exec t update "#{message}" -P .trc` | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment