omniauth-twitter 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -2,6 +2,5 @@ rvm:
2
2
  - 1.8.7
3
3
  - 1.9.2
4
4
  - 1.9.3
5
- - ruby-head
6
5
  - ree
7
6
  - jruby
data/README.md CHANGED
@@ -41,6 +41,13 @@ To use this, just add a querystring for x_auth_access_type.
41
41
 
42
42
  Now just follow the README at: https://github.com/intridea/omniauth
43
43
 
44
+ ## Watch the RailsCast
45
+
46
+ Ryan Bates has put together an excellent RailsCast on OmniAuth:
47
+
48
+ [![RailsCast #241](https://www.evernote.com/shard/s35/sh/479f2503-aefa-4542-a7b4-8f84fd22eafc/0571f5a3795a0be3d0b0814312a8d5b7/res/49b5478a-657c-4aff-ae58-dae08b9a46d5/Screen_Shot_2012-07-15_at_12.41.15_PM-20120715-125424.jpg.jpg "RailsCast #241 - Simple OmniAuth (revised)")](http://railscasts.com/episodes/241-simple-omniauth-revised)
49
+
50
+
44
51
  ## Supported Rubies
45
52
 
46
53
  OmniAuth Twitter is tested under 1.8.7, 1.9.2, 1.9.3 and Ruby Enterprise Edition.
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Twitter
3
- VERSION = "0.0.12"
3
+ VERSION = "0.0.13"
4
4
  end
5
5
  end
@@ -6,7 +6,8 @@ module OmniAuth
6
6
  class Twitter < OmniAuth::Strategies::OAuth
7
7
  option :name, 'twitter'
8
8
  option :client_options, {:authorize_path => '/oauth/authenticate',
9
- :site => 'https://api.twitter.com'}
9
+ :site => 'https://api.twitter.com',
10
+ :proxy => ENV['http_proxy'] ? URI(ENV['http_proxy']) : nil}
10
11
 
11
12
  uid { access_token.params[:user_id] }
12
13
 
@@ -15,7 +16,7 @@ module OmniAuth
15
16
  :nickname => raw_info['screen_name'],
16
17
  :name => raw_info['name'],
17
18
  :location => raw_info['location'],
18
- :image => raw_info['profile_image_url'],
19
+ :image => options[:secure_image_url] ? raw_info['profile_image_url_https'] : raw_info['profile_image_url'],
19
20
  :description => raw_info['description'],
20
21
  :urls => {
21
22
  'Website' => raw_info['url'],
@@ -52,6 +53,13 @@ module OmniAuth
52
53
  options[:request_params] || {}
53
54
  options[:request_params].merge!(:x_auth_access_type => x_auth_access_type)
54
55
  end
56
+
57
+ if session['omniauth.params'] && session['omniauth.params']["use_authorize"] == "true"
58
+ options.client_options.authorize_path = '/oauth/authorize'
59
+ else
60
+ options.client_options.authorize_path = '/oauth/authenticate'
61
+ end
62
+
55
63
  old_request_phase
56
64
  end
57
65
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-twitter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-23 00:00:00.000000000 Z
12
+ date: 2012-09-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json
@@ -140,7 +140,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  segments:
142
142
  - 0
143
- hash: -1473078511360950658
143
+ hash: 1976515917874088627
144
144
  required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  none: false
146
146
  requirements:
@@ -149,10 +149,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  version: '0'
150
150
  segments:
151
151
  - 0
152
- hash: -1473078511360950658
152
+ hash: 1976515917874088627
153
153
  requirements: []
154
154
  rubyforge_project: omniauth-twitter
155
- rubygems_version: 1.8.23
155
+ rubygems_version: 1.8.24
156
156
  signing_key:
157
157
  specification_version: 3
158
158
  summary: OmniAuth strategy for Twitter