facebook_oauth 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -42,17 +42,18 @@ module FacebookOAuth
42
42
 
43
43
  def _get(url)
44
44
  oauth_response = access_token.get(url)
45
- JSON.parse(oauth_response)
45
+ JSON.parse(oauth_response) rescue oauth_response
46
46
  end
47
47
 
48
48
  def _post(url, params={}, headers={})
49
49
  oauth_response = access_token.post(url, params, headers)
50
- JSON.parse(oauth_response)
50
+ puts oauth_response.inspect
51
+ JSON.parse(oauth_response) rescue oauth_response
51
52
  end
52
53
 
53
54
  def _delete(url)
54
55
  oauth_response = access_token.delete(url)
55
- JSON.parse(oauth_response)
56
+ JSON.parse(oauth_response) rescue oauth_response
56
57
  end
57
58
  end
58
59
  end
@@ -62,8 +62,11 @@ module FacebookOAuth
62
62
  end
63
63
 
64
64
  def method_missing(method, *args)
65
- if args.first and args.first == :create
66
- @client.send(:_post, "/#{@oid}/#{method.to_s}", args.last)
65
+ first = args.shift
66
+ params = args.first || {}
67
+
68
+ if first and first == :create
69
+ @client.send(:_post, "/#{@oid}/#{method.to_s}", params)
67
70
  else
68
71
  @client.send(:_get, "/#{@oid}/#{method.to_s}")
69
72
  end
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facebook_oauth
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 2
9
- - 1
10
- version: 0.2.1
4
+ prerelease:
5
+ version: 0.2.2
11
6
  platform: ruby
12
7
  authors:
13
8
  - Richard Taylor
@@ -26,11 +21,6 @@ dependencies:
26
21
  requirements:
27
22
  - - ">="
28
23
  - !ruby/object:Gem::Version
29
- hash: 15
30
- segments:
31
- - 0
32
- - 0
33
- - 8
34
24
  version: 0.0.8
35
25
  type: :runtime
36
26
  version_requirements: *id001
@@ -42,11 +32,6 @@ dependencies:
42
32
  requirements:
43
33
  - - ">="
44
34
  - !ruby/object:Gem::Version
45
- hash: 1
46
- segments:
47
- - 1
48
- - 1
49
- - 9
50
35
  version: 1.1.9
51
36
  type: :runtime
52
37
  version_requirements: *id002
@@ -58,10 +43,6 @@ dependencies:
58
43
  requirements:
59
44
  - - ">="
60
45
  - !ruby/object:Gem::Version
61
- hash: 47
62
- segments:
63
- - 1
64
- - 16
65
46
  version: "1.16"
66
47
  type: :runtime
67
48
  version_requirements: *id003
@@ -73,9 +54,6 @@ dependencies:
73
54
  requirements:
74
55
  - - ">="
75
56
  - !ruby/object:Gem::Version
76
- hash: 3
77
- segments:
78
- - 0
79
57
  version: "0"
80
58
  type: :development
81
59
  version_requirements: *id004
@@ -87,9 +65,6 @@ dependencies:
87
65
  requirements:
88
66
  - - ">="
89
67
  - !ruby/object:Gem::Version
90
- hash: 3
91
- segments:
92
- - 0
93
68
  version: "0"
94
69
  type: :development
95
70
  version_requirements: *id005
@@ -122,23 +97,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
122
97
  requirements:
123
98
  - - ">="
124
99
  - !ruby/object:Gem::Version
125
- hash: 3
126
- segments:
127
- - 0
128
100
  version: "0"
129
101
  required_rubygems_version: !ruby/object:Gem::Requirement
130
102
  none: false
131
103
  requirements:
132
104
  - - ">="
133
105
  - !ruby/object:Gem::Version
134
- hash: 3
135
- segments:
136
- - 0
137
106
  version: "0"
138
107
  requirements: []
139
108
 
140
109
  rubyforge_project: facebook_oauth
141
- rubygems_version: 1.3.7
110
+ rubygems_version: 1.5.0
142
111
  signing_key:
143
112
  specification_version: 2
144
113
  summary: facebook_oauth is a Ruby client library for the Facebook OAuth Graph API