selenium 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +4 -1
- data/VERSION +1 -1
- data/lib/selenium/jvm_options_probe.rb +6 -1
- data/lib/selenium/selenium.rb +31 -16
- data/selenium.gemspec +2 -2
- metadata +4 -4
data/CHANGES
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/lib/selenium/selenium.rb
CHANGED
@@ -1,23 +1,38 @@
|
|
1
|
+
require 'open-uri'
|
2
|
+
|
1
3
|
class Selenium
|
2
4
|
def download_file_to(uri, destination_file)
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
print " downloading #{uri}... "; $stdout.flush
|
6
|
+
|
7
|
+
temp = destination_file + ".part"
|
8
|
+
FileUtils.mkdir_p(File.dirname(destination_file))
|
9
|
+
|
10
|
+
File.open(temp, "wb") do |out_file|
|
11
|
+
open(uri) do |in_file|
|
12
|
+
done = false
|
13
|
+
|
14
|
+
while(!done) do
|
15
|
+
buffer = in_file.read(1024*1000)
|
16
|
+
out_file.write(buffer)
|
17
|
+
|
18
|
+
if buffer.nil? || buffer.size == 0
|
19
|
+
done = true
|
20
|
+
else
|
21
|
+
print("#"); $stdout.flush
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
11
26
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
27
|
+
if File.open(temp).read(200) =~ /Access Denied/
|
28
|
+
puts "\n\n*** Error downloading #{uri}, got Access Denied from S3."
|
29
|
+
FileUtils.rm_rf(temp)
|
30
|
+
exit
|
31
|
+
end
|
17
32
|
|
18
|
-
FileUtils.cp(
|
19
|
-
FileUtils.rm_rf(
|
20
|
-
puts "
|
33
|
+
FileUtils.cp(temp, destination_file)
|
34
|
+
FileUtils.rm_rf(temp)
|
35
|
+
puts "\ndone!"
|
21
36
|
end
|
22
37
|
|
23
38
|
# unzip a .zip file into the directory it is located
|
data/selenium.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{selenium}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Alexander Shvets"]
|
12
|
-
s.date = %q{2010-11-
|
12
|
+
s.date = %q{2010-11-15}
|
13
13
|
s.default_executable = %q{selenium}
|
14
14
|
s.description = %q{Gem wrapper for selenium server.}
|
15
15
|
s.email = %q{alexander.shvets@gmail.com}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: selenium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alexander Shvets
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-15 00:00:00 -05:00
|
19
19
|
default_executable: selenium
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|