rest-more 2.0.0 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/CHANGES.md +5 -0
- data/Gemfile +1 -1
- data/README.md +1 -0
- data/Rakefile +1 -1
- data/example/rails3/Gemfile +1 -1
- data/example/rails3/test/functional/application_controller_test.rb +5 -5
- data/lib/rest-core/client/facebook.rb +4 -3
- data/lib/rest-more/version.rb +1 -1
- data/rest-more.gemspec +3 -3
- data/test/facebook/test_oauth.rb +2 -2
- metadata +3 -4
data/.gitignore
CHANGED
data/CHANGES.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# CHANGES
|
2
2
|
|
3
|
+
## rest-more 2.0.2 -- 2013-02-07
|
4
|
+
|
5
|
+
* Updated Facebook OAuth URL from https://graph.facebook.com/oauth/authorize
|
6
|
+
to https://www.facebook.com/dialog/oauth
|
7
|
+
|
3
8
|
## rest-more 2.0.0 -- 2012-10-31
|
4
9
|
|
5
10
|
* Adopted to rest-core 2.0.0, a whole new generation.
|
data/Gemfile
CHANGED
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -36,7 +36,7 @@ module Gemgem
|
|
36
36
|
def test_rails *rails
|
37
37
|
rails.each{ |framework|
|
38
38
|
opts = Rake.application.options
|
39
|
-
args = (opts.singleton_methods - [:rakelib,
|
39
|
+
args = (opts.singleton_methods - [:rakelib, :trace_output]).map{ |arg|
|
40
40
|
if arg.to_s !~ /=$/ && opts.send(arg)
|
41
41
|
"--#{arg}"
|
42
42
|
else
|
data/example/rails3/Gemfile
CHANGED
@@ -47,7 +47,7 @@ class ApplicationControllerTest < ActionController::TestCase
|
|
47
47
|
assert_response :redirect
|
48
48
|
|
49
49
|
url = normalize_url(
|
50
|
-
'https://
|
50
|
+
'https://www.facebook.com/dialog/oauth?client_id=123&' \
|
51
51
|
'scope=&redirect_uri=http%3A%2F%2Ftest.host%2F')
|
52
52
|
|
53
53
|
assert_url(url)
|
@@ -58,7 +58,7 @@ class ApplicationControllerTest < ActionController::TestCase
|
|
58
58
|
assert_response :success
|
59
59
|
|
60
60
|
url = normalize_url(
|
61
|
-
'https://
|
61
|
+
'https://www.facebook.com/dialog/oauth?client_id=123&' \
|
62
62
|
'scope=publish_stream&' \
|
63
63
|
'redirect_uri=http%3A%2F%2Fapps.facebook.com%2Fcan%2Fcanvas')
|
64
64
|
|
@@ -70,7 +70,7 @@ class ApplicationControllerTest < ActionController::TestCase
|
|
70
70
|
assert_response :success
|
71
71
|
|
72
72
|
url = normalize_url(
|
73
|
-
'https://
|
73
|
+
'https://www.facebook.com/dialog/oauth?client_id=123&' \
|
74
74
|
'scope=email&' \
|
75
75
|
'redirect_uri=http%3A%2F%2Fapps.facebook.com%2FToT%2Fdiff_canvas')
|
76
76
|
|
@@ -82,7 +82,7 @@ class ApplicationControllerTest < ActionController::TestCase
|
|
82
82
|
assert_response :success
|
83
83
|
|
84
84
|
url = normalize_url(
|
85
|
-
'https://
|
85
|
+
'https://www.facebook.com/dialog/oauth?client_id=123&' \
|
86
86
|
'scope=&' \
|
87
87
|
'redirect_uri=http%3A%2F%2Fapps.facebook.com%2Fzzz%2Fiframe_canvas')
|
88
88
|
|
@@ -94,7 +94,7 @@ class ApplicationControllerTest < ActionController::TestCase
|
|
94
94
|
assert_response :redirect
|
95
95
|
|
96
96
|
url = normalize_url(
|
97
|
-
'https://
|
97
|
+
'https://www.facebook.com/dialog/oauth?client_id=123&' \
|
98
98
|
'scope=bogus&' \
|
99
99
|
'redirect_uri=http%3A%2F%2Ftest.host%2Foptions')
|
100
100
|
|
@@ -10,7 +10,7 @@ module RestCore
|
|
10
10
|
|
11
11
|
use DefaultSite , 'https://graph.facebook.com/'
|
12
12
|
use DefaultHeaders, {'Accept' => 'application/json',
|
13
|
-
|
13
|
+
'Accept-Language' => 'en-us'}
|
14
14
|
use Oauth2Query , nil
|
15
15
|
|
16
16
|
use CommonLogger , nil
|
@@ -211,8 +211,9 @@ module RestCore::Facebook::Client
|
|
211
211
|
# oauth related
|
212
212
|
|
213
213
|
def authorize_url opts={}
|
214
|
-
url('oauth
|
215
|
-
{:client_id => app_id, :access_token => nil}.merge(opts)
|
214
|
+
url('dialog/oauth',
|
215
|
+
{:client_id => app_id, :access_token => nil}.merge(opts),
|
216
|
+
:site => 'https://www.facebook.com/')
|
216
217
|
end
|
217
218
|
|
218
219
|
def authorize! opts={}
|
data/lib/rest-more/version.rb
CHANGED
data/rest-more.gemspec
CHANGED
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "rest-more"
|
5
|
-
s.version = "2.0.
|
5
|
+
s.version = "2.0.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = [
|
9
9
|
"Cardinal Blue",
|
10
10
|
"Lin Jen-Shin (godfat)"]
|
11
|
-
s.date = "
|
11
|
+
s.date = "2013-02-07"
|
12
12
|
s.description = "Various REST clients such as Facebook and Twitter built with [rest-core][]\n\n[rest-core]: https://github.com/cardinalblue/rest-core"
|
13
13
|
s.email = ["dev (XD) cardinalblue.com"]
|
14
14
|
s.executables = ["rib-rest-core"]
|
@@ -82,7 +82,7 @@ Gem::Specification.new do |s|
|
|
82
82
|
"test/twitter/test_api.rb"]
|
83
83
|
s.homepage = "https://github.com/cardinalblue/rest-more"
|
84
84
|
s.require_paths = ["lib"]
|
85
|
-
s.rubygems_version = "1.8.
|
85
|
+
s.rubygems_version = "1.8.23"
|
86
86
|
s.summary = "Various REST clients such as Facebook and Twitter built with [rest-core][]"
|
87
87
|
s.test_files = [
|
88
88
|
"test/dropbox/test_api.rb",
|
data/test/facebook/test_oauth.rb
CHANGED
@@ -13,7 +13,7 @@ describe RC::Facebook do
|
|
13
13
|
|
14
14
|
should 'return correct oauth url' do
|
15
15
|
TestHelper.normalize_url(@rg.authorize_url(:redirect_uri => @uri)).
|
16
|
-
should.eq 'https://
|
16
|
+
should.eq 'https://www.facebook.com/dialog/oauth?' \
|
17
17
|
'client_id=29&redirect_uri=http%3A%2F%2Fzzz.tw'
|
18
18
|
end
|
19
19
|
|
@@ -34,7 +34,7 @@ describe RC::Facebook do
|
|
34
34
|
|
35
35
|
should 'not append access_token in authorize_url even presented' do
|
36
36
|
RC::Facebook.new(:access_token => 'do not use me').authorize_url.
|
37
|
-
should.eq 'https://
|
37
|
+
should.eq 'https://www.facebook.com/dialog/oauth'
|
38
38
|
end
|
39
39
|
|
40
40
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest-more
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2013-02-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rest-core
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
128
|
rubyforge_project:
|
129
|
-
rubygems_version: 1.8.
|
129
|
+
rubygems_version: 1.8.23
|
130
130
|
signing_key:
|
131
131
|
specification_version: 3
|
132
132
|
summary: Various REST clients such as Facebook and Twitter built with [rest-core][]
|
@@ -145,4 +145,3 @@ test_files:
|
|
145
145
|
- test/facebook/test_serialize.rb
|
146
146
|
- test/facebook/test_timeout.rb
|
147
147
|
- test/twitter/test_api.rb
|
148
|
-
has_rdoc:
|