FreedomCoder-esearchy 0.0.18 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/esearchy/linkedin.rb +1 -1
- data/lib/esearchy/pgp.rb +7 -2
- metadata +1 -1
data/lib/esearchy/linkedin.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
%w{rubygems cgi net/http net/https}.each { |lib| require lib }
|
2
2
|
local_path = "#{File.dirname(__FILE__)}/"
|
3
|
-
%w{yahoo google useragent}.each {|lib| require local_path + lib}
|
3
|
+
%w{searchy yahoo google useragent}.each {|lib| require local_path + lib}
|
4
4
|
|
5
5
|
class LinkedIn
|
6
6
|
include Searchy
|
data/lib/esearchy/pgp.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
%w{cgi net/http}.each { |lib| require lib }
|
2
|
+
local_path = "#{File.dirname(__FILE__)}/"
|
3
|
+
%w{searchy useragent}.each {|lib| require local_path + lib}
|
4
|
+
|
1
5
|
class PGP
|
2
6
|
include Searchy
|
3
7
|
|
@@ -12,7 +16,8 @@ class PGP
|
|
12
16
|
http = Net::HTTP.new("pgp.mit.edu",11371)
|
13
17
|
begin
|
14
18
|
http.start do |http|
|
15
|
-
request = Net::HTTP::Get.new( "/pks/lookup?search=#{@query}"
|
19
|
+
request = Net::HTTP::Get.new( "/pks/lookup?search=#{@query}",
|
20
|
+
{'Cookie' => UserAgent::fetch})
|
16
21
|
response = http.request(request)
|
17
22
|
case response
|
18
23
|
when Net::HTTPSuccess, Net::HTTPRedirection
|
@@ -28,7 +33,7 @@ class PGP
|
|
28
33
|
end
|
29
34
|
|
30
35
|
def emails
|
31
|
-
|
36
|
+
@totalhits == 0 ? emails : emails[0..@totalhits]
|
32
37
|
end
|
33
38
|
|
34
39
|
def emails=(value)
|