rest-graph 1.6.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,5 +1,27 @@
1
1
  = rest-graph changes history
2
2
 
3
+ == rest-graph 1.7.0 -- 2010-12-30
4
+
5
+ * [RestGraph] Renamed rest-graph/auto_load to rest-graph/autoload; auto_load
6
+ would be still working for a while.
7
+
8
+ * [RestGraph] Renamed suppress_decode to auto_decode, and reverse semantics.
9
+ suppress_decode would still be working for a while.
10
+
11
+ * [RestGraph] Now for every API call, for example, get/post/fql/url etc,
12
+ you could pass a :secret => true option to indicate that
13
+ for this API call, use secret_access_token instead of the
14
+ normal one.
15
+
16
+ * [RestGraph] Removed RestGraph#strict option. That is, removed the hack on
17
+ Facebook's response. It's causing problems...
18
+
19
+ * [RailsUtil] Don't check cookies/session if write_cookies/write_session is
20
+ false. That is avoid accidentally checking unwanted fbs.
21
+
22
+ * [RailsUtil] Extract rest_graph_filter_uri, which would filter session,
23
+ code, singed_request, etc. on the redirecting URI.
24
+
3
25
  == rest-graph 1.6.0 -- 2010-11-19
4
26
 
5
27
  * [RestGraph] Added em-http as an alternate for HTTP client. So rest-client
@@ -3,12 +3,12 @@ GEM
3
3
  specs:
4
4
  addressable (2.2.2)
5
5
  bacon (1.1.0)
6
- bones (3.5.1)
6
+ bones (3.5.4)
7
7
  little-plugger (>= 1.1.2)
8
8
  loquacious (>= 1.7.0)
9
9
  rake (>= 0.8.7)
10
10
  crack (0.1.8)
11
- em-http-request (0.2.14)
11
+ em-http-request (0.2.15)
12
12
  addressable (>= 2.0.0)
13
13
  eventmachine (>= 0.12.9)
14
14
  eventmachine (0.12.10)
@@ -23,7 +23,7 @@ GEM
23
23
  mime-types (>= 1.16)
24
24
  rr (1.0.2)
25
25
  ruby-hmac (0.4.0)
26
- webmock (1.5.0)
26
+ webmock (1.6.1)
27
27
  addressable (>= 2.2.2)
28
28
  crack (>= 0.1.7)
29
29
  yajl-ruby (0.7.8)
data/README CHANGED
@@ -1,4 +1,4 @@
1
- = rest-graph 1.6.0
1
+ = rest-graph 1.7.0
2
2
  by Cardinal Blue ( http://cardinalblue.com )
3
3
 
4
4
  == LINKS:
@@ -88,16 +88,16 @@ YAML configuration file.
88
88
 
89
89
  To enable, just require anywhere:
90
90
 
91
- require 'rest-graph/auto_load'
91
+ require 'rest-graph/autoload'
92
92
 
93
93
  If you are using Rails and rest-graph as a gem, you can include this
94
94
  when you specify the gem in your environment file by using:
95
95
 
96
- config.gem 'rest-graph', :lib => 'rest-graph/auto_load'
96
+ config.gem 'rest-graph', :lib => 'rest-graph/autoload'
97
97
 
98
98
  Or if using bundler, by adding this line into your Gemfile:
99
99
 
100
- gem 'rest-graph', :require => 'rest-graph/auto_load'
100
+ gem 'rest-graph', :require => 'rest-graph/autoload'
101
101
 
102
102
  === Setup options:
103
103
 
@@ -105,7 +105,6 @@ Here are ALL the available options for new instance of RestGraph.
105
105
 
106
106
  rg = RestGraph.new(
107
107
  :access_token => TOKEN , # default nil
108
- :strict => false , # this is the default
109
108
  :graph_server => 'https://graph.facebook.com/', # this is the default
110
109
  :old_server => 'https://api.facebook.com/' , # this is the default
111
110
  :accept => 'text/javascript' , # this is the default
@@ -190,7 +189,7 @@ options for RestGraph instance are also valid options for rest_graph_setup.
190
189
 
191
190
  4. Load config automatically
192
191
 
193
- require 'rest-graph/auto_load' # under Rails, load config/rest-graph.yaml
192
+ require 'rest-graph/autoload' # under Rails, load config/rest-graph.yaml
194
193
  rg = RestGraph.new
195
194
 
196
195
  5. Override directly
@@ -248,9 +247,10 @@ Call functionality from Facebook's old REST API:
248
247
  :href => 'http://wikipedia.org/'}
249
248
  ].to_json
250
249
  },
251
- :suppress_decode => true) # You'll need to set suppress_decode to true
252
- # if Facebook is not returning a proper JSON
253
- # response. Otherwise, this could be omitted.
250
+ :auto_decode => false) # You'll need to set auto_decode to false for
251
+ # this API request if Facebook is not returning
252
+ # a proper formatted JSON response. Otherwise,
253
+ # this could be omitted.
254
254
 
255
255
  # Some Old Rest API requires a special access token with app secret
256
256
  # inside of it. For those methods, use secret_old_rest instead of the
@@ -1,4 +1,4 @@
1
- = rest-graph 1.6.0
1
+ = rest-graph 1.7.0
2
2
  by Cardinal Blue ( http://cardinalblue.com )
3
3
 
4
4
  == LINKS:
@@ -88,16 +88,16 @@ YAML configuration file.
88
88
 
89
89
  To enable, just require anywhere:
90
90
 
91
- require 'rest-graph/auto_load'
91
+ require 'rest-graph/autoload'
92
92
 
93
93
  If you are using Rails and rest-graph as a gem, you can include this
94
94
  when you specify the gem in your environment file by using:
95
95
 
96
- config.gem 'rest-graph', :lib => 'rest-graph/auto_load'
96
+ config.gem 'rest-graph', :lib => 'rest-graph/autoload'
97
97
 
98
98
  Or if using bundler, by adding this line into your Gemfile:
99
99
 
100
- gem 'rest-graph', :require => 'rest-graph/auto_load'
100
+ gem 'rest-graph', :require => 'rest-graph/autoload'
101
101
 
102
102
  === Setup options:
103
103
 
@@ -105,7 +105,6 @@ Here are ALL the available options for new instance of RestGraph.
105
105
 
106
106
  rg = RestGraph.new(
107
107
  :access_token => TOKEN , # default nil
108
- :strict => false , # this is the default
109
108
  :graph_server => 'https://graph.facebook.com/', # this is the default
110
109
  :old_server => 'https://api.facebook.com/' , # this is the default
111
110
  :accept => 'text/javascript' , # this is the default
@@ -190,7 +189,7 @@ options for RestGraph instance are also valid options for rest_graph_setup.
190
189
 
191
190
  4. Load config automatically
192
191
 
193
- require 'rest-graph/auto_load' # under Rails, load config/rest-graph.yaml
192
+ require 'rest-graph/autoload' # under Rails, load config/rest-graph.yaml
194
193
  rg = RestGraph.new
195
194
 
196
195
  5. Override directly
@@ -248,9 +247,10 @@ Call functionality from Facebook's old REST API:
248
247
  :href => 'http://wikipedia.org/'}
249
248
  ].to_json
250
249
  },
251
- :suppress_decode => true) # You'll need to set suppress_decode to true
252
- # if Facebook is not returning a proper JSON
253
- # response. Otherwise, this could be omitted.
250
+ :auto_decode => false) # You'll need to set auto_decode to false for
251
+ # this API request if Facebook is not returning
252
+ # a proper formatted JSON response. Otherwise,
253
+ # this could be omitted.
254
254
 
255
255
  # Some Old Rest API requires a special access token with app secret
256
256
  # inside of it. For those methods, use secret_old_rest instead of the
data/TODO CHANGED
@@ -1,8 +1,10 @@
1
1
  = rest-graph todo list
2
2
 
3
- * error_handler can't be turned off
4
-
3
+ == RailsUtil
4
+ * provide a :validate_access_token or so option
5
5
  * test for rails util for writing cookie
6
6
 
7
+ == RestGraph
8
+ * error_handler can't be turned off
7
9
  * more docs?
8
10
  * more examples?
@@ -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.9' unless defined? RAILS_GEM_VERSION
4
+ RAILS_GEM_VERSION = '2.3.10' 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')
@@ -19,7 +19,7 @@ Rails::Initializer.run do |config|
19
19
  # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
20
20
  # config.gem "sqlite3-ruby", :lib => "sqlite3"
21
21
  # config.gem "aws-s3", :lib => "aws/s3"
22
- config.gem 'rest-graph', :lib => 'rest-graph/auto_load'
22
+ config.gem 'rest-graph', :lib => 'rest-graph/autoload'
23
23
 
24
24
  # Only load the plugins named here, in the order given (default is alphabetical).
25
25
  # :all can be used as a placeholder for all plugins not explicitly named
@@ -16,7 +16,7 @@ class ApplicationControllerTest < ActionController::TestCase
16
16
  end
17
17
 
18
18
  def teardown
19
- WebMock.reset_webmock
19
+ WebMock.reset!
20
20
  end
21
21
 
22
22
  def test_index
@@ -87,7 +87,7 @@ class ApplicationControllerTest < ActionController::TestCase
87
87
  end
88
88
 
89
89
  def test_cache
90
- WebMock.reset_webmock
90
+ WebMock.reset!
91
91
  stub_request(:get, 'https://graph.facebook.com/cache').
92
92
  to_return(:body => '{"message":"ok"}')
93
93
 
@@ -97,7 +97,7 @@ class ApplicationControllerTest < ActionController::TestCase
97
97
  end
98
98
 
99
99
  def test_handler
100
- WebMock.reset_webmock
100
+ WebMock.reset!
101
101
  stub_request(:get, 'https://graph.facebook.com/me?access_token=aloha').
102
102
  to_return(:body => '["snowman"]')
103
103
 
@@ -110,7 +110,7 @@ class ApplicationControllerTest < ActionController::TestCase
110
110
  end
111
111
 
112
112
  def test_session
113
- WebMock.reset_webmock
113
+ WebMock.reset!
114
114
  stub_request(:get, 'https://graph.facebook.com/me?access_token=wozilla').
115
115
  to_return(:body => '["fireball"]')
116
116
 
@@ -123,7 +123,7 @@ class ApplicationControllerTest < ActionController::TestCase
123
123
  end
124
124
 
125
125
  def test_cookies
126
- WebMock.reset_webmock
126
+ WebMock.reset!
127
127
  stub_request(:get, 'https://graph.facebook.com/me?access_token=blizzard').
128
128
  to_return(:body => '["yeti"]')
129
129
 
data/init.rb CHANGED
@@ -1,2 +1,2 @@
1
1
 
2
- require 'rest-graph/auto_load'
2
+ require 'rest-graph/autoload'
@@ -237,24 +237,26 @@ class RestGraph < RestGraphStruct
237
237
 
238
238
  # graph api related methods
239
239
 
240
- def url path, query={}, server=graph_server
241
- "#{server}#{path}#{build_query_string(query)}"
240
+ def url path, query={}, server=graph_server, opts={}
241
+ "#{server}#{path}#{build_query_string(query, opts)}"
242
242
  end
243
243
 
244
244
  def get path, query={}, opts={}, &cb
245
- request(opts, [:get , url(path, query, graph_server)], &cb)
245
+ request(opts, [:get , url(path, query, graph_server, opts)], &cb)
246
246
  end
247
247
 
248
248
  def delete path, query={}, opts={}, &cb
249
- request(opts, [:delete, url(path, query, graph_server)], &cb)
249
+ request(opts, [:delete, url(path, query, graph_server, opts)], &cb)
250
250
  end
251
251
 
252
252
  def post path, payload={}, query={}, opts={}, &cb
253
- request(opts, [:post , url(path, query, graph_server), payload], &cb)
253
+ request(opts, [:post , url(path, query, graph_server, opts), payload],
254
+ &cb)
254
255
  end
255
256
 
256
257
  def put path, payload={}, query={}, opts={}, &cb
257
- request(opts, [:put , url(path, query, graph_server), payload], &cb)
258
+ request(opts, [:put , url(path, query, graph_server, opts), payload],
259
+ &cb)
258
260
  end
259
261
 
260
262
  # request by eventmachine (em-http)
@@ -278,7 +280,7 @@ class RestGraph < RestGraphStruct
278
280
  def multi reqs, opts={}, &cb
279
281
  request({:async => true}.merge(opts),
280
282
  *reqs.map{ |(meth, path, query, payload)|
281
- [meth, url(path, query || {}, graph_server), payload]
283
+ [meth, url(path, query || {}, graph_server, opts), payload]
282
284
  }, &cb)
283
285
  end
284
286
 
@@ -372,7 +374,7 @@ class RestGraph < RestGraphStruct
372
374
  def authorize! opts={}
373
375
  query = {:client_id => app_id, :client_secret => secret}.merge(opts)
374
376
  self.data = Rack::Utils.parse_query(
375
- request({:suppress_decode => true}.merge(opts),
377
+ request({:auto_decode => false}.merge(opts),
376
378
  [:get, url('oauth/access_token', query)]))
377
379
  end
378
380
 
@@ -386,13 +388,13 @@ class RestGraph < RestGraphStruct
386
388
  request(
387
389
  opts,
388
390
  [:get,
389
- url("method/#{path}", {:format => 'json'}.merge(query), old_server)],
391
+ url("method/#{path}", {:format => 'json'}.merge(query),
392
+ old_server, opts)],
390
393
  &cb)
391
394
  end
392
395
 
393
396
  def secret_old_rest path, query={}, opts={}, &cb
394
- old_rest(path, {:access_token => secret_access_token}.merge(query), opts,
395
- &cb)
397
+ old_rest(path, query, {:secret => true}.merge(opts), &cb)
396
398
  end
397
399
  alias_method :broken_old_rest, :secret_old_rest
398
400
 
@@ -473,9 +475,10 @@ class RestGraph < RestGraphStruct
473
475
  log(Event::Requested.new(Time.now - start_time, uri))
474
476
  end
475
477
 
476
- def build_query_string query={}
477
- qq = access_token ? {:access_token => access_token}.merge(query) : query
478
- q = qq.select{ |k, v| v }
478
+ def build_query_string query={}, opts={}
479
+ token = opts[:secret] ? secret_access_token : access_token
480
+ qq = token ? {:access_token => token}.merge(query) : query
481
+ q = qq.select{ |k, v| v } # compacting the hash
479
482
  return '' if q.empty?
480
483
  return '?' + q.map{ |(k, v)| "#{k}=#{CGI.escape(v.to_s)}" }.join('&')
481
484
  end
@@ -488,13 +491,10 @@ class RestGraph < RestGraphStruct
488
491
  end
489
492
 
490
493
  def post_request result, uri='', opts={}, &cb
491
- if auto_decode && !opts[:suppress_decode]
494
+ if decode?(opts)
495
+ # [this].first is not needed for yajl-ruby
492
496
  decoded = self.class.json_decode("[#{result}]").first
493
- check_error(if strict || !decoded.kind_of?(String)
494
- decoded
495
- else
496
- self.class.json_decode(decoded)
497
- end, uri, &cb)
497
+ check_error(decoded, uri, &cb)
498
498
  else
499
499
  block_given? ? yield(result) : result
500
500
  end
@@ -502,6 +502,16 @@ class RestGraph < RestGraphStruct
502
502
  error_handler.call(error, uri) if error_handler
503
503
  end
504
504
 
505
+ def decode? opts
506
+ if opts.has_key?(:auto_decode)
507
+ opts[:auto_decode]
508
+ elsif opts.has_key?(:suppress_decode)
509
+ !opts[:suppress_decode]
510
+ else
511
+ auto_decode
512
+ end
513
+ end
514
+
505
515
  def check_sig_and_return_data cookies
506
516
  cookies if secret && calculate_sig(cookies) == cookies['sig']
507
517
  end
@@ -1,4 +1,4 @@
1
1
 
2
2
  require 'rest-graph/load_config'
3
3
 
4
- RestGraph::LoadConfig.auto_load!
4
+ RestGraph::LoadConfig.autoload!
@@ -0,0 +1,4 @@
1
+
2
+ require 'rest-graph/load_config'
3
+
4
+ RestGraph::LoadConfig.autoload!
@@ -7,7 +7,7 @@ require 'rest-graph/rails_util' if Object.const_defined?(:Rails)
7
7
 
8
8
  module RestGraph::LoadConfig
9
9
  module_function
10
- def auto_load!
10
+ def autoload!
11
11
  RestGraph::LoadConfig.load_if_rails!
12
12
  end
13
13
 
@@ -223,7 +223,7 @@ module RestGraph::RailsUtil
223
223
  end
224
224
 
225
225
  def rest_graph_check_rg_session
226
- return if rest_graph.authorized? ||
226
+ return if rest_graph.authorized? || !rest_graph_oget(:write_session) ||
227
227
  !(fbs = session[rest_graph_storage_key])
228
228
  rest_graph.parse_fbs!(fbs)
229
229
  logger.debug("DEBUG: RestGraph: detected rest-graph session, parsed:" \
@@ -231,7 +231,7 @@ module RestGraph::RailsUtil
231
231
  end
232
232
 
233
233
  def rest_graph_check_rg_cookies
234
- return if rest_graph.authorized? ||
234
+ return if rest_graph.authorized? || !rest_graph_oget(:write_cookies) ||
235
235
  !(fbs = cookies[rest_graph_storage_key])
236
236
  rest_graph.parse_fbs!(fbs)
237
237
  logger.debug("DEBUG: RestGraph: detected rest-graph cookies, parsed:" \
@@ -269,20 +269,24 @@ module RestGraph::RailsUtil
269
269
 
270
270
  # ==================== begin misc ================================
271
271
  def rest_graph_normalized_request_uri
272
- uri = URI.encode(
273
- if rest_graph_in_canvas?
274
- # rails 3 uses newer rack which has fullpath
275
- "http://apps.facebook.com/#{rest_graph_oget(:canvas)}" +
276
- (request.respond_to?(:fullpath) ?
277
- request.fullpath : request.request_uri)
278
- else
279
- request.url
280
- end)
281
- URI.parse(uri).tap{ |uri|
282
- uri.query = uri.query.split('&').reject{ |q|
283
- q =~ /^(code|session|signed_request)\=/
284
- }.join('&') if uri.query
285
- uri.query = nil if uri.query.blank?
272
+ uri = if rest_graph_in_canvas?
273
+ # rails 3 uses newer rack which has fullpath
274
+ "http://apps.facebook.com/#{rest_graph_oget(:canvas)}" +
275
+ (request.respond_to?(:fullpath) ?
276
+ request.fullpath : request.request_uri)
277
+ else
278
+ request.url
279
+ end
280
+
281
+ rest_graph_filter_uri(uri)
282
+ end
283
+
284
+ def rest_graph_filter_uri uri
285
+ URI.parse(URI.encode(uri)).tap{ |uri|
286
+ uri.query = uri.query.split('&').reject{ |q|
287
+ q =~ /^(code|session|signed_request)\=/
288
+ }.join('&') if uri.query
289
+ uri.query = nil if uri.query.blank?
286
290
  }.to_s
287
291
  end
288
292
 
@@ -1,4 +1,4 @@
1
1
 
2
2
  require 'rest-graph'
3
3
 
4
- RestGraph::VERSION = '1.6.0'
4
+ RestGraph::VERSION = '1.7.0'
@@ -1,309 +1,64 @@
1
- --- !ruby/object:Gem::Specification
2
- name: rest-graph
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 6
8
- - 0
9
- version: 1.6.0
10
- platform: ruby
11
- authors:
12
- - Cardinal Blue
13
- - "Lin Jen-Shin (aka godfat \xE7\x9C\x9F\xE5\xB8\xB8)"
14
- autorequire:
15
- bindir: bin
16
- cert_chain: []
1
+ # -*- encoding: utf-8 -*-
17
2
 
18
- date: 2010-11-19 00:00:00 +08:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- name: rest-client
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- segments:
30
- - 1
31
- - 6
32
- - 1
33
- version: 1.6.1
34
- type: :development
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: em-http-request
38
- prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- segments:
45
- - 0
46
- - 2
47
- - 15
48
- version: 0.2.15
49
- type: :development
50
- version_requirements: *id002
51
- - !ruby/object:Gem::Dependency
52
- name: rack
53
- prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
55
- none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- segments:
60
- - 1
61
- - 2
62
- - 1
63
- version: 1.2.1
64
- type: :development
65
- version_requirements: *id003
66
- - !ruby/object:Gem::Dependency
67
- name: yajl-ruby
68
- prerelease: false
69
- requirement: &id004 !ruby/object:Gem::Requirement
70
- none: false
71
- requirements:
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- segments:
75
- - 0
76
- - 7
77
- - 8
78
- version: 0.7.8
79
- type: :development
80
- version_requirements: *id004
81
- - !ruby/object:Gem::Dependency
82
- name: json
83
- prerelease: false
84
- requirement: &id005 !ruby/object:Gem::Requirement
85
- none: false
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- segments:
90
- - 1
91
- - 4
92
- - 6
93
- version: 1.4.6
94
- type: :development
95
- version_requirements: *id005
96
- - !ruby/object:Gem::Dependency
97
- name: json_pure
98
- prerelease: false
99
- requirement: &id006 !ruby/object:Gem::Requirement
100
- none: false
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- segments:
105
- - 1
106
- - 4
107
- - 6
108
- version: 1.4.6
109
- type: :development
110
- version_requirements: *id006
111
- - !ruby/object:Gem::Dependency
112
- name: ruby-hmac
113
- prerelease: false
114
- requirement: &id007 !ruby/object:Gem::Requirement
115
- none: false
116
- requirements:
117
- - - ">="
118
- - !ruby/object:Gem::Version
119
- segments:
120
- - 0
121
- - 4
122
- - 0
123
- version: 0.4.0
124
- type: :development
125
- version_requirements: *id007
126
- - !ruby/object:Gem::Dependency
127
- name: rr
128
- prerelease: false
129
- requirement: &id008 !ruby/object:Gem::Requirement
130
- none: false
131
- requirements:
132
- - - ">="
133
- - !ruby/object:Gem::Version
134
- segments:
135
- - 1
136
- - 0
137
- - 2
138
- version: 1.0.2
139
- type: :development
140
- version_requirements: *id008
141
- - !ruby/object:Gem::Dependency
142
- name: webmock
143
- prerelease: false
144
- requirement: &id009 !ruby/object:Gem::Requirement
145
- none: false
146
- requirements:
147
- - - ">="
148
- - !ruby/object:Gem::Version
149
- segments:
150
- - 1
151
- - 6
152
- - 1
153
- version: 1.6.1
154
- type: :development
155
- version_requirements: *id009
156
- - !ruby/object:Gem::Dependency
157
- name: bacon
158
- prerelease: false
159
- requirement: &id010 !ruby/object:Gem::Requirement
160
- none: false
161
- requirements:
162
- - - ">="
163
- - !ruby/object:Gem::Version
164
- segments:
165
- - 1
166
- - 1
167
- - 0
168
- version: 1.1.0
169
- type: :development
170
- version_requirements: *id010
171
- - !ruby/object:Gem::Dependency
172
- name: bones
173
- prerelease: false
174
- requirement: &id011 !ruby/object:Gem::Requirement
175
- none: false
176
- requirements:
177
- - - ">="
178
- - !ruby/object:Gem::Version
179
- segments:
180
- - 3
181
- - 5
182
- - 1
183
- version: 3.5.1
184
- type: :development
185
- version_requirements: *id011
186
- description: A super simple Facebook Open Graph API client
187
- email: dev (XD) cardinalblue.com
188
- executables: []
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{rest-graph}
5
+ s.version = "1.7.0"
189
6
 
190
- extensions: []
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Cardinal Blue", "Lin Jen-Shin (aka godfat 真常)"]
9
+ s.date = %q{2010-12-30}
10
+ s.description = %q{A super simple Facebook Open Graph API client}
11
+ s.email = %q{dev (XD) cardinalblue.com}
12
+ s.extra_rdoc_files = ["CHANGES", "CONTRIBUTORS", "Gemfile", "Gemfile.lock", "LICENSE", "README", "TODO", "rest-graph.gemspec"]
13
+ s.files = ["CHANGES", "CONTRIBUTORS", "Gemfile", "Gemfile.lock", "LICENSE", "README", "README.rdoc", "Rakefile", "TODO", "example/multi/config.ru", "example/multi/rainbows.rb", "example/rails2/README", "example/rails2/Rakefile", "example/rails2/app/controllers/application_controller.rb", "example/rails2/config/boot.rb", "example/rails2/config/environment.rb", "example/rails2/config/environments/development.rb", "example/rails2/config/environments/production.rb", "example/rails2/config/environments/test.rb", "example/rails2/config/initializers/cookie_verification_secret.rb", "example/rails2/config/initializers/new_rails_defaults.rb", "example/rails2/config/initializers/session_store.rb", "example/rails2/config/rest-graph.yaml", "example/rails2/config/routes.rb", "example/rails2/log", "example/rails2/script/console", "example/rails2/script/server", "example/rails2/test/functional/application_controller_test.rb", "example/rails2/test/test_helper.rb", "example/rails2/test/unit/rails_util_test.rb", "init.rb", "lib/rest-graph.rb", "lib/rest-graph/auto_load.rb", "lib/rest-graph/autoload.rb", "lib/rest-graph/load_config.rb", "lib/rest-graph/rails_util.rb", "lib/rest-graph/test_util.rb", "lib/rest-graph/version.rb", "rest-graph.gemspec", "test/common.rb", "test/config/rest-graph.yaml", "test/test_api.rb", "test/test_cache.rb", "test/test_default.rb", "test/test_error.rb", "test/test_handler.rb", "test/test_load_config.rb", "test/test_misc.rb", "test/test_multi.rb", "test/test_oauth.rb", "test/test_old.rb", "test/test_page.rb", "test/test_parse.rb", "test/test_rest-graph.rb", "test/test_serialize.rb", "test/test_test_util.rb", "test/test_timeout.rb"]
14
+ s.homepage = %q{http://github.com/cardinalblue/rest-graph}
15
+ s.rdoc_options = ["--main", "README.rdoc"]
16
+ s.require_paths = ["lib"]
17
+ s.rubyforge_project = %q{rest-graph}
18
+ s.rubygems_version = %q{1.3.7}
19
+ s.summary = %q{A super simple Facebook Open Graph API client}
20
+ s.test_files = ["test/test_api.rb", "test/test_cache.rb", "test/test_default.rb", "test/test_error.rb", "test/test_handler.rb", "test/test_load_config.rb", "test/test_misc.rb", "test/test_multi.rb", "test/test_oauth.rb", "test/test_old.rb", "test/test_page.rb", "test/test_parse.rb", "test/test_rest-graph.rb", "test/test_serialize.rb", "test/test_test_util.rb", "test/test_timeout.rb"]
191
21
 
192
- extra_rdoc_files:
193
- - .specification
194
- - CHANGES
195
- - CONTRIBUTORS
196
- - Gemfile
197
- - Gemfile.lock
198
- - LICENSE
199
- - README
200
- - TODO
201
- - rest-graph.gemspec
202
- files:
203
- - .specification
204
- - CHANGES
205
- - CONTRIBUTORS
206
- - Gemfile
207
- - Gemfile.lock
208
- - LICENSE
209
- - README
210
- - README.rdoc
211
- - Rakefile
212
- - TODO
213
- - example/multi/config.ru
214
- - example/multi/rainbows.rb
215
- - example/rails2/README
216
- - example/rails2/Rakefile
217
- - example/rails2/app/controllers/application_controller.rb
218
- - example/rails2/config/boot.rb
219
- - example/rails2/config/environment.rb
220
- - example/rails2/config/environments/development.rb
221
- - example/rails2/config/environments/production.rb
222
- - example/rails2/config/environments/test.rb
223
- - example/rails2/config/initializers/cookie_verification_secret.rb
224
- - example/rails2/config/initializers/new_rails_defaults.rb
225
- - example/rails2/config/initializers/session_store.rb
226
- - example/rails2/config/rest-graph.yaml
227
- - example/rails2/config/routes.rb
228
- - example/rails2/log
229
- - example/rails2/script/console
230
- - example/rails2/script/server
231
- - example/rails2/test/functional/application_controller_test.rb
232
- - example/rails2/test/test_helper.rb
233
- - example/rails2/test/unit/rails_util_test.rb
234
- - init.rb
235
- - lib/rest-graph.rb
236
- - lib/rest-graph/auto_load.rb
237
- - lib/rest-graph/load_config.rb
238
- - lib/rest-graph/rails_util.rb
239
- - lib/rest-graph/test_util.rb
240
- - lib/rest-graph/version.rb
241
- - rest-graph.gemspec
242
- - test/common.rb
243
- - test/config/rest-graph.yaml
244
- - test/test_api.rb
245
- - test/test_cache.rb
246
- - test/test_default.rb
247
- - test/test_error.rb
248
- - test/test_handler.rb
249
- - test/test_load_config.rb
250
- - test/test_misc.rb
251
- - test/test_multi.rb
252
- - test/test_oauth.rb
253
- - test/test_old.rb
254
- - test/test_page.rb
255
- - test/test_parse.rb
256
- - test/test_rest-graph.rb
257
- - test/test_serialize.rb
258
- - test/test_test_util.rb
259
- - test/test_timeout.rb
260
- has_rdoc: true
261
- homepage: http://github.com/cardinalblue/rest-graph
262
- licenses: []
22
+ if s.respond_to? :specification_version then
23
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
24
+ s.specification_version = 3
263
25
 
264
- post_install_message:
265
- rdoc_options:
266
- - --main
267
- - README.rdoc
268
- require_paths:
269
- - lib
270
- required_ruby_version: !ruby/object:Gem::Requirement
271
- none: false
272
- requirements:
273
- - - ">="
274
- - !ruby/object:Gem::Version
275
- segments:
276
- - 0
277
- version: "0"
278
- required_rubygems_version: !ruby/object:Gem::Requirement
279
- none: false
280
- requirements:
281
- - - ">="
282
- - !ruby/object:Gem::Version
283
- segments:
284
- - 0
285
- version: "0"
286
- requirements: []
287
-
288
- rubyforge_project: rest-graph
289
- rubygems_version: 1.3.7
290
- signing_key:
291
- specification_version: 3
292
- summary: A super simple Facebook Open Graph API client
293
- test_files:
294
- - test/test_api.rb
295
- - test/test_cache.rb
296
- - test/test_default.rb
297
- - test/test_error.rb
298
- - test/test_handler.rb
299
- - test/test_load_config.rb
300
- - test/test_misc.rb
301
- - test/test_multi.rb
302
- - test/test_oauth.rb
303
- - test/test_old.rb
304
- - test/test_page.rb
305
- - test/test_parse.rb
306
- - test/test_rest-graph.rb
307
- - test/test_serialize.rb
308
- - test/test_test_util.rb
309
- - test/test_timeout.rb
26
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
27
+ s.add_development_dependency(%q<rest-client>, [">= 1.6.1"])
28
+ s.add_development_dependency(%q<em-http-request>, [">= 0.2.15"])
29
+ s.add_development_dependency(%q<rack>, [">= 1.2.1"])
30
+ s.add_development_dependency(%q<yajl-ruby>, [">= 0.7.8"])
31
+ s.add_development_dependency(%q<json>, [">= 1.4.6"])
32
+ s.add_development_dependency(%q<json_pure>, [">= 1.4.6"])
33
+ s.add_development_dependency(%q<ruby-hmac>, [">= 0.4.0"])
34
+ s.add_development_dependency(%q<rr>, [">= 1.0.2"])
35
+ s.add_development_dependency(%q<webmock>, [">= 1.6.1"])
36
+ s.add_development_dependency(%q<bacon>, [">= 1.1.0"])
37
+ s.add_development_dependency(%q<bones>, [">= 3.5.4"])
38
+ else
39
+ s.add_dependency(%q<rest-client>, [">= 1.6.1"])
40
+ s.add_dependency(%q<em-http-request>, [">= 0.2.15"])
41
+ s.add_dependency(%q<rack>, [">= 1.2.1"])
42
+ s.add_dependency(%q<yajl-ruby>, [">= 0.7.8"])
43
+ s.add_dependency(%q<json>, [">= 1.4.6"])
44
+ s.add_dependency(%q<json_pure>, [">= 1.4.6"])
45
+ s.add_dependency(%q<ruby-hmac>, [">= 0.4.0"])
46
+ s.add_dependency(%q<rr>, [">= 1.0.2"])
47
+ s.add_dependency(%q<webmock>, [">= 1.6.1"])
48
+ s.add_dependency(%q<bacon>, [">= 1.1.0"])
49
+ s.add_dependency(%q<bones>, [">= 3.5.4"])
50
+ end
51
+ else
52
+ s.add_dependency(%q<rest-client>, [">= 1.6.1"])
53
+ s.add_dependency(%q<em-http-request>, [">= 0.2.15"])
54
+ s.add_dependency(%q<rack>, [">= 1.2.1"])
55
+ s.add_dependency(%q<yajl-ruby>, [">= 0.7.8"])
56
+ s.add_dependency(%q<json>, [">= 1.4.6"])
57
+ s.add_dependency(%q<json_pure>, [">= 1.4.6"])
58
+ s.add_dependency(%q<ruby-hmac>, [">= 0.4.0"])
59
+ s.add_dependency(%q<rr>, [">= 1.0.2"])
60
+ s.add_dependency(%q<webmock>, [">= 1.6.1"])
61
+ s.add_dependency(%q<bacon>, [">= 1.1.0"])
62
+ s.add_dependency(%q<bones>, [">= 3.5.4"])
63
+ end
64
+ end