rest-graph 1.4.6 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/CHANGES +67 -0
  2. data/CONTRIBUTORS +1 -0
  3. data/Gemfile +9 -1
  4. data/Gemfile.lock +13 -3
  5. data/README +10 -3
  6. data/README.rdoc +10 -3
  7. data/Rakefile +5 -2
  8. data/example/{rails → rails2}/README +0 -0
  9. data/example/{rails → rails2}/Rakefile +0 -0
  10. data/example/{rails → rails2}/app/controllers/application_controller.rb +4 -0
  11. data/example/{rails → rails2}/config/boot.rb +6 -2
  12. data/example/{rails → rails2}/config/environment.rb +2 -2
  13. data/example/{rails → rails2}/config/environments/development.rb +0 -0
  14. data/example/{rails → rails2}/config/environments/production.rb +0 -0
  15. data/example/{rails → rails2}/config/environments/test.rb +0 -0
  16. data/example/{rails → rails2}/config/initializers/cookie_verification_secret.rb +0 -0
  17. data/example/{rails → rails2}/config/initializers/new_rails_defaults.rb +0 -0
  18. data/example/{rails → rails2}/config/initializers/session_store.rb +1 -1
  19. data/example/{rails → rails2}/config/rest-graph.yaml +0 -0
  20. data/example/{rails → rails2}/config/routes.rb +0 -0
  21. data/example/{rails → rails2}/log +0 -0
  22. data/example/{rails → rails2}/script/console +0 -0
  23. data/example/{rails → rails2}/script/server +0 -0
  24. data/example/{rails → rails2}/test/functional/application_controller_test.rb +10 -1
  25. data/example/{rails → rails2}/test/test_helper.rb +0 -0
  26. data/example/{rails → rails2}/test/unit/rails_util_test.rb +0 -0
  27. data/lib/rest-graph.rb +150 -49
  28. data/lib/rest-graph/rails_util.rb +31 -27
  29. data/lib/rest-graph/version.rb +1 -1
  30. data/rest-graph.gemspec +16 -13
  31. data/test/test_api.rb +1 -1
  32. data/test/test_error.rb +51 -0
  33. data/test/test_handler.rb +4 -2
  34. data/test/test_misc.rb +29 -0
  35. data/test/test_old.rb +33 -0
  36. data/test/test_page.rb +54 -0
  37. data/test/test_parse.rb +7 -0
  38. data/test/test_rest-graph.rb +10 -0
  39. metadata +69 -50
  40. data/test/test_access_token.rb +0 -26
@@ -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