rest-graph 1.9.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +13 -0
- data/{CHANGES → CHANGES.md} +59 -23
- data/Gemfile +21 -16
- data/README.md +24 -14
- data/Rakefile +34 -20
- data/{TODO → TODO.md} +5 -3
- data/example/rails2/Gemfile +2 -2
- data/example/rails2/Rakefile +1 -0
- data/example/rails2/app/controllers/application_controller.rb +12 -3
- data/example/rails2/config/environment.rb +1 -1
- data/example/rails2/test/functional/application_controller_test.rb +28 -1
- data/example/rails3/Gemfile +2 -2
- data/example/rails3/app/controllers/application_controller.rb +12 -3
- data/example/rails3/config/boot.rb +6 -0
- data/example/rails3/config/environments/development.rb +0 -3
- data/example/rails3/test/functional/application_controller_test.rb +28 -1
- data/lib/rest-graph/config_util.rb +1 -1
- data/lib/rest-graph/core.rb +26 -8
- data/lib/rest-graph/rails_util.rb +6 -3
- data/lib/rest-graph/version.rb +1 -1
- data/rest-graph.gemspec +116 -152
- data/task/.gitignore +1 -0
- data/task/gemgem.rb +117 -18
- data/test/test_default.rb +8 -12
- data/test/test_parse.rb +4 -0
- data/test/test_timeout.rb +9 -9
- metadata +27 -127
- data/README +0 -371
@@ -49,14 +49,23 @@ class ApplicationController < ActionController::Base
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def reinitialize
|
52
|
-
cache_nil = rest_graph.cache
|
53
52
|
rest_graph_setup(:cache => {'a' => 'b'})
|
54
|
-
|
55
|
-
render :text => YAML.dump([cache_nil, cache])
|
53
|
+
render :text => YAML.dump(rest_graph.cache)
|
56
54
|
end
|
57
55
|
|
58
56
|
def helper; end
|
59
57
|
|
58
|
+
def defaults
|
59
|
+
rest_graph_setup
|
60
|
+
render :text => (rest_graph.cache == Rails.cache &&
|
61
|
+
rest_graph.log_method.receiver == Rails.logger)
|
62
|
+
end
|
63
|
+
|
64
|
+
def parse_cookies
|
65
|
+
rest_graph_setup
|
66
|
+
render :text => 'dummy'
|
67
|
+
end
|
68
|
+
|
60
69
|
private
|
61
70
|
def filter_common
|
62
71
|
rest_graph_setup(:auto_authorize => true, :canvas => '')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file
|
2
2
|
|
3
3
|
# Specifies gem version of Rails to use when vendor/rails is not present
|
4
|
-
RAILS_GEM_VERSION = '2.3.
|
4
|
+
RAILS_GEM_VERSION = '2.3.14' unless defined? RAILS_GEM_VERSION
|
5
5
|
|
6
6
|
# Bootstrap the Rails environment, frameworks, and default configuration
|
7
7
|
require File.join(File.dirname(__FILE__), 'boot')
|
@@ -1,11 +1,13 @@
|
|
1
1
|
|
2
2
|
require 'test_helper'
|
3
3
|
require 'webmock'
|
4
|
+
require 'rr'
|
4
5
|
|
5
6
|
WebMock.disable_net_connect!
|
6
7
|
|
7
8
|
class ApplicationControllerTest < ActionController::TestCase
|
8
9
|
include WebMock::API
|
10
|
+
include RR::Adapters::TestUnit
|
9
11
|
|
10
12
|
def setup
|
11
13
|
body = rand(2) == 0 ? '{"error":{"type":"OAuthException"}}' :
|
@@ -16,6 +18,7 @@ class ApplicationControllerTest < ActionController::TestCase
|
|
16
18
|
end
|
17
19
|
|
18
20
|
def teardown
|
21
|
+
RR.verify
|
19
22
|
WebMock.reset!
|
20
23
|
end
|
21
24
|
|
@@ -172,7 +175,7 @@ class ApplicationControllerTest < ActionController::TestCase
|
|
172
175
|
def test_reinitailize
|
173
176
|
get(:reinitialize)
|
174
177
|
assert_response :success
|
175
|
-
assert_equal
|
178
|
+
assert_equal({'a' => 'b'}, YAML.load(@response.body))
|
176
179
|
end
|
177
180
|
|
178
181
|
def test_helper
|
@@ -180,4 +183,28 @@ class ApplicationControllerTest < ActionController::TestCase
|
|
180
183
|
assert_response :success
|
181
184
|
assert_equal RestGraph.default_app_id, @response.body.strip
|
182
185
|
end
|
186
|
+
|
187
|
+
def test_defaults
|
188
|
+
get(:defaults)
|
189
|
+
assert_response :success
|
190
|
+
assert_equal 'true', @response.body.strip
|
191
|
+
end
|
192
|
+
|
193
|
+
def setup_cookies key
|
194
|
+
cookies = {"#{key}_#{RestGraph.default_app_id}" => 'dummy'}
|
195
|
+
stub(@controller).cookies{cookies}
|
196
|
+
f = RestGraph.new
|
197
|
+
stub(@controller).rest_graph{f}
|
198
|
+
mock(f).parse_cookies!(cookies)
|
199
|
+
end
|
200
|
+
|
201
|
+
def test_parse_cookies_fbs
|
202
|
+
setup_cookies('fbs')
|
203
|
+
get(:parse_cookies)
|
204
|
+
end
|
205
|
+
|
206
|
+
def test_parse_cookies_fbsr
|
207
|
+
setup_cookies('fbsr')
|
208
|
+
get(:parse_cookies)
|
209
|
+
end
|
183
210
|
end
|
data/example/rails3/Gemfile
CHANGED
@@ -49,14 +49,23 @@ class ApplicationController < ActionController::Base
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def reinitialize
|
52
|
-
cache_nil = rest_graph.cache
|
53
52
|
rest_graph_setup(:cache => {'a' => 'b'})
|
54
|
-
|
55
|
-
render :text => YAML.dump([cache_nil, cache])
|
53
|
+
render :text => YAML.dump(rest_graph.cache)
|
56
54
|
end
|
57
55
|
|
58
56
|
def helper; end
|
59
57
|
|
58
|
+
def defaults
|
59
|
+
rest_graph_setup
|
60
|
+
render :text => (rest_graph.cache == Rails.cache &&
|
61
|
+
rest_graph.log_method.receiver == Rails.logger)
|
62
|
+
end
|
63
|
+
|
64
|
+
def parse_cookies
|
65
|
+
rest_graph_setup
|
66
|
+
render :text => 'dummy'
|
67
|
+
end
|
68
|
+
|
60
69
|
private
|
61
70
|
def filter_common
|
62
71
|
rest_graph_setup(:auto_authorize => true, :canvas => '')
|
@@ -14,9 +14,6 @@ Rails3::Application.configure do
|
|
14
14
|
config.action_view.debug_rjs = true
|
15
15
|
config.action_controller.perform_caching = false
|
16
16
|
|
17
|
-
# Don't care if the mailer can't send
|
18
|
-
config.action_mailer.raise_delivery_errors = false
|
19
|
-
|
20
17
|
# Print deprecation notices to the Rails logger
|
21
18
|
config.active_support.deprecation = :log
|
22
19
|
|
@@ -1,11 +1,13 @@
|
|
1
1
|
|
2
2
|
require 'test_helper'
|
3
3
|
require 'webmock'
|
4
|
+
require 'rr'
|
4
5
|
|
5
6
|
WebMock.disable_net_connect!
|
6
7
|
|
7
8
|
class ApplicationControllerTest < ActionController::TestCase
|
8
9
|
include WebMock::API
|
10
|
+
include RR::Adapters::TestUnit
|
9
11
|
|
10
12
|
def setup
|
11
13
|
body = rand(2) == 0 ? '{"error":{"type":"OAuthException"}}' :
|
@@ -16,6 +18,7 @@ class ApplicationControllerTest < ActionController::TestCase
|
|
16
18
|
end
|
17
19
|
|
18
20
|
def teardown
|
21
|
+
RR.verify
|
19
22
|
WebMock.reset!
|
20
23
|
end
|
21
24
|
|
@@ -172,7 +175,7 @@ class ApplicationControllerTest < ActionController::TestCase
|
|
172
175
|
def test_reinitailize
|
173
176
|
get(:reinitialize)
|
174
177
|
assert_response :success
|
175
|
-
assert_equal
|
178
|
+
assert_equal({'a' => 'b'}, YAML.load(@response.body))
|
176
179
|
end
|
177
180
|
|
178
181
|
def test_helper
|
@@ -180,4 +183,28 @@ class ApplicationControllerTest < ActionController::TestCase
|
|
180
183
|
assert_response :success
|
181
184
|
assert_equal RestGraph.default_app_id, @response.body.strip
|
182
185
|
end
|
186
|
+
|
187
|
+
def test_defaults
|
188
|
+
get(:defaults)
|
189
|
+
assert_response :success
|
190
|
+
assert_equal 'true', @response.body.strip
|
191
|
+
end
|
192
|
+
|
193
|
+
def setup_cookies key
|
194
|
+
cookies = {"#{key}_#{RestGraph.default_app_id}" => 'dummy'}
|
195
|
+
stub(@controller).cookies{cookies}
|
196
|
+
f = RestGraph.new
|
197
|
+
stub(@controller).rest_graph{f}
|
198
|
+
mock(f).parse_cookies!(cookies)
|
199
|
+
end
|
200
|
+
|
201
|
+
def test_parse_cookies_fbs
|
202
|
+
setup_cookies('fbs')
|
203
|
+
get(:parse_cookies)
|
204
|
+
end
|
205
|
+
|
206
|
+
def test_parse_cookies_fbsr
|
207
|
+
setup_cookies('fbsr')
|
208
|
+
get(:parse_cookies)
|
209
|
+
end
|
183
210
|
end
|
data/lib/rest-graph/core.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
|
2
2
|
# optional http client
|
3
3
|
begin; require 'restclient' ; rescue LoadError; end
|
4
|
-
begin;
|
4
|
+
begin; gem 'em-http-request', '<1'
|
5
|
+
require 'em-http-request'; rescue LoadError; end
|
5
6
|
|
6
7
|
# optional gem
|
7
8
|
begin; require 'rack' ; rescue LoadError; end
|
@@ -14,11 +15,13 @@ require 'cgi'
|
|
14
15
|
require 'timeout'
|
15
16
|
|
16
17
|
# the data structure used in RestGraph
|
17
|
-
RestGraphStruct = Struct.new(:
|
18
|
+
RestGraphStruct = Struct.new(:access_token,
|
19
|
+
:auto_decode, :timeout,
|
18
20
|
:graph_server, :old_server,
|
19
21
|
:accept, :lang,
|
20
22
|
:app_id, :secret,
|
21
23
|
:data, :cache,
|
24
|
+
:expires_in,
|
22
25
|
:log_method,
|
23
26
|
:log_handler,
|
24
27
|
:error_handler) unless defined?(RestGraphStruct)
|
@@ -91,6 +94,7 @@ class RestGraph < RestGraphStruct
|
|
91
94
|
# setup defaults
|
92
95
|
module DefaultAttributes
|
93
96
|
extend self
|
97
|
+
def default_access_token; nil ; end
|
94
98
|
def default_auto_decode ; true ; end
|
95
99
|
def default_strict ; false ; end
|
96
100
|
def default_timeout ; 10 ; end
|
@@ -102,6 +106,7 @@ class RestGraph < RestGraphStruct
|
|
102
106
|
def default_secret ; nil ; end
|
103
107
|
def default_data ; {} ; end
|
104
108
|
def default_cache ; nil ; end
|
109
|
+
def default_expires_in ; 600 ; end
|
105
110
|
def default_log_method ; nil ; end
|
106
111
|
def default_log_handler ; nil ; end
|
107
112
|
def default_error_handler
|
@@ -191,9 +196,7 @@ class RestGraph < RestGraphStruct
|
|
191
196
|
# common methods
|
192
197
|
|
193
198
|
def initialize o={}
|
194
|
-
|
195
|
-
send("#{name}=", o[name]) if o.key?(name)
|
196
|
-
}
|
199
|
+
o.each{ |key, value| send("#{key}=", value) if respond_to?("#{key}=") }
|
197
200
|
end
|
198
201
|
|
199
202
|
def access_token
|
@@ -344,7 +347,11 @@ class RestGraph < RestGraphStruct
|
|
344
347
|
end
|
345
348
|
|
346
349
|
def parse_cookies! cookies
|
347
|
-
self.data =
|
350
|
+
self.data = if fbsr = cookies["fbsr_#{app_id}"]
|
351
|
+
parse_fbsr!(fbsr)
|
352
|
+
else fbs = cookies["fbs_#{app_id}"]
|
353
|
+
parse_fbs!(fbs)
|
354
|
+
end
|
348
355
|
end
|
349
356
|
|
350
357
|
def parse_fbs! fbs
|
@@ -353,6 +360,15 @@ class RestGraph < RestGraphStruct
|
|
353
360
|
Rack::Utils.parse_query(fbs.to_s.sub(/^"/, '').sub(/"$/, '')))
|
354
361
|
end
|
355
362
|
|
363
|
+
def parse_fbsr! fbsr
|
364
|
+
old_data = parse_signed_request!(fbsr)
|
365
|
+
# beware! maybe facebook would take out the code someday
|
366
|
+
return self.data = old_data unless old_data && old_data['code']
|
367
|
+
# passing empty redirect_uri is needed!
|
368
|
+
authorize!(:code => old_data['code'], :redirect_uri => '')
|
369
|
+
self.data = old_data.merge(data)
|
370
|
+
end
|
371
|
+
|
356
372
|
def parse_json! json
|
357
373
|
self.data = json &&
|
358
374
|
check_sig_and_return_data(self.class.json_decode(json))
|
@@ -368,6 +384,7 @@ class RestGraph < RestGraphStruct
|
|
368
384
|
|
369
385
|
def parse_signed_request! request
|
370
386
|
sig_encoded, json_encoded = request.split('.')
|
387
|
+
return self.data = nil unless sig_encoded && json_encoded
|
371
388
|
sig, json = [sig_encoded, json_encoded].map{ |str|
|
372
389
|
"#{str.tr('-_', '+/')}==".unpack('m').first
|
373
390
|
}
|
@@ -591,9 +608,10 @@ class RestGraph < RestGraphStruct
|
|
591
608
|
# fake post (opts[:post] => true) is considered get and need cache
|
592
609
|
return if meth != :get unless opts[:post]
|
593
610
|
|
594
|
-
|
611
|
+
expires = opts[:expires_in] || expires_in
|
612
|
+
if expires.kind_of?(Fixnum) && cache.method(:store).arity == -3
|
595
613
|
cache.store(cache_key(opts, uri), value,
|
596
|
-
:expires_in =>
|
614
|
+
:expires_in => expires)
|
597
615
|
else
|
598
616
|
cache_assign(opts, uri, value)
|
599
617
|
end
|
@@ -22,6 +22,8 @@ end
|
|
22
22
|
|
23
23
|
class RestGraph
|
24
24
|
module DefaultAttributes
|
25
|
+
def default_log_method ; Rails.logger.method(:debug); end
|
26
|
+
def default_cache ; Rails.cache ; end
|
25
27
|
def default_canvas ; '' ; end
|
26
28
|
def default_iframe ; false; end
|
27
29
|
def default_auto_authorize ; false; end
|
@@ -183,7 +185,7 @@ module RestGraph::RailsUtil
|
|
183
185
|
end
|
184
186
|
|
185
187
|
def rest_graph_options_new
|
186
|
-
@rest_graph_options_new ||= {
|
188
|
+
@rest_graph_options_new ||= {}
|
187
189
|
end
|
188
190
|
# ==================== end options utility =======================
|
189
191
|
|
@@ -226,8 +228,9 @@ module RestGraph::RailsUtil
|
|
226
228
|
# if we're not in canvas nor code passed,
|
227
229
|
# we could check out cookies as well.
|
228
230
|
def rest_graph_check_cookie
|
229
|
-
return if rest_graph.authorized?
|
230
|
-
!cookies["
|
231
|
+
return if rest_graph.authorized? ||
|
232
|
+
(!cookies["fbsr_#{rest_graph.app_id}"] &&
|
233
|
+
!cookies["fbs_#{rest_graph.app_id}"])
|
231
234
|
|
232
235
|
rest_graph.parse_cookies!(cookies)
|
233
236
|
logger.debug("DEBUG: RestGraph: detected cookies, parsed:" \
|
data/lib/rest-graph/version.rb
CHANGED
data/rest-graph.gemspec
CHANGED
@@ -1,170 +1,134 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
|
-
s.name =
|
5
|
-
s.version = "
|
4
|
+
s.name = "rest-graph"
|
5
|
+
s.version = "2.0.0"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = [
|
9
|
-
|
10
|
-
|
11
|
-
s.date =
|
12
|
-
s.description =
|
13
|
-
s.email = [
|
14
|
-
s.extra_rdoc_files = [
|
15
|
-
%q{CHANGES},
|
16
|
-
%q{CONTRIBUTORS},
|
17
|
-
%q{LICENSE},
|
18
|
-
%q{TODO}]
|
9
|
+
"Cardinal Blue",
|
10
|
+
"Lin Jen-Shin (godfat)"]
|
11
|
+
s.date = "2011-10-08"
|
12
|
+
s.description = "A lightweight Facebook Graph API client\n\nWe have moved the development from rest-graph to [rest-core][].\nBy now on, we would only fix bugs in rest-graph rather than adding\nfeatures, and we would only backport important changes from rest-core\nonce in a period. If you want the latest goodies, please see [rest-core][]\nOtherwise, you can stay with rest-graph with bugs fixes.\n\n[rest-core]: https://github.com/cardinalblue/rest-core"
|
13
|
+
s.email = ["dev (XD) cardinalblue.com"]
|
19
14
|
s.files = [
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
s.
|
111
|
-
s.
|
112
|
-
s.summary = %q{A lightweight Facebook Graph API client}
|
15
|
+
".gitignore",
|
16
|
+
".gitmodules",
|
17
|
+
".travis.yml",
|
18
|
+
"CHANGES.md",
|
19
|
+
"CONTRIBUTORS",
|
20
|
+
"Gemfile",
|
21
|
+
"LICENSE",
|
22
|
+
"README.md",
|
23
|
+
"Rakefile",
|
24
|
+
"TODO.md",
|
25
|
+
"doc/ToC.md",
|
26
|
+
"doc/dependency.md",
|
27
|
+
"doc/design.md",
|
28
|
+
"doc/heroku-facebook.md",
|
29
|
+
"doc/rails.md",
|
30
|
+
"doc/test.md",
|
31
|
+
"doc/tutorial.md",
|
32
|
+
"example/multi/config.ru",
|
33
|
+
"example/multi/rainbows.rb",
|
34
|
+
"example/rails2/Gemfile",
|
35
|
+
"example/rails2/README",
|
36
|
+
"example/rails2/Rakefile",
|
37
|
+
"example/rails2/app/controllers/application_controller.rb",
|
38
|
+
"example/rails2/app/views/application/helper.html.erb",
|
39
|
+
"example/rails2/config/boot.rb",
|
40
|
+
"example/rails2/config/environment.rb",
|
41
|
+
"example/rails2/config/environments/development.rb",
|
42
|
+
"example/rails2/config/environments/production.rb",
|
43
|
+
"example/rails2/config/environments/test.rb",
|
44
|
+
"example/rails2/config/initializers/cookie_verification_secret.rb",
|
45
|
+
"example/rails2/config/initializers/new_rails_defaults.rb",
|
46
|
+
"example/rails2/config/initializers/session_store.rb",
|
47
|
+
"example/rails2/config/preinitializer.rb",
|
48
|
+
"example/rails2/config/rest-graph.yaml",
|
49
|
+
"example/rails2/config/routes.rb",
|
50
|
+
"example/rails2/log",
|
51
|
+
"example/rails2/test/functional/application_controller_test.rb",
|
52
|
+
"example/rails2/test/test_helper.rb",
|
53
|
+
"example/rails2/test/unit/rails_util_test.rb",
|
54
|
+
"example/rails3/Gemfile",
|
55
|
+
"example/rails3/Rakefile",
|
56
|
+
"example/rails3/app/controllers/application_controller.rb",
|
57
|
+
"example/rails3/app/views/application/helper.html.erb",
|
58
|
+
"example/rails3/config.ru",
|
59
|
+
"example/rails3/config/application.rb",
|
60
|
+
"example/rails3/config/boot.rb",
|
61
|
+
"example/rails3/config/environment.rb",
|
62
|
+
"example/rails3/config/environments/development.rb",
|
63
|
+
"example/rails3/config/environments/production.rb",
|
64
|
+
"example/rails3/config/environments/test.rb",
|
65
|
+
"example/rails3/config/initializers/secret_token.rb",
|
66
|
+
"example/rails3/config/initializers/session_store.rb",
|
67
|
+
"example/rails3/config/rest-graph.yaml",
|
68
|
+
"example/rails3/config/routes.rb",
|
69
|
+
"example/rails3/test/functional/application_controller_test.rb",
|
70
|
+
"example/rails3/test/test_helper.rb",
|
71
|
+
"example/rails3/test/unit/rails_util_test.rb",
|
72
|
+
"example/sinatra/config.ru",
|
73
|
+
"init.rb",
|
74
|
+
"lib/rest-graph.rb",
|
75
|
+
"lib/rest-graph/config_util.rb",
|
76
|
+
"lib/rest-graph/core.rb",
|
77
|
+
"lib/rest-graph/facebook_util.rb",
|
78
|
+
"lib/rest-graph/rails_util.rb",
|
79
|
+
"lib/rest-graph/test_util.rb",
|
80
|
+
"lib/rest-graph/version.rb",
|
81
|
+
"rest-graph.gemspec",
|
82
|
+
"task/.gitignore",
|
83
|
+
"task/gemgem.rb",
|
84
|
+
"test/common.rb",
|
85
|
+
"test/config/rest-graph.yaml",
|
86
|
+
"test/test_api.rb",
|
87
|
+
"test/test_cache.rb",
|
88
|
+
"test/test_default.rb",
|
89
|
+
"test/test_error.rb",
|
90
|
+
"test/test_facebook.rb",
|
91
|
+
"test/test_handler.rb",
|
92
|
+
"test/test_load_config.rb",
|
93
|
+
"test/test_misc.rb",
|
94
|
+
"test/test_multi.rb",
|
95
|
+
"test/test_oauth.rb",
|
96
|
+
"test/test_old.rb",
|
97
|
+
"test/test_page.rb",
|
98
|
+
"test/test_parse.rb",
|
99
|
+
"test/test_rest-graph.rb",
|
100
|
+
"test/test_serialize.rb",
|
101
|
+
"test/test_test_util.rb",
|
102
|
+
"test/test_timeout.rb"]
|
103
|
+
s.homepage = "https://github.com/cardinalblue/rest-graph"
|
104
|
+
s.require_paths = ["lib"]
|
105
|
+
s.rubygems_version = "1.8.11"
|
106
|
+
s.summary = "A lightweight Facebook Graph API client"
|
113
107
|
s.test_files = [
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
108
|
+
"test/test_api.rb",
|
109
|
+
"test/test_cache.rb",
|
110
|
+
"test/test_default.rb",
|
111
|
+
"test/test_error.rb",
|
112
|
+
"test/test_facebook.rb",
|
113
|
+
"test/test_handler.rb",
|
114
|
+
"test/test_load_config.rb",
|
115
|
+
"test/test_misc.rb",
|
116
|
+
"test/test_multi.rb",
|
117
|
+
"test/test_oauth.rb",
|
118
|
+
"test/test_old.rb",
|
119
|
+
"test/test_page.rb",
|
120
|
+
"test/test_parse.rb",
|
121
|
+
"test/test_rest-graph.rb",
|
122
|
+
"test/test_serialize.rb",
|
123
|
+
"test/test_test_util.rb",
|
124
|
+
"test/test_timeout.rb"]
|
131
125
|
|
132
126
|
if s.respond_to? :specification_version then
|
133
127
|
s.specification_version = 3
|
134
128
|
|
135
129
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
136
|
-
s.add_development_dependency(%q<rest-client>, [">= 0"])
|
137
|
-
s.add_development_dependency(%q<em-http-request>, [">= 0"])
|
138
|
-
s.add_development_dependency(%q<rack>, [">= 0"])
|
139
|
-
s.add_development_dependency(%q<yajl-ruby>, [">= 0"])
|
140
|
-
s.add_development_dependency(%q<json>, [">= 0"])
|
141
|
-
s.add_development_dependency(%q<json_pure>, [">= 0"])
|
142
|
-
s.add_development_dependency(%q<ruby-hmac>, [">= 0"])
|
143
|
-
s.add_development_dependency(%q<webmock>, [">= 0"])
|
144
|
-
s.add_development_dependency(%q<bacon>, [">= 0"])
|
145
|
-
s.add_development_dependency(%q<rr>, [">= 0"])
|
146
130
|
else
|
147
|
-
s.add_dependency(%q<rest-client>, [">= 0"])
|
148
|
-
s.add_dependency(%q<em-http-request>, [">= 0"])
|
149
|
-
s.add_dependency(%q<rack>, [">= 0"])
|
150
|
-
s.add_dependency(%q<yajl-ruby>, [">= 0"])
|
151
|
-
s.add_dependency(%q<json>, [">= 0"])
|
152
|
-
s.add_dependency(%q<json_pure>, [">= 0"])
|
153
|
-
s.add_dependency(%q<ruby-hmac>, [">= 0"])
|
154
|
-
s.add_dependency(%q<webmock>, [">= 0"])
|
155
|
-
s.add_dependency(%q<bacon>, [">= 0"])
|
156
|
-
s.add_dependency(%q<rr>, [">= 0"])
|
157
131
|
end
|
158
132
|
else
|
159
|
-
s.add_dependency(%q<rest-client>, [">= 0"])
|
160
|
-
s.add_dependency(%q<em-http-request>, [">= 0"])
|
161
|
-
s.add_dependency(%q<rack>, [">= 0"])
|
162
|
-
s.add_dependency(%q<yajl-ruby>, [">= 0"])
|
163
|
-
s.add_dependency(%q<json>, [">= 0"])
|
164
|
-
s.add_dependency(%q<json_pure>, [">= 0"])
|
165
|
-
s.add_dependency(%q<ruby-hmac>, [">= 0"])
|
166
|
-
s.add_dependency(%q<webmock>, [">= 0"])
|
167
|
-
s.add_dependency(%q<bacon>, [">= 0"])
|
168
|
-
s.add_dependency(%q<rr>, [">= 0"])
|
169
133
|
end
|
170
134
|
end
|