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.
@@ -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
- cache = rest_graph.cache
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.11' unless defined? RAILS_GEM_VERSION
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 [nil, {'a' => 'b'}], YAML.load(@response.body)
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
@@ -1,11 +1,11 @@
1
1
 
2
2
  source 'http://rubygems.org'
3
3
 
4
- gem 'rails', '3.0.7'
4
+ gem 'rails', '3.0.9'
5
5
 
6
6
  gem 'rest-client' # for rest-graph
7
7
  gem 'yajl-ruby' # for rest-graph
8
- gem 'rest-graph'
8
+ gem 'rest-graph', :path => '../../'
9
9
 
10
10
  group 'test' do
11
11
  gem 'rr'
@@ -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
- cache = rest_graph.cache
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 => '')
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5
+
6
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -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 [nil, {'a' => 'b'}], YAML.load(@response.body)
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
@@ -34,7 +34,7 @@ module RestGraph::ConfigUtil
34
34
  #{v.kind_of?(String) ? "'#{v}'" : v}
35
35
  end
36
36
  RUBY
37
- }.join)
37
+ }.join, __FILE__, __LINE__)
38
38
 
39
39
  RestGraph.send(:extend, mod)
40
40
  end
@@ -1,7 +1,8 @@
1
1
 
2
2
  # optional http client
3
3
  begin; require 'restclient' ; rescue LoadError; end
4
- begin; require 'em-http-request'; rescue LoadError; end
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(:auto_decode, :timeout,
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
- (Attributes + [:access_token]).each{ |name|
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 = parse_fbs!(cookies["fbs_#{app_id}"])
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
- if opts[:expires_in].kind_of?(Fixnum) && cache.method(:store).arity == -3
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 => opts[: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 ||= {:log_method => logger.method(:debug)}
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["fbs_#{rest_graph.app_id}"]
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:" \
@@ -1,4 +1,4 @@
1
1
 
2
2
  require 'rest-graph/core'
3
3
 
4
- RestGraph::VERSION = '1.9.1'
4
+ RestGraph::VERSION = '2.0.0'
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 = %q{rest-graph}
5
- s.version = "1.9.1"
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
- %q{Cardinal Blue},
10
- %q{Lin Jen-Shin (godfat)}]
11
- s.date = %q{2011-06-07}
12
- s.description = %q{A lightweight Facebook Graph API client}
13
- s.email = [%q{dev (XD) cardinalblue.com}]
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
- %q{.gitignore},
21
- %q{.gitmodules},
22
- %q{CHANGES},
23
- %q{CONTRIBUTORS},
24
- %q{Gemfile},
25
- %q{LICENSE},
26
- %q{README},
27
- %q{README.md},
28
- %q{Rakefile},
29
- %q{TODO},
30
- %q{doc/ToC.md},
31
- %q{doc/dependency.md},
32
- %q{doc/design.md},
33
- %q{doc/heroku-facebook.md},
34
- %q{doc/rails.md},
35
- %q{doc/test.md},
36
- %q{doc/tutorial.md},
37
- %q{example/multi/config.ru},
38
- %q{example/multi/rainbows.rb},
39
- %q{example/rails2/Gemfile},
40
- %q{example/rails2/README},
41
- %q{example/rails2/Rakefile},
42
- %q{example/rails2/app/controllers/application_controller.rb},
43
- %q{example/rails2/app/views/application/helper.html.erb},
44
- %q{example/rails2/config/boot.rb},
45
- %q{example/rails2/config/environment.rb},
46
- %q{example/rails2/config/environments/development.rb},
47
- %q{example/rails2/config/environments/production.rb},
48
- %q{example/rails2/config/environments/test.rb},
49
- %q{example/rails2/config/initializers/cookie_verification_secret.rb},
50
- %q{example/rails2/config/initializers/new_rails_defaults.rb},
51
- %q{example/rails2/config/initializers/session_store.rb},
52
- %q{example/rails2/config/preinitializer.rb},
53
- %q{example/rails2/config/rest-graph.yaml},
54
- %q{example/rails2/config/routes.rb},
55
- %q{example/rails2/log},
56
- %q{example/rails2/test/functional/application_controller_test.rb},
57
- %q{example/rails2/test/test_helper.rb},
58
- %q{example/rails2/test/unit/rails_util_test.rb},
59
- %q{example/rails3/Gemfile},
60
- %q{example/rails3/Rakefile},
61
- %q{example/rails3/app/controllers/application_controller.rb},
62
- %q{example/rails3/app/views/application/helper.html.erb},
63
- %q{example/rails3/config.ru},
64
- %q{example/rails3/config/application.rb},
65
- %q{example/rails3/config/environment.rb},
66
- %q{example/rails3/config/environments/development.rb},
67
- %q{example/rails3/config/environments/production.rb},
68
- %q{example/rails3/config/environments/test.rb},
69
- %q{example/rails3/config/initializers/secret_token.rb},
70
- %q{example/rails3/config/initializers/session_store.rb},
71
- %q{example/rails3/config/rest-graph.yaml},
72
- %q{example/rails3/config/routes.rb},
73
- %q{example/rails3/test/functional/application_controller_test.rb},
74
- %q{example/rails3/test/test_helper.rb},
75
- %q{example/rails3/test/unit/rails_util_test.rb},
76
- %q{example/sinatra/config.ru},
77
- %q{init.rb},
78
- %q{lib/rest-graph.rb},
79
- %q{lib/rest-graph/config_util.rb},
80
- %q{lib/rest-graph/core.rb},
81
- %q{lib/rest-graph/facebook_util.rb},
82
- %q{lib/rest-graph/rails_util.rb},
83
- %q{lib/rest-graph/test_util.rb},
84
- %q{lib/rest-graph/version.rb},
85
- %q{rest-graph.gemspec},
86
- %q{task/gemgem.rb},
87
- %q{test/common.rb},
88
- %q{test/config/rest-graph.yaml},
89
- %q{test/test_api.rb},
90
- %q{test/test_cache.rb},
91
- %q{test/test_default.rb},
92
- %q{test/test_error.rb},
93
- %q{test/test_facebook.rb},
94
- %q{test/test_handler.rb},
95
- %q{test/test_load_config.rb},
96
- %q{test/test_misc.rb},
97
- %q{test/test_multi.rb},
98
- %q{test/test_oauth.rb},
99
- %q{test/test_old.rb},
100
- %q{test/test_page.rb},
101
- %q{test/test_parse.rb},
102
- %q{test/test_rest-graph.rb},
103
- %q{test/test_serialize.rb},
104
- %q{test/test_test_util.rb},
105
- %q{test/test_timeout.rb}]
106
- s.homepage = %q{https://github.com/godfat/}
107
- s.rdoc_options = [
108
- %q{--main},
109
- %q{README}]
110
- s.require_paths = [%q{lib}]
111
- s.rubygems_version = %q{1.8.5}
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
- %q{test/test_api.rb},
115
- %q{test/test_cache.rb},
116
- %q{test/test_default.rb},
117
- %q{test/test_error.rb},
118
- %q{test/test_facebook.rb},
119
- %q{test/test_handler.rb},
120
- %q{test/test_load_config.rb},
121
- %q{test/test_misc.rb},
122
- %q{test/test_multi.rb},
123
- %q{test/test_oauth.rb},
124
- %q{test/test_old.rb},
125
- %q{test/test_page.rb},
126
- %q{test/test_parse.rb},
127
- %q{test/test_rest-graph.rb},
128
- %q{test/test_serialize.rb},
129
- %q{test/test_test_util.rb},
130
- %q{test/test_timeout.rb}]
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