Skip to content

add twitter setup. knock yourselves out.#31

Open
jneen wants to merge 3 commits into
mjsteger:masterfrom
jneen:master
Open

add twitter setup. knock yourselves out.#31
jneen wants to merge 3 commits into
mjsteger:masterfrom
jneen:master

Conversation

@jneen

@jneen jneen commented Sep 17, 2013

Copy link
Copy Markdown

Usage: Twitter.update('Ya bish')

Comment thread lib/twitter.rb Outdated

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Author

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.

Copy link
Copy Markdown
Contributor

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

@wesdotcool

Copy link
Copy Markdown
Contributor

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.

@jneen

jneen commented Sep 18, 2013

Copy link
Copy Markdown
Author

And then anybody who wants to run steggybot has to directly message me to get the credentials and set 4 ENV variables?

@jneen

jneen commented Sep 18, 2013

Copy link
Copy Markdown
Author

New usage:

class MyPlugin
  include Tweetable

  def some_method
    tweet "ya bish"
  end
end

You have to put a config file in config/twitter.rb. There is an example and I'll post the credentials in irc.

Comment thread lib/tweetable.rb Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@wesdotcool

Copy link
Copy Markdown
Contributor

@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.

Comment thread config/twitter.example.rb

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Author

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.

Copy link
Copy Markdown
Contributor

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.

@cjzhang

cjzhang commented Sep 24, 2013

Copy link
Copy Markdown
Contributor

+1 let's merge this in at some point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants