linsc 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/linsc/proxy_handler.rb +5 -2
- data/linsc.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36cb51372ecf761a8b4c343883bf0b1c303b78e4
|
4
|
+
data.tar.gz: 6dcf4ac1ab73d18fc43719946df30b9347a4c8be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdb63443a049ae46f85851e87d8826b48e5848707f3b73ac4dc798462938fa84cae31b9f09ff0d4d05c1676877e427af34a69d617a128f67f85f0ea3b2557b13
|
7
|
+
data.tar.gz: 572e0340b316b30d5713ce77b1d5f5602a7c2f8be8259e6c41a99583167aaaeab4aba420996b2aa6286b556241b627bbfc8dc0f5033530d0d8d44c407c244643
|
data/lib/linsc/proxy_handler.rb
CHANGED
@@ -4,10 +4,13 @@ class ProxyHandler
|
|
4
4
|
|
5
5
|
def initialize(cooldown_time = 5)
|
6
6
|
@cooldown_time = cooldown_time
|
7
|
-
|
7
|
+
proxy_file = Pathname.new(File.dirname __dir__).realdirpath + '../data/proxies.txt'
|
8
|
+
agents_file = Pathname.new(File.dirname __dir__).realdirpath + '../data/agents.txt'
|
9
|
+
|
10
|
+
@proxy_list = File.read(proxy_file.to_s).split("\n")
|
8
11
|
.collect{|proxy| proxy.split(':')}
|
9
12
|
@proxies = []
|
10
|
-
@ua_list = File.read(
|
13
|
+
@ua_list = File.read(agents_file.to_s).split("\n")
|
11
14
|
|
12
15
|
@proxy_list.each do |proxy_details|
|
13
16
|
proxy = Proxy.new(ip: proxy_details[0], port: proxy_details[1],
|
data/linsc.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "linsc"
|
7
|
-
spec.version = "0.0.
|
7
|
+
spec.version = "0.0.10"
|
8
8
|
spec.authors = ["Dan Molloy"]
|
9
9
|
spec.email = ["danieljmolloy1@gmail.com"]
|
10
10
|
spec.date = '2016-03-31'
|