social-avatar-proxy 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
data/README.md
CHANGED
@@ -41,8 +41,14 @@ module SocialAvatarProxy
|
|
41
41
|
|
42
42
|
def perform_request
|
43
43
|
http = Net::HTTP.new(uri.host, uri.port)
|
44
|
-
|
44
|
+
# enable SSL without verification if on HTTPS
|
45
|
+
if uri.scheme == "https"
|
46
|
+
http.use_ssl = true
|
47
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
48
|
+
end
|
49
|
+
# create the request
|
45
50
|
request = Net::HTTP::Get.new(uri.request_uri)
|
51
|
+
# run the request
|
46
52
|
http.request(request)
|
47
53
|
end
|
48
54
|
end
|
@@ -10,8 +10,8 @@ describe SocialAvatarProxy::FacebookAvatar do
|
|
10
10
|
|
11
11
|
describe "#remote_url" do
|
12
12
|
it "should return a valid URL" do
|
13
|
-
|
14
|
-
expect(
|
13
|
+
result = URI(subject.remote_url)
|
14
|
+
expect(result.host).to eq("graph.facebook.com")
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -21,8 +21,8 @@ describe SocialAvatarProxy::FacebookAvatar do
|
|
21
21
|
|
22
22
|
describe "#remote_url" do
|
23
23
|
it "should return a valid URL" do
|
24
|
-
|
25
|
-
expect(
|
24
|
+
result = URI(subject.remote_url)
|
25
|
+
expect(result.host).to eq("graph.facebook.com")
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -10,8 +10,8 @@ describe SocialAvatarProxy::TwitterAvatar do
|
|
10
10
|
|
11
11
|
describe "#remote_url" do
|
12
12
|
it "should return a valid URL" do
|
13
|
-
|
14
|
-
expect(
|
13
|
+
result = URI(subject.remote_url)
|
14
|
+
expect(result.host).to eq("api.twitter.com")
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -21,8 +21,8 @@ describe SocialAvatarProxy::TwitterAvatar do
|
|
21
21
|
|
22
22
|
describe "#remote_url" do
|
23
23
|
it "should return a valid URL" do
|
24
|
-
|
25
|
-
expect(
|
24
|
+
result = URI(subject.remote_url)
|
25
|
+
expect(result.host).to eq("api.twitter.com")
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: social-avatar-proxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -136,7 +136,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: '0'
|
137
137
|
segments:
|
138
138
|
- 0
|
139
|
-
hash:
|
139
|
+
hash: 308556052636751640
|
140
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
141
|
none: false
|
142
142
|
requirements:
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
segments:
|
147
147
|
- 0
|
148
|
-
hash:
|
148
|
+
hash: 308556052636751640
|
149
149
|
requirements: []
|
150
150
|
rubyforge_project:
|
151
151
|
rubygems_version: 1.8.24
|