rest-graph 1.4.6 → 1.5.0
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 +67 -0
- data/CONTRIBUTORS +1 -0
- data/Gemfile +9 -1
- data/Gemfile.lock +13 -3
- data/README +10 -3
- data/README.rdoc +10 -3
- data/Rakefile +5 -2
- data/example/{rails → rails2}/README +0 -0
- data/example/{rails → rails2}/Rakefile +0 -0
- data/example/{rails → rails2}/app/controllers/application_controller.rb +4 -0
- data/example/{rails → rails2}/config/boot.rb +6 -2
- data/example/{rails → rails2}/config/environment.rb +2 -2
- data/example/{rails → rails2}/config/environments/development.rb +0 -0
- data/example/{rails → rails2}/config/environments/production.rb +0 -0
- data/example/{rails → rails2}/config/environments/test.rb +0 -0
- data/example/{rails → rails2}/config/initializers/cookie_verification_secret.rb +0 -0
- data/example/{rails → rails2}/config/initializers/new_rails_defaults.rb +0 -0
- data/example/{rails → rails2}/config/initializers/session_store.rb +1 -1
- data/example/{rails → rails2}/config/rest-graph.yaml +0 -0
- data/example/{rails → rails2}/config/routes.rb +0 -0
- data/example/{rails → rails2}/log +0 -0
- data/example/{rails → rails2}/script/console +0 -0
- data/example/{rails → rails2}/script/server +0 -0
- data/example/{rails → rails2}/test/functional/application_controller_test.rb +10 -1
- data/example/{rails → rails2}/test/test_helper.rb +0 -0
- data/example/{rails → rails2}/test/unit/rails_util_test.rb +0 -0
- data/lib/rest-graph.rb +150 -49
- data/lib/rest-graph/rails_util.rb +31 -27
- data/lib/rest-graph/version.rb +1 -1
- data/rest-graph.gemspec +16 -13
- data/test/test_api.rb +1 -1
- data/test/test_error.rb +51 -0
- data/test/test_handler.rb +4 -2
- data/test/test_misc.rb +29 -0
- data/test/test_old.rb +33 -0
- data/test/test_page.rb +54 -0
- data/test/test_parse.rb +7 -0
- data/test/test_rest-graph.rb +10 -0
- metadata +69 -50
- data/test/test_access_token.rb +0 -26
data/test/test_access_token.rb
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
|
2
|
-
if respond_to?(:require_relative, true)
|
3
|
-
require_relative 'common'
|
4
|
-
else
|
5
|
-
require File.dirname(__FILE__) + '/common'
|
6
|
-
end
|
7
|
-
|
8
|
-
describe RestGraph do
|
9
|
-
after do
|
10
|
-
reset_webmock
|
11
|
-
RR.verify
|
12
|
-
end
|
13
|
-
|
14
|
-
it 'would return true in authorized? if there is an access_token' do
|
15
|
-
RestGraph.new(:access_token => '1').authorized?.should == true
|
16
|
-
RestGraph.new(:access_token => nil).authorized?.should == false
|
17
|
-
end
|
18
|
-
|
19
|
-
it 'would treat oauth_token as access_token as well' do
|
20
|
-
rg = RestGraph.new
|
21
|
-
hate_facebook = 'why the hell two different name?'
|
22
|
-
rg.data['oauth_token'] = hate_facebook
|
23
|
-
rg.authorized?.should == true
|
24
|
-
rg.access_token == hate_facebook
|
25
|
-
end
|
26
|
-
end
|