-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add twitter setup. knock yourselves out. #31
base: master
Are you sure you want to change the base?
Conversation
config.consumer_key = 'asdVzxnbO5VVonQaZIWMUg' | ||
config.consumer_secret = 'his1Q4Npqot5z6w8F5drIjyGI2fic1RH0SkCHcPgl0I' | ||
config.oauth_token = '1732928202-8MZzFHuwxtYl7lIyDV3J2iOnn5cBMqp7J07P0LI' | ||
config.oauth_token_secret = 'bxIgiFEnGp8ACvCGdDy9qseZUf7DGvKDCz2B29y5vc' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't put credentials in open source files, stupid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll regenerate them if you set it up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's your pull req. :| you fix it
Umm. What's going on with this PR now? There's no commits. Instead of putting the tokens directly in the code, you can pull it from the ENV variable. |
And then anybody who wants to run steggybot has to directly message me to get the credentials and set 4 ENV variables? |
New usage: class MyPlugin
include Tweetable
def some_method
tweet "ya bish"
end
end You have to put a config file in |
# gem | ||
require 'twitter' | ||
|
||
module Tweetable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@jayferd well if they want to tweet to YOUR twitter account, they better damn well have to get the credentials from you. Alternatively, they can make their own credentials and use this to tweet to their own accounts. You'll just have to give steggy the creds so he can put them up on the production instance, and then everyone else can either not use this function if they're running it locally, use their own creds and twitter account, or pm you for your creds. |
config.consumer_key = 'EXAMPLE' | ||
config.consumer_secret = 'EXAMPLE' | ||
config.oauth_token = 'EXAMPLE' | ||
config.oauth_token_secret = 'EXAMPLE' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still like the idea of ENV variables because this means that you have to deal changing this file every time you pull, instead of adding some ENV variables once on every machine you run this one. But if you feel strongly that this is a better solution I'd like to hear you out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean "changing this file every time you pull"? The actual config/twitter.rb
is not checked in, and I'm actually going to .gitignore it. This file actually doesn't do anything. And really, for dev work, you can just not set it up and it'll print "tweeting: thing" every time you try to tweet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I didn't realize that this was labeled as an example and the actual file is in the .gitignore
. Could you place a comment at top of the file explaining the user should copy this file to config/twitter.rb
and replace the keys with their keys? That will be helpful.
+1 let's merge this in at some point |
Usage:
Twitter.update('Ya bish')