webrat 0.7.2.beta.1 → 0.7.2.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/webrat.rb +1 -1
- data/lib/webrat/selenium/application_servers/rack.rb +17 -2
- data/webrat.gemspec +2 -2
- metadata +4 -4
data/lib/webrat.rb
CHANGED
@@ -7,12 +7,16 @@ module Webrat
|
|
7
7
|
|
8
8
|
def start
|
9
9
|
@pid = fork do
|
10
|
+
if File.exist?("log")
|
11
|
+
redirect_io(STDOUT, File.join("log", "webrat.webrick.stdout.log"))
|
12
|
+
redirect_io(STDERR, File.join("log", "webrat.webrick.stderr.log"))
|
13
|
+
end
|
10
14
|
exec start_command
|
11
15
|
end
|
12
16
|
end
|
13
17
|
|
14
18
|
def stop
|
15
|
-
Process.kill("
|
19
|
+
Process.kill("INT", @pid)
|
16
20
|
end
|
17
21
|
|
18
22
|
def fail
|
@@ -27,7 +31,18 @@ module Webrat
|
|
27
31
|
end
|
28
32
|
|
29
33
|
def start_command
|
30
|
-
"rackup --port #{Webrat.configuration.application_port} --env #{Webrat.configuration.application_environment}"
|
34
|
+
"#{bundler} rackup -s webrick --port #{Webrat.configuration.application_port} --env #{Webrat.configuration.application_environment}".strip
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def bundler
|
40
|
+
File.exist?("./Gemfile") ? "bundle exec " : ""
|
41
|
+
end
|
42
|
+
|
43
|
+
def redirect_io(io, path)
|
44
|
+
File.open(path, 'ab') { |fp| io.reopen(fp) } if path
|
45
|
+
io.sync = true
|
31
46
|
end
|
32
47
|
|
33
48
|
end
|
data/webrat.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{webrat}
|
5
|
-
s.version = "0.7.2.beta.
|
5
|
+
s.version = "0.7.2.beta.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Bryan Helmkamp"]
|
9
|
-
s.date = %q{2010-
|
9
|
+
s.date = %q{2010-10-06}
|
10
10
|
s.description = %q{Webrat lets you quickly write expressive and robust acceptance tests
|
11
11
|
for a Ruby web application. It supports simulating a browser inside
|
12
12
|
a Ruby process to avoid the performance hit and browser dependency of
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webrat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 62196423
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
9
|
- 2
|
10
10
|
- beta
|
11
|
-
-
|
12
|
-
version: 0.7.2.beta.
|
11
|
+
- 2
|
12
|
+
version: 0.7.2.beta.2
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Bryan Helmkamp
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-
|
20
|
+
date: 2010-10-06 00:00:00 -04:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|