cherrypicker 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/cherrypicker/download.rb +1 -1
- data/lib/cherrypicker/functions.rb +2 -1
- data/lib/cherrypicker/version.rb +1 -1
- metadata +1 -1
@@ -22,7 +22,7 @@ private
|
|
22
22
|
def download_file
|
23
23
|
http = Net::HTTP.new("#{self.hostname}")
|
24
24
|
http.request_get("#{self.url}") do |response|
|
25
|
-
bar = ProgressBar.new("#{self.
|
25
|
+
bar = ProgressBar.new("#{self.filename}", self.size.to_i)
|
26
26
|
File.open("#{self.filename}", "wb") do |file|
|
27
27
|
response.read_body do |segment|
|
28
28
|
self.progress += segment.length
|
@@ -48,5 +48,6 @@ def random_agent
|
|
48
48
|
"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16",
|
49
49
|
"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27",
|
50
50
|
"Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16",
|
51
|
-
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
|
51
|
+
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)",
|
52
|
+
"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.14) Gecko/20110218 Firefox/3.6.14"].sample
|
52
53
|
end
|
data/lib/cherrypicker/version.rb
CHANGED