Codebase list ruby-omniauth-twitter / ddef815
Merge pull request #78 from guilhermesimoes/documentation-love Documentation love Rashmi Yadav 9 years ago
2 changed file(s) with 51 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
0 # Contributing
1
2 For the best chance of having your changes merged, please:
3
4 * Fork the project.
5
6 * Make your feature addition or bug fix.
7
8 * Add tests for it. This is important so it is not accidentally broken in a future version.
9
10 * 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).
11
12 * Send a pull request. Bonus points for topic branches.
13
14 If your proposed changes only affect documentation, include the following on a
15 new line in each of your commit messages:
16
17 ```
18 [ci skip]
19 ```
20
21 This will signal [Travis](https://travis-ci.org) that running the test suite is
22 not necessary for these changes.
23
24 # Reporting Bugs
25
26 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:
27
28 1. [Search](https://github.com/arunagw/omniauth-twitter/issues) existing issues.
29 2. Collect enough information to reproduce the issue:
30
31 * omniauth-twitter version
32
33 * Ruby version
34
35 * Specific setup conditions
36
37 * Description of expected behavior
38
39 * Description of actual behavior
00 # OmniAuth Twitter
1
2 [![Gem Version](https://badge.fury.io/rb/omniauth-twitter.svg)](http://badge.fury.io/rb/omniauth-twitter)
3 [![CI Build Status](https://secure.travis-ci.org/arunagw/omniauth-twitter.svg?branch=master)](http://travis-ci.org/arunagw/omniauth-twitter)
4 [![Code Climate](https://codeclimate.com/github/arunagw/omniauth-twitter.png)](https://codeclimate.com/github/arunagw/omniauth-twitter)
15
26 This gem contains the Twitter strategy for OmniAuth.
37
48 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.
59
6 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.
10 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.
711
812 ## Before You Begin
913
1014 You should have already installed OmniAuth into your app; if not, read the [OmniAuth README](https://github.com/intridea/omniauth) to get started.
1115
12 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.)
16 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.)
1317
1418 ## Using This Strategy
1519
2933
3034 ```ruby
3135 Rails.application.config.middleware.use OmniAuth::Builder do
32 provider :twitter, "CONSUMER_KEY", "CONSUMER_SECRET"
36 provider :twitter, "API_KEY", "API_SECRET"
3337 end
3438 ```
3539
36 Replace CONSUMER_KEY and CONSUMER_SECRET with the appropriate values you obtained from dev.twitter.com earlier.
40 Replace `"API_KEY"` and `"API_SECRET"` with the appropriate values you obtained [earlier](https://apps.twitter.com).
3741
3842 ## Authentication Options
3943
5963
6064 ```ruby
6165 Rails.application.config.middleware.use OmniAuth::Builder do
62 provider :twitter, ENV["TWITTER_KEY"], ENV["TWITTER_SECRET"],
66 provider :twitter, "API_KEY", "API_SECRET",
6367 {
6468 :secure_image_url => 'true',
6569 :image_size => 'original',
153157
154158 OmniAuth Twitter is tested under 1.8.7, 1.9.2, 1.9.3, 2.0.0, and Ruby Enterprise Edition.
155159
156 [![CI Build
157 Status](https://secure.travis-ci.org/arunagw/omniauth-twitter.png)](http://travis-ci.org/arunagw/omniauth-twitter)
160 ## Contributing
158161
159 ## Note on Patches/Pull Requests
160
161 - Fork the project.
162 - Make your feature addition or bug fix.
163 - Add tests for it. This is important so I don’t break it in a future version unintentionally.
164 - 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)
165 - Send me a pull request. Bonus points for topic branches.
162 Please read the [contribution guidelines](CONTRIBUTING.md) for some information on how to get started. No contribution is too small.
166163
167164 ## License
168165