rest-graph 1.4.5 → 1.4.6
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.
- data/CHANGES +31 -0
- data/CONTRIBUTORS +7 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +30 -49
- data/README +215 -149
- data/README.rdoc +215 -149
- data/Rakefile +16 -6
- data/example/rails/test/functional/application_controller_test.rb +2 -2
- data/lib/rest-graph.rb +113 -25
- data/lib/rest-graph/rails_util.rb +36 -26
- data/lib/rest-graph/version.rb +1 -1
- data/rest-graph.gemspec +24 -18
- data/test/common.rb +3 -0
- data/test/test_access_token.rb +26 -0
- data/test/{test_rest-graph.rb → test_api.rb} +2 -66
- data/test/test_cache.rb +41 -0
- data/test/test_handler.rb +2 -4
- data/test/test_misc.rb +51 -0
- data/test/test_old.rb +1 -13
- data/test/test_parse.rb +1 -1
- data/test/test_serialize.rb +26 -0
- metadata +67 -42
@@ -111,7 +111,7 @@ class ApplicationControllerTest < ActionController::TestCase
|
|
111
111
|
stub_request(:get, 'https://graph.facebook.com/me?access_token=wozilla').
|
112
112
|
to_return(:body => '["fireball"]')
|
113
113
|
|
114
|
-
@request.session[
|
114
|
+
@request.session[RestGraph::RailsUtil.rest_graph_storage_key] =
|
115
115
|
RestGraph.new(:access_token => 'wozilla').fbs
|
116
116
|
|
117
117
|
get(:session_)
|
@@ -124,7 +124,7 @@ class ApplicationControllerTest < ActionController::TestCase
|
|
124
124
|
stub_request(:get, 'https://graph.facebook.com/me?access_token=blizzard').
|
125
125
|
to_return(:body => '["yeti"]')
|
126
126
|
|
127
|
-
@request.cookies[
|
127
|
+
@request.cookies[RestGraph::RailsUtil.rest_graph_storage_key] =
|
128
128
|
RestGraph.new(:access_token => 'blizzard').fbs
|
129
129
|
|
130
130
|
get(:cookies_)
|
data/lib/rest-graph.rb
CHANGED
@@ -13,15 +13,6 @@ begin
|
|
13
13
|
require 'rack'
|
14
14
|
rescue LoadError; end
|
15
15
|
|
16
|
-
# pick a json gem if available
|
17
|
-
%w[ yajl/json_gem json json_pure ].each{ |json|
|
18
|
-
begin
|
19
|
-
require json
|
20
|
-
break
|
21
|
-
rescue LoadError
|
22
|
-
end
|
23
|
-
}
|
24
|
-
|
25
16
|
# the data structure used in RestGraph
|
26
17
|
RestGraphStruct = Struct.new(:auto_decode,
|
27
18
|
:graph_server, :old_server,
|
@@ -32,6 +23,73 @@ RestGraphStruct = Struct.new(:auto_decode,
|
|
32
23
|
:log_handler) unless defined?(RestGraphStruct)
|
33
24
|
|
34
25
|
class RestGraph < RestGraphStruct
|
26
|
+
|
27
|
+
# begin json backend adapter
|
28
|
+
module YajlRuby
|
29
|
+
def self.extended mod
|
30
|
+
mod.const_set(:ParseError, Yajl::ParseError)
|
31
|
+
end
|
32
|
+
def json_encode hash
|
33
|
+
Yajl::Encoder.encode(hash)
|
34
|
+
end
|
35
|
+
def json_decode json
|
36
|
+
Yajl::Parser.parse(json)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
module Json
|
41
|
+
def self.extended mod
|
42
|
+
mod.const_set(:ParseError, JSON::ParserError)
|
43
|
+
end
|
44
|
+
def json_encode hash
|
45
|
+
JSON.dump(hash)
|
46
|
+
end
|
47
|
+
def json_decode json
|
48
|
+
JSON.parse(json)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
module Gsub
|
53
|
+
class ParseError < RuntimeError; end
|
54
|
+
def self.extended mod
|
55
|
+
mod.const_set(:ParseError, Gsub::ParseError)
|
56
|
+
end
|
57
|
+
|
58
|
+
# only works for flat hash
|
59
|
+
def json_encode hash
|
60
|
+
middle = hash.inject([]){ |r, (k, v)|
|
61
|
+
r << "\"#{k}\":\"#{v.gsub('"','\\"')}\""
|
62
|
+
}.join(',')
|
63
|
+
"{#{middle}}"
|
64
|
+
end
|
65
|
+
def json_decode
|
66
|
+
raise NotImplementedError.new(
|
67
|
+
'You need to install either yajl-ruby, json, or json_pure gem')
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.select_json! picked=false
|
72
|
+
if defined?(::Yajl)
|
73
|
+
extend YajlRuby
|
74
|
+
elsif defined?(::JSON)
|
75
|
+
extend Json
|
76
|
+
elsif picked
|
77
|
+
extend Gsub
|
78
|
+
else
|
79
|
+
# pick a json gem if available
|
80
|
+
%w[yajl json].each{ |json|
|
81
|
+
begin
|
82
|
+
require json
|
83
|
+
break
|
84
|
+
rescue LoadError
|
85
|
+
end
|
86
|
+
}
|
87
|
+
select_json!(true)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
select_json!
|
91
|
+
# end json backend adapter
|
92
|
+
|
35
93
|
class Error < RuntimeError; end
|
36
94
|
class Event < Struct.new(:duration, :url); end
|
37
95
|
class Event::Requested < Event; end
|
@@ -69,6 +127,12 @@ class RestGraph < RestGraphStruct
|
|
69
127
|
end
|
70
128
|
extend DefaultAttributes
|
71
129
|
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
# common methods
|
135
|
+
|
72
136
|
def initialize o={}
|
73
137
|
(Attributes + [:access_token]).each{ |name|
|
74
138
|
send("#{name}=", o[name]) if o.key?(name)
|
@@ -87,6 +151,21 @@ class RestGraph < RestGraphStruct
|
|
87
151
|
!!access_token
|
88
152
|
end
|
89
153
|
|
154
|
+
def lighten!
|
155
|
+
[:cache, :error_handler, :log_handler].each{ |obj| send("#{obj}=", nil) }
|
156
|
+
self
|
157
|
+
end
|
158
|
+
|
159
|
+
def lighten
|
160
|
+
dup.lighten!
|
161
|
+
end
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
# graph api related methods
|
168
|
+
|
90
169
|
def url path, query={}, server=graph_server
|
91
170
|
"#{server}#{path}#{build_query_string(query)}"
|
92
171
|
end
|
@@ -107,6 +186,10 @@ class RestGraph < RestGraphStruct
|
|
107
186
|
request(:put , url(path, query, graph_server), opts, payload)
|
108
187
|
end
|
109
188
|
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
110
193
|
# cookies, app_id, secrect related below
|
111
194
|
|
112
195
|
def parse_rack_env! env
|
@@ -126,8 +209,8 @@ class RestGraph < RestGraphStruct
|
|
126
209
|
|
127
210
|
def parse_json! json
|
128
211
|
self.data = json &&
|
129
|
-
check_sig_and_return_data(
|
130
|
-
rescue
|
212
|
+
check_sig_and_return_data(self.class.json_decode(json))
|
213
|
+
rescue ParseError
|
131
214
|
end
|
132
215
|
|
133
216
|
def fbs
|
@@ -141,11 +224,15 @@ class RestGraph < RestGraphStruct
|
|
141
224
|
sig, json = [sig_encoded, json_encoded].map{ |str|
|
142
225
|
"#{str.tr('-_', '+/')}==".unpack('m').first
|
143
226
|
}
|
144
|
-
self.data =
|
227
|
+
self.data = self.class.json_decode(json) if
|
145
228
|
secret && OpenSSL::HMAC.digest('sha256', secret, json_encoded) == sig
|
146
|
-
rescue
|
229
|
+
rescue ParseError
|
147
230
|
end
|
148
231
|
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
149
236
|
# oauth related
|
150
237
|
|
151
238
|
def authorize_url opts={}
|
@@ -160,6 +247,10 @@ class RestGraph < RestGraphStruct
|
|
160
247
|
:suppress_decode => true))
|
161
248
|
end
|
162
249
|
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
163
254
|
# old rest facebook api, i will definitely love to remove them someday
|
164
255
|
|
165
256
|
def old_rest path, query={}, opts={}
|
@@ -180,17 +271,14 @@ class RestGraph < RestGraphStruct
|
|
180
271
|
end
|
181
272
|
|
182
273
|
def fql_multi codes, query={}, opts={}
|
183
|
-
|
184
|
-
|
185
|
-
else
|
186
|
-
middle = codes.inject([]){ |r, (k, v)|
|
187
|
-
r << "\"#{k}\":\"#{v.gsub('"','\\"')}\""
|
188
|
-
}.join(',')
|
189
|
-
"{#{middle}}"
|
190
|
-
end
|
191
|
-
old_rest('fql.multiquery', {:queries => c}.merge(query), opts)
|
274
|
+
old_rest('fql.multiquery',
|
275
|
+
{:queries => self.class.json_encode(codes)}.merge(query), opts)
|
192
276
|
end
|
193
277
|
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
194
282
|
private
|
195
283
|
def request meth, uri, opts={}, payload=nil
|
196
284
|
start_time = Time.now
|
@@ -218,7 +306,7 @@ class RestGraph < RestGraphStruct
|
|
218
306
|
|
219
307
|
def post_request result, suppress_decode=nil
|
220
308
|
if auto_decode && !suppress_decode
|
221
|
-
check_error(
|
309
|
+
check_error(self.class.json_decode(result))
|
222
310
|
else
|
223
311
|
result
|
224
312
|
end
|
@@ -262,9 +350,9 @@ class RestGraph < RestGraphStruct
|
|
262
350
|
def fetch meth, uri, payload
|
263
351
|
RestClient::Request.execute(:method => meth, :url => uri,
|
264
352
|
:headers => build_headers,
|
265
|
-
:payload => payload).
|
353
|
+
:payload => payload).body.
|
266
354
|
tap{ |result|
|
267
|
-
cache[cache_key(uri)] = result if cache
|
355
|
+
cache[cache_key(uri)] = result if cache && meth == :get
|
268
356
|
}
|
269
357
|
end
|
270
358
|
end
|
@@ -8,6 +8,7 @@ class RestGraph
|
|
8
8
|
def default_auto_authorize ; false; end
|
9
9
|
def default_auto_authorize_options; {} ; end
|
10
10
|
def default_auto_authorize_scope ; '' ; end
|
11
|
+
def default_ensure_authorized ; false; end
|
11
12
|
def default_write_session ; false; end
|
12
13
|
def default_write_cookies ; false; end
|
13
14
|
def default_write_handler ; nil; end
|
@@ -30,9 +31,7 @@ module RestGraph::RailsUtil
|
|
30
31
|
end
|
31
32
|
|
32
33
|
def self.included controller
|
33
|
-
controller.rescue_from(::RestGraph::Error)
|
34
|
-
logger.debug("DEBUG: RestGraph: action halt")
|
35
|
-
}
|
34
|
+
controller.rescue_from(::RestGraph::Error, :with => :rest_graph_on_error)
|
36
35
|
controller.helper(::RestGraph::RailsUtil::Helper)
|
37
36
|
end
|
38
37
|
|
@@ -51,7 +50,15 @@ module RestGraph::RailsUtil
|
|
51
50
|
# before, in that case, the fbs would be inside session,
|
52
51
|
# as we just saved it there
|
53
52
|
|
54
|
-
rest_graph_check_rg_fbs
|
53
|
+
rest_graph_check_rg_fbs # check rest-graph storage
|
54
|
+
|
55
|
+
if rest_graph_oget(:ensure_authorized) && !rest_graph.authorized?
|
56
|
+
rest_graph_authorize('ensure authorized')
|
57
|
+
false # action halt, redirect to do authorize,
|
58
|
+
# eagerly, as opposed to auto_authorize
|
59
|
+
else
|
60
|
+
true # keep going
|
61
|
+
end
|
55
62
|
end
|
56
63
|
|
57
64
|
# override this if you need different app_id and secret
|
@@ -59,10 +66,14 @@ module RestGraph::RailsUtil
|
|
59
66
|
@rest_graph ||= RestGraph.new(rest_graph_options_new)
|
60
67
|
end
|
61
68
|
|
62
|
-
def
|
69
|
+
def rest_graph_on_error error=nil
|
70
|
+
rest_graph_authorize(error, false)
|
71
|
+
end
|
72
|
+
|
73
|
+
def rest_graph_authorize error=nil, force_redirect=true
|
63
74
|
logger.warn("WARN: RestGraph: #{error.inspect}")
|
64
75
|
|
65
|
-
if
|
76
|
+
if force_redirect || rest_graph_auto_authorize?
|
66
77
|
@rest_graph_authorize_url = rest_graph.authorize_url(
|
67
78
|
{:redirect_uri => rest_graph_normalized_request_uri,
|
68
79
|
:scope => rest_graph_oget(:auto_authorize_scope)}.
|
@@ -72,8 +83,6 @@ module RestGraph::RailsUtil
|
|
72
83
|
|
73
84
|
rest_graph_authorize_redirect
|
74
85
|
end
|
75
|
-
|
76
|
-
raise ::RestGraph::Error.new(error)
|
77
86
|
end
|
78
87
|
|
79
88
|
# override this if you want the simple redirect_to
|
@@ -125,9 +134,7 @@ module RestGraph::RailsUtil
|
|
125
134
|
end
|
126
135
|
|
127
136
|
def rest_graph_options_new
|
128
|
-
@rest_graph_options_new ||=
|
129
|
-
{:error_handler => method(:rest_graph_authorize),
|
130
|
-
:log_handler => method(:rest_graph_log)}
|
137
|
+
@rest_graph_options_new ||= {:log_handler => method(:rest_graph_log)}
|
131
138
|
end
|
132
139
|
# ==================== end options utility =======================
|
133
140
|
|
@@ -196,29 +203,35 @@ module RestGraph::RailsUtil
|
|
196
203
|
|
197
204
|
|
198
205
|
# ==================== begin check ================================
|
206
|
+
def rest_graph_storage_key
|
207
|
+
"rest_graph_fbs_#{rest_graph_oget(:app_id)}"
|
208
|
+
end
|
209
|
+
|
199
210
|
def rest_graph_check_rg_fbs
|
200
211
|
rest_graph_check_rg_handler # custom method to store fbs
|
201
212
|
rest_graph_check_rg_session # prefered way to store fbs
|
202
213
|
rest_graph_check_rg_cookies # in canvas, session might not work..
|
203
214
|
end
|
204
215
|
|
205
|
-
def rest_graph_check_rg_handler
|
206
|
-
return if rest_graph.authorized? || !
|
207
|
-
rest_graph.parse_fbs!(
|
216
|
+
def rest_graph_check_rg_handler handler=rest_graph_oget(:check_handler)
|
217
|
+
return if rest_graph.authorized? || !handler
|
218
|
+
rest_graph.parse_fbs!(handler.call)
|
208
219
|
logger.debug("DEBUG: RestGraph: called check_handler, parsed:" \
|
209
220
|
" #{rest_graph.data.inspect}")
|
210
221
|
end
|
211
222
|
|
212
223
|
def rest_graph_check_rg_session
|
213
|
-
return if rest_graph.authorized? ||
|
214
|
-
|
224
|
+
return if rest_graph.authorized? ||
|
225
|
+
!(fbs = session[rest_graph_storage_key])
|
226
|
+
rest_graph.parse_fbs!(fbs)
|
215
227
|
logger.debug("DEBUG: RestGraph: detected rest-graph session, parsed:" \
|
216
228
|
" #{rest_graph.data.inspect}")
|
217
229
|
end
|
218
230
|
|
219
231
|
def rest_graph_check_rg_cookies
|
220
|
-
return if rest_graph.authorized? ||
|
221
|
-
|
232
|
+
return if rest_graph.authorized? ||
|
233
|
+
!(fbs = cookies[rest_graph_storage_key])
|
234
|
+
rest_graph.parse_fbs!(fbs)
|
222
235
|
logger.debug("DEBUG: RestGraph: detected rest-graph cookies, parsed:" \
|
223
236
|
" #{rest_graph.data.inspect}")
|
224
237
|
end
|
@@ -230,24 +243,21 @@ module RestGraph::RailsUtil
|
|
230
243
|
rest_graph_write_rg_cookies
|
231
244
|
end
|
232
245
|
|
233
|
-
def rest_graph_write_rg_handler
|
234
|
-
return if !
|
235
|
-
fbs = rest_graph.fbs
|
236
|
-
rest_graph_oget(:write_handler).call(fbs)
|
246
|
+
def rest_graph_write_rg_handler handler=rest_graph_oget(:write_handler)
|
247
|
+
return if !handler
|
248
|
+
handler.call(fbs = rest_graph.fbs)
|
237
249
|
logger.debug("DEBUG: RestGraph: called write_handler: fbs => #{fbs}")
|
238
250
|
end
|
239
251
|
|
240
252
|
def rest_graph_write_rg_session
|
241
253
|
return if !rest_graph_oget(:write_session)
|
242
|
-
fbs = rest_graph.fbs
|
243
|
-
session[:rest_graph_session] = fbs
|
254
|
+
session[rest_graph_storage_key] = fbs = rest_graph.fbs
|
244
255
|
logger.debug("DEBUG: RestGraph: wrote session: fbs => #{fbs}")
|
245
256
|
end
|
246
257
|
|
247
258
|
def rest_graph_write_rg_cookies
|
248
259
|
return if !rest_graph_oget(:write_cookies)
|
249
|
-
fbs = rest_graph.fbs
|
250
|
-
cookies[:rest_graph_cookies] = fbs
|
260
|
+
cookies[rest_graph_storage_key] = fbs = rest_graph.fbs
|
251
261
|
logger.debug("DEBUG: RestGraph: wrote cookies: fbs => #{fbs}")
|
252
262
|
end
|
253
263
|
# ==================== end write ================================
|
data/lib/rest-graph/version.rb
CHANGED
data/rest-graph.gemspec
CHANGED
@@ -2,50 +2,56 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{rest-graph}
|
5
|
-
s.version = "1.4.
|
5
|
+
s.version = "1.4.6"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Cardinal Blue", "Lin Jen-Shin (aka godfat 真常)"]
|
9
|
-
s.date = %q{2010-
|
10
|
-
s.description = %q{
|
9
|
+
s.date = %q{2010-09-01}
|
10
|
+
s.description = %q{A super simple Facebook Open Graph API client}
|
11
11
|
s.email = %q{dev (XD) cardinalblue.com}
|
12
|
-
s.extra_rdoc_files = ["CHANGES", "Gemfile", "Gemfile.lock", "LICENSE", "README", "TODO", "
|
13
|
-
s.files = ["CHANGES", "Gemfile", "Gemfile.lock", "LICENSE", "README", "README.rdoc", "Rakefile", "TODO", "example/rails/README", "example/rails/Rakefile", "example/rails/app/controllers/application_controller.rb", "example/rails/config/boot.rb", "example/rails/config/environment.rb", "example/rails/config/environments/development.rb", "example/rails/config/environments/production.rb", "example/rails/config/environments/test.rb", "example/rails/config/initializers/cookie_verification_secret.rb", "example/rails/config/initializers/new_rails_defaults.rb", "example/rails/config/initializers/session_store.rb", "example/rails/config/rest-graph.yaml", "example/rails/config/routes.rb", "example/rails/log", "example/rails/script/console", "example/rails/script/server", "example/rails/test/functional/application_controller_test.rb", "example/rails/test/test_helper.rb", "
|
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/rails/README", "example/rails/Rakefile", "example/rails/app/controllers/application_controller.rb", "example/rails/config/boot.rb", "example/rails/config/environment.rb", "example/rails/config/environments/development.rb", "example/rails/config/environments/production.rb", "example/rails/config/environments/test.rb", "example/rails/config/initializers/cookie_verification_secret.rb", "example/rails/config/initializers/new_rails_defaults.rb", "example/rails/config/initializers/session_store.rb", "example/rails/config/rest-graph.yaml", "example/rails/config/routes.rb", "example/rails/log", "example/rails/script/console", "example/rails/script/server", "example/rails/test/functional/application_controller_test.rb", "example/rails/test/test_helper.rb", "example/rails/test/unit/rails_util_test.rb", "init.rb", "lib/rest-graph.rb", "lib/rest-graph/auto_load.rb", "lib/rest-graph/load_config.rb", "lib/rest-graph/rails_util.rb", "lib/rest-graph/version.rb", "rest-graph.gemspec", "test/common.rb", "test/config/rest-graph.yaml", "test/test_access_token.rb", "test/test_api.rb", "test/test_cache.rb", "test/test_default.rb", "test/test_handler.rb", "test/test_load_config.rb", "test/test_misc.rb", "test/test_oauth.rb", "test/test_old.rb", "test/test_parse.rb", "test/test_serialize.rb"]
|
14
14
|
s.homepage = %q{http://github.com/cardinalblue/rest-graph}
|
15
15
|
s.rdoc_options = ["--main", "README.rdoc"]
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
s.rubyforge_project = %q{rest-graph}
|
18
18
|
s.rubygems_version = %q{1.3.7}
|
19
19
|
s.summary = %q{A super simple Facebook Open Graph API client}
|
20
|
-
s.test_files = ["test/test_default.rb", "test/test_handler.rb", "test/test_load_config.rb", "test/test_oauth.rb", "test/test_old.rb", "test/test_parse.rb", "test/
|
20
|
+
s.test_files = ["test/test_access_token.rb", "test/test_api.rb", "test/test_cache.rb", "test/test_default.rb", "test/test_handler.rb", "test/test_load_config.rb", "test/test_misc.rb", "test/test_oauth.rb", "test/test_old.rb", "test/test_parse.rb", "test/test_serialize.rb"]
|
21
21
|
|
22
22
|
if s.respond_to? :specification_version then
|
23
23
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
24
24
|
s.specification_version = 3
|
25
25
|
|
26
26
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
27
|
-
s.add_runtime_dependency(%q<rest-client>, [">= 1.6.
|
28
|
-
s.add_development_dependency(%q<
|
27
|
+
s.add_runtime_dependency(%q<rest-client>, [">= 1.6.1"])
|
28
|
+
s.add_development_dependency(%q<yajl-ruby>, [">= 0.7.7"])
|
29
|
+
s.add_development_dependency(%q<json>, [">= 1.4.6"])
|
30
|
+
s.add_development_dependency(%q<json_pure>, [">= 1.4.6"])
|
29
31
|
s.add_development_dependency(%q<rack>, [">= 1.2.1"])
|
30
|
-
s.add_development_dependency(%q<rr>, [">= 0.
|
31
|
-
s.add_development_dependency(%q<webmock>, [">= 1.3.
|
32
|
+
s.add_development_dependency(%q<rr>, [">= 1.0.0"])
|
33
|
+
s.add_development_dependency(%q<webmock>, [">= 1.3.4"])
|
32
34
|
s.add_development_dependency(%q<bacon>, [">= 1.1.0"])
|
33
35
|
s.add_development_dependency(%q<bones>, [">= 3.4.7"])
|
34
36
|
else
|
35
|
-
s.add_dependency(%q<rest-client>, [">= 1.6.
|
36
|
-
s.add_dependency(%q<
|
37
|
+
s.add_dependency(%q<rest-client>, [">= 1.6.1"])
|
38
|
+
s.add_dependency(%q<yajl-ruby>, [">= 0.7.7"])
|
39
|
+
s.add_dependency(%q<json>, [">= 1.4.6"])
|
40
|
+
s.add_dependency(%q<json_pure>, [">= 1.4.6"])
|
37
41
|
s.add_dependency(%q<rack>, [">= 1.2.1"])
|
38
|
-
s.add_dependency(%q<rr>, [">= 0.
|
39
|
-
s.add_dependency(%q<webmock>, [">= 1.3.
|
42
|
+
s.add_dependency(%q<rr>, [">= 1.0.0"])
|
43
|
+
s.add_dependency(%q<webmock>, [">= 1.3.4"])
|
40
44
|
s.add_dependency(%q<bacon>, [">= 1.1.0"])
|
41
45
|
s.add_dependency(%q<bones>, [">= 3.4.7"])
|
42
46
|
end
|
43
47
|
else
|
44
|
-
s.add_dependency(%q<rest-client>, [">= 1.6.
|
45
|
-
s.add_dependency(%q<
|
48
|
+
s.add_dependency(%q<rest-client>, [">= 1.6.1"])
|
49
|
+
s.add_dependency(%q<yajl-ruby>, [">= 0.7.7"])
|
50
|
+
s.add_dependency(%q<json>, [">= 1.4.6"])
|
51
|
+
s.add_dependency(%q<json_pure>, [">= 1.4.6"])
|
46
52
|
s.add_dependency(%q<rack>, [">= 1.2.1"])
|
47
|
-
s.add_dependency(%q<rr>, [">= 0.
|
48
|
-
s.add_dependency(%q<webmock>, [">= 1.3.
|
53
|
+
s.add_dependency(%q<rr>, [">= 1.0.0"])
|
54
|
+
s.add_dependency(%q<webmock>, [">= 1.3.4"])
|
49
55
|
s.add_dependency(%q<bacon>, [">= 1.1.0"])
|
50
56
|
s.add_dependency(%q<bones>, [">= 3.4.7"])
|
51
57
|
end
|