Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
Changes include:

* Moving contributing guidelines to their own file.

* Changing the `key` and `secret` names to match the names used by
Twitter. This just reduces friction and helps those unfamiliar with
Twitter OAuth get started.
  • Loading branch information
guilhermesimoes committed May 26, 2014
1 parent df57b8b commit 6840d49
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 11 deletions.
40 changes: 40 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Contributing

For the best chance of having your changes merged, please:

* Fork the project.

* Make your feature addition or bug fix.

* Add tests for it. This is important so it is not accidentally broken in a future version.

* Commit, do not mess with rakefile, version, or history. (If you want to have your own version, that is fine but bump version in a commit by itself so it can be ignored when pulled).

* Send a pull request. Bonus points for topic branches.

If your proposed changes only affect documentation, include the following on a
new line in each of your commit messages:

```
[ci skip]
```

This will signal [Travis](https://travis-ci.org) that running the test suite is
not necessary for these changes.

# Reporting Bugs

If you are experiencing unexpected behavior and, after having read [omniauth](https://github.com/intridea/omniauth) and [omniauth-twitter](https://github.com/arunagw/omniauth-twitter)'s documentation, are convinced this behavior is a bug, please:

1. [Search](https://github.com/arunagw/omniauth-twitter/issues) existing issues.
2. Collect enough information to reproduce the issue:

* omniauth-twitter version

* Ruby version

* Specific setup conditions

* Description of expected behavior

* Description of actual behavior
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ This gem contains the Twitter strategy for OmniAuth.

Twitter offers a few different methods of integration. This strategy implements the browser variant of the "[Sign in with Twitter](https://dev.twitter.com/docs/auth/implementing-sign-twitter)" flow.

Twitter uses OAuth 1.0a. Twitter's developer area contains ample documentation on how it implements this, so if you are really interested in the details, go check that out for more.
Twitter uses OAuth 1.0a. Twitter's developer area contains ample documentation on how it implements this, so check that out if you are really interested in the details.

## Before You Begin

You should have already installed OmniAuth into your app; if not, read the [OmniAuth README](https://github.com/intridea/omniauth) to get started.

Now sign in into the [Twitter developer area](http://dev.twitter.com) and create an application. Take note of your Consumer Key and Consumer Secret (not the Access Token and Secret) because that is what your web application will use to authenticate against the Twitter API. Make sure to set a callback URL or else you may get authentication errors. (It doesn't matter what it is, just that it is set.)
Now sign in into the [Twitter developer area](https://dev.twitter.com) and create an application. Take note of your API Key and API Secret (not the Access Token and Access Token Secret) because that is what your web application will use to authenticate against the Twitter API. Make sure to set a callback URL or else you may get authentication errors. (It doesn't matter what it is, just that it is set.)

## Using This Strategy

Expand All @@ -30,11 +30,11 @@ Next, tell OmniAuth about this provider. For a Rails app, your `config/initializ

```ruby
Rails.application.config.middleware.use OmniAuth::Builder do
provider :twitter, "CONSUMER_KEY", "CONSUMER_SECRET"
provider :twitter, "API_KEY", "API_SECRET"
end
```

Replace CONSUMER_KEY and CONSUMER_SECRET with the appropriate values you obtained from dev.twitter.com earlier.
Replace `"API_KEY"` and `"API_SECRET"` with the appropriate values you obtained [earlier](https://apps.twitter.com).

## Authentication Options

Expand All @@ -60,7 +60,7 @@ Here's an example of a possible configuration where the the user's original prof

```ruby
Rails.application.config.middleware.use OmniAuth::Builder do
provider :twitter, ENV["TWITTER_KEY"], ENV["TWITTER_SECRET"],
provider :twitter, "API_KEY", "API_SECRET",
{
:secure_image_url => 'true',
:image_size => 'original',
Expand Down Expand Up @@ -157,13 +157,9 @@ OmniAuth Twitter is tested under 1.8.7, 1.9.2, 1.9.3 and Ruby Enterprise Edition
[![CI Build
Status](https://secure.travis-ci.org/arunagw/omniauth-twitter.png)](http://travis-ci.org/arunagw/omniauth-twitter)

## Note on Patches/Pull Requests
## Contributing

- Fork the project.
- Make your feature addition or bug fix.
- Add tests for it. This is important so I don’t break it in a future version unintentionally.
- Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
- Send me a pull request. Bonus points for topic branches.
Please read the [contribution guidelines](CONTRIBUTING.md) for some information on how to get started. No contribution is too small.

## License

Expand Down

0 comments on commit 6840d49

Please sign in to comment.