fbrails 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/lib/fbrails/graph.rb CHANGED
@@ -35,26 +35,9 @@ module Fbrails
35
35
 
36
36
  def call (method)
37
37
  url = method.to_s.split("_").join("/")
38
- get(URL+url+access_token)
38
+ Fbrails.get(URL+url+access_token)
39
39
  end
40
40
 
41
- def get (url,raw = false)
42
- uri = URI.parse(url)
43
- http = Net::HTTP.new(uri.host,uri.port)
44
- http.use_ssl = true
45
- http.verify_mode = OpenSSL::SSL::VERIFY_NONE
46
- request = Net::HTTP::Get.new(uri.request_uri)
47
- resp = http.request(request)
48
- if raw
49
- return resp.body
50
- end
51
- result = JSON.parse(resp.body)
52
- if result.has_key?("error")
53
- raise FailedToGet, "Failed to get, probably token expired"
54
- else
55
- return result
56
- end
57
- end
58
41
 
59
42
  end
60
43
  end
@@ -1,3 +1,3 @@
1
1
  module Fbrails
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fbrails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -15,7 +15,7 @@ date: 2011-10-24 00:00:00.000000000Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: httpclient
18
- requirement: &11196000 !ruby/object:Gem::Requirement
18
+ requirement: &11991780 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ~>
@@ -23,7 +23,7 @@ dependencies:
23
23
  version: 2.2.2
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *11196000
26
+ version_requirements: *11991780
27
27
  description: Small gem for auth & getting info from facebook
28
28
  email:
29
29
  - donotsendhere@gmail.com