fbrails 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/fbrails.gemspec +1 -1
- data/fbrails.gemspec~ +2 -2
- data/lib/fbrails/version.rb +1 -1
- data/lib/fbrails.rb +9 -7
- data/lib/fbrails.rb~ +12 -11
- metadata +13 -2
data/fbrails.gemspec
CHANGED
@@ -22,6 +22,6 @@ Gem::Specification.new do |s|
|
|
22
22
|
# specify any dependencies here; for example:
|
23
23
|
# s.add_development_dependency "rspec"
|
24
24
|
# s.add_runtime_dependency "rest-client"
|
25
|
-
|
25
|
+
s.add_dependency "httpclient", '~> 2.2.2'
|
26
26
|
#s.add_development_dependency "httpclient"
|
27
27
|
end
|
data/fbrails.gemspec~
CHANGED
@@ -22,6 +22,6 @@ Gem::Specification.new do |s|
|
|
22
22
|
# specify any dependencies here; for example:
|
23
23
|
# s.add_development_dependency "rspec"
|
24
24
|
# s.add_runtime_dependency "rest-client"
|
25
|
-
|
26
|
-
s.add_development_dependency "httpclient"
|
25
|
+
s.add_dependency "httpclient", '~2.2.2'
|
26
|
+
#s.add_development_dependency "httpclient"
|
27
27
|
end
|
data/lib/fbrails/version.rb
CHANGED
data/lib/fbrails.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
require 'rubygems'
|
1
2
|
require "fbrails/version"
|
2
3
|
require 'net/https'
|
3
4
|
require 'json'
|
5
|
+
require 'httpclient'
|
4
6
|
|
5
7
|
|
6
8
|
module Fbrails
|
@@ -8,13 +10,13 @@ module Fbrails
|
|
8
10
|
class FailedToGet < StandardError
|
9
11
|
end
|
10
12
|
def self.get (url,raw = false)
|
11
|
-
uri = URI.parse(url)
|
12
|
-
http = Net::HTTP.new(uri.host,uri.port)
|
13
|
-
http.use_ssl = true if url =~ /^https/
|
14
|
-
http.verify_mode = OpenSSL::SSL::VERIFY_NONE if url =~ /^https/
|
15
|
-
request = Net::HTTP::Get.new(uri.request_uri)
|
16
|
-
resp = http.request(request).body
|
17
|
-
|
13
|
+
# uri = URI.parse(url)
|
14
|
+
# http = Net::HTTP.new(uri.host,uri.port)
|
15
|
+
# http.use_ssl = true if url =~ /^https/
|
16
|
+
# http.verify_mode = OpenSSL::SSL::VERIFY_NONE if url =~ /^https/
|
17
|
+
# request = Net::HTTP::Get.new(uri.request_uri)
|
18
|
+
# resp = http.request(request).body
|
19
|
+
resp = ::HTTPClient.new.get_content(url)
|
18
20
|
if raw
|
19
21
|
return resp
|
20
22
|
end
|
data/lib/fbrails.rb~
CHANGED
@@ -1,21 +1,22 @@
|
|
1
|
+
require 'rubygems'
|
1
2
|
require "fbrails/version"
|
2
|
-
require 'net/https'
|
3
|
-
require 'json'
|
3
|
+
#require 'net/https'
|
4
|
+
#require 'json'
|
5
|
+
#require 'httpclient'
|
4
6
|
|
5
7
|
|
6
8
|
module Fbrails
|
7
9
|
|
8
10
|
class FailedToGet < StandardError
|
9
11
|
end
|
10
|
-
class Parse
|
11
12
|
def self.get (url,raw = false)
|
12
|
-
uri = URI.parse(url)
|
13
|
-
http = Net::HTTP.new(uri.host,uri.port)
|
14
|
-
http.use_ssl = true if url =~ /^https/
|
15
|
-
http.verify_mode = OpenSSL::SSL::VERIFY_NONE if url =~ /^https/
|
16
|
-
request = Net::HTTP::Get.new(uri.request_uri)
|
17
|
-
resp = http.request(request).body
|
18
|
-
|
13
|
+
# uri = URI.parse(url)
|
14
|
+
# http = Net::HTTP.new(uri.host,uri.port)
|
15
|
+
# http.use_ssl = true if url =~ /^https/
|
16
|
+
# http.verify_mode = OpenSSL::SSL::VERIFY_NONE if url =~ /^https/
|
17
|
+
# request = Net::HTTP::Get.new(uri.request_uri)
|
18
|
+
# resp = http.request(request).body
|
19
|
+
resp = ::HTTPClient.new.get_content(url)
|
19
20
|
if raw
|
20
21
|
return resp
|
21
22
|
end
|
@@ -33,7 +34,7 @@ end
|
|
33
34
|
|
34
35
|
|
35
36
|
|
36
|
-
|
37
|
+
|
37
38
|
|
38
39
|
|
39
40
|
|
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.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,18 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
date: 2011-10-24 00:00:00.000000000Z
|
15
|
-
dependencies:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: httpclient
|
18
|
+
requirement: &11196000 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ~>
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 2.2.2
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: *11196000
|
16
27
|
description: Small gem for auth & getting info from facebook
|
17
28
|
email:
|
18
29
|
- donotsendhere@gmail.com
|