rest-more 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.travis.yml +1 -0
- data/CHANGES.md +5 -0
- data/Rakefile +1 -1
- data/example/rails3/Gemfile +1 -1
- data/lib/rest-core/client/dropbox.rb +4 -2
- data/lib/rest-core/client/facebook.rb +6 -3
- data/lib/rest-core/client/github.rb +6 -3
- data/lib/rest-core/client/linkedin.rb +7 -4
- data/lib/rest-core/client/twitter.rb +7 -4
- data/lib/rest-core/util/rails_util_util.rb +1 -3
- data/lib/rest-more/version.rb +1 -1
- data/rest-more.gemspec +7 -7
- data/test/facebook/test_handler.rb +2 -1
- data/test/facebook/test_old.rb +5 -3
- data/test/facebook/test_parse.rb +2 -2
- metadata +7 -11
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: 5d7d25f35f71824a54722882781fec66d4a0f0d7
|
4
|
+
data.tar.gz: 162468ea7578ce061ed9b9ebcc71b510eb610313
|
5
|
+
!binary "U0hBNTEy":
|
6
|
+
metadata.gz: 263040498b133b04aaa64cf6d808cc95ea93b2cc6902f702a4354d7f4f92cb2f8ab706ed3bdf6681380ae9ccc8e888f9a5129ef8808741ad0906a56e500071b0
|
7
|
+
data.tar.gz: daf111d5deafae6196d8c70a0d7d89d76f799bde3ee7991df828d39997a0b9e78e7b980c79f859e29cb381191734a42eb29eb227975afbfc3ea34355e5b6d349
|
data/.travis.yml
CHANGED
data/CHANGES.md
CHANGED
data/Rakefile
CHANGED
@@ -19,7 +19,7 @@ task 'gem:spec' do
|
|
19
19
|
s.version = RestMore::VERSION
|
20
20
|
s.homepage = 'https://github.com/cardinalblue/rest-more'
|
21
21
|
|
22
|
-
%w[rest-core].each{ |g| s.add_runtime_dependency(g, '>=2.0.
|
22
|
+
%w[rest-core].each{ |g| s.add_runtime_dependency(g, '>=2.0.3') }
|
23
23
|
|
24
24
|
s.authors = ['Cardinal Blue', 'Lin Jen-Shin (godfat)']
|
25
25
|
s.email = ['dev (XD) cardinalblue.com']
|
data/example/rails3/Gemfile
CHANGED
@@ -92,5 +92,7 @@ module RestCore::Dropbox::Client
|
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
95
|
-
RestCore::Dropbox
|
96
|
-
|
95
|
+
class RestCore::Dropbox
|
96
|
+
include RestCore::ClientOauth1
|
97
|
+
include RestCore::Dropbox::Client
|
98
|
+
end
|
@@ -291,6 +291,9 @@ module RestCore::Facebook::Client
|
|
291
291
|
end
|
292
292
|
end
|
293
293
|
|
294
|
-
|
295
|
-
|
296
|
-
|
294
|
+
class RestCore::Facebook
|
295
|
+
include RestCore::Facebook::Client
|
296
|
+
|
297
|
+
autoload :RailsUtil, 'rest-core/client/facebook/rails_util' if
|
298
|
+
Object.const_defined?(:Rails)
|
299
|
+
end
|
@@ -28,6 +28,9 @@ module RestCore::Github::Client
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
|
31
|
+
class RestCore::Github
|
32
|
+
include RestCore::Github::Client
|
33
|
+
|
34
|
+
autoload :RailsUtil, 'rest-core/client/github/rails_util' if
|
35
|
+
Object.const_defined?(:Rails)
|
36
|
+
end
|
@@ -36,7 +36,10 @@ module RestCore::Linkedin::Client
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
RestCore::Linkedin
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
class RestCore::Linkedin
|
40
|
+
include RestCore::ClientOauth1
|
41
|
+
include RestCore::Linkedin::Client
|
42
|
+
|
43
|
+
autoload :RailsUtil, 'rest-core/client/linkedin/rails_util' if
|
44
|
+
Object.const_defined?(:Rails)
|
45
|
+
end
|
@@ -86,7 +86,10 @@ module RestCore::Twitter::Client
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
-
RestCore::Twitter
|
90
|
-
|
91
|
-
|
92
|
-
|
89
|
+
class RestCore::Twitter
|
90
|
+
include RestCore::ClientOauth1
|
91
|
+
include RestCore::Twitter::Client
|
92
|
+
|
93
|
+
autoload :RailsUtil, 'rest-core/client/twitter/rails_util' if
|
94
|
+
Object.const_defined?(:Rails)
|
95
|
+
end
|
@@ -37,9 +37,7 @@ module RestCore::RailsUtilUtil
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def rc_options_extract members, options, method
|
40
|
-
|
41
|
-
# map(&:to_sym) is for ruby 1.8.7
|
42
|
-
Hash[options.send(method){ |(k, v)| members.map(&:to_sym).member?(k) }]
|
40
|
+
options.send(method){ |(k, v)| members.member?(k) }
|
43
41
|
end
|
44
42
|
end
|
45
43
|
|
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.3"
|
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 = "2013-
|
11
|
+
s.date = "2013-04-01"
|
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 = "
|
85
|
+
s.rubygems_version = "2.0.0"
|
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",
|
@@ -101,14 +101,14 @@ Gem::Specification.new do |s|
|
|
101
101
|
"test/twitter/test_api.rb"]
|
102
102
|
|
103
103
|
if s.respond_to? :specification_version then
|
104
|
-
s.specification_version =
|
104
|
+
s.specification_version = 4
|
105
105
|
|
106
106
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
107
|
-
s.add_runtime_dependency(%q<rest-core>, [">= 2.0.
|
107
|
+
s.add_runtime_dependency(%q<rest-core>, [">= 2.0.3"])
|
108
108
|
else
|
109
|
-
s.add_dependency(%q<rest-core>, [">= 2.0.
|
109
|
+
s.add_dependency(%q<rest-core>, [">= 2.0.3"])
|
110
110
|
end
|
111
111
|
else
|
112
|
-
s.add_dependency(%q<rest-core>, [">= 2.0.
|
112
|
+
s.add_dependency(%q<rest-core>, [">= 2.0.3"])
|
113
113
|
end
|
114
114
|
end
|
@@ -60,7 +60,8 @@ describe RC::Facebook do
|
|
60
60
|
|
61
61
|
@bad_fql_query = 'SELECT name FROM bad_table WHERE uid="12345"'
|
62
62
|
bad_fql_request = "https://api.facebook.com/method/fql.query?" \
|
63
|
-
"format=json&query=#{
|
63
|
+
"format=json&query=#{
|
64
|
+
RC::Middleware.escape(@bad_fql_query)}"
|
64
65
|
|
65
66
|
stub_request(:get, bad_fql_request).to_return(:body => @fql_error)
|
66
67
|
end
|
data/test/facebook/test_old.rb
CHANGED
@@ -9,7 +9,7 @@ describe RC::Facebook do
|
|
9
9
|
|
10
10
|
should 'do fql query with/without access_token' do
|
11
11
|
fql = 'SELECT name FROM likes where id="123"'
|
12
|
-
query = "format=json&query=#{
|
12
|
+
query = "format=json&query=#{RC::Middleware.escape(fql)}"
|
13
13
|
stub_request(:get, "https://api.facebook.com/method/fql.query?#{query}").
|
14
14
|
to_return(:body => '[]')
|
15
15
|
|
@@ -27,8 +27,10 @@ describe RC::Facebook do
|
|
27
27
|
f0 = 'SELECT display_name FROM application WHERE app_id="233082465238"'
|
28
28
|
f1 = 'SELECT display_name FROM application WHERE app_id="110225210740"'
|
29
29
|
f0q, f1q = "\"#{f0.gsub('"', '\\"')}\"", "\"#{f1.gsub('"', '\\"')}\""
|
30
|
-
q = "format=json&queries=#{
|
31
|
-
|
30
|
+
q = "format=json&queries=#{RC::Middleware.escape(
|
31
|
+
"{\"f0\":#{f0q},\"f1\":#{f1q}}")}"
|
32
|
+
p = "format=json&queries=#{RC::Middleware.escape(
|
33
|
+
"{\"f1\":#{f1q},\"f0\":#{f0q}}")}"
|
32
34
|
|
33
35
|
stub_multi = lambda{
|
34
36
|
stub_request(:get,
|
data/test/facebook/test_parse.rb
CHANGED
@@ -23,8 +23,8 @@ describe RC::Facebook do
|
|
23
23
|
app_id = '1829'
|
24
24
|
secret = app_id.reverse
|
25
25
|
sig = '398262caea8442bd8801e8fba7c55c8a'
|
26
|
-
fbs = "access_token=#{
|
27
|
-
"secret=abc&session_key=def-456&sig=#{sig}&uid=3"
|
26
|
+
fbs = "access_token=#{RC::Middleware.escape(access_token)}&" \
|
27
|
+
"expires=0&secret=abc&session_key=def-456&sig=#{sig}&uid=3"
|
28
28
|
|
29
29
|
check = lambda{ |token, fbs1|
|
30
30
|
http_cookie =
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest-more
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
5
|
-
prerelease:
|
4
|
+
version: 2.0.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Cardinal Blue
|
@@ -10,24 +9,22 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2013-
|
12
|
+
date: 2013-04-01 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: rest-core
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
18
|
- - ! '>='
|
21
19
|
- !ruby/object:Gem::Version
|
22
|
-
version: 2.0.
|
20
|
+
version: 2.0.3
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
25
|
- - ! '>='
|
29
26
|
- !ruby/object:Gem::Version
|
30
|
-
version: 2.0.
|
27
|
+
version: 2.0.3
|
31
28
|
description: ! 'Various REST clients such as Facebook and Twitter built with [rest-core][]
|
32
29
|
|
33
30
|
|
@@ -108,27 +105,26 @@ files:
|
|
108
105
|
- test/twitter/test_api.rb
|
109
106
|
homepage: https://github.com/cardinalblue/rest-more
|
110
107
|
licenses: []
|
108
|
+
metadata: {}
|
111
109
|
post_install_message:
|
112
110
|
rdoc_options: []
|
113
111
|
require_paths:
|
114
112
|
- lib
|
115
113
|
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
-
none: false
|
117
114
|
requirements:
|
118
115
|
- - ! '>='
|
119
116
|
- !ruby/object:Gem::Version
|
120
117
|
version: '0'
|
121
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
119
|
requirements:
|
124
120
|
- - ! '>='
|
125
121
|
- !ruby/object:Gem::Version
|
126
122
|
version: '0'
|
127
123
|
requirements: []
|
128
124
|
rubyforge_project:
|
129
|
-
rubygems_version:
|
125
|
+
rubygems_version: 2.0.0
|
130
126
|
signing_key:
|
131
|
-
specification_version:
|
127
|
+
specification_version: 4
|
132
128
|
summary: Various REST clients such as Facebook and Twitter built with [rest-core][]
|
133
129
|
test_files:
|
134
130
|
- test/dropbox/test_api.rb
|