watirsplash 2.0.1.rc4 → 2.0.1.rc5
Sign up to get free protection for your applications and to get access to all the features.
@@ -4,10 +4,9 @@ Bundler.setup
|
|
4
4
|
require 'spork'
|
5
5
|
|
6
6
|
Spork.prefork do
|
7
|
-
|
7
|
+
# Loading more in this block will cause your tests to run faster. However,
|
8
8
|
# if you change any configuration or code from libraries loaded here, you'll
|
9
9
|
# need to restart spork for it take effect.
|
10
|
-
ENV["WATIRSPLASH_RESULTS_PATH"] = "results/#{Time.now.strftime("%y%m%d_%H%M%S")}/index.html"
|
11
10
|
require "watirsplash"
|
12
11
|
|
13
12
|
# What framework to use? Possible values are:
|
@@ -14,6 +14,8 @@ module WatirSplash
|
|
14
14
|
|
15
15
|
def initialize(output) # :nodoc:
|
16
16
|
@output_path = File.expand_path(ENV["WATIRSPLASH_RESULTS_PATH"] || (output.respond_to?(:path) ? output.path : "results/index.html"))
|
17
|
+
archive_results if File.exists?(@output_path)
|
18
|
+
|
17
19
|
@output_relative_path = Pathname.new(@output_path).relative_path_from(Pathname.new(Dir.pwd))
|
18
20
|
puts "Results will be saved to #{@output_relative_path}"
|
19
21
|
@files_dir = File.join(File.dirname(@output_path), "files")
|
@@ -86,6 +88,13 @@ module WatirSplash
|
|
86
88
|
|
87
89
|
private
|
88
90
|
|
91
|
+
def archive_results
|
92
|
+
output_dir = File.dirname(@output_path)
|
93
|
+
archive_dir = File.join(output_dir, "../archive")
|
94
|
+
FileUtils.mkdir_p(archive_dir) unless File.exists?(archive_dir)
|
95
|
+
FileUtils.mv output_dir, File.join(archive_dir, "#{File.basename(output_dir)}_#{File.mtime(output_dir).strftime("%y%m%d_%H%M%S")}")
|
96
|
+
end
|
97
|
+
|
89
98
|
def append_extra_information_to_description(example_group)
|
90
99
|
date = Time.now.strftime("%d.%m.%Y")
|
91
100
|
spec_location, line_no = extract_example_group_metadata example_group.metadata[:example_group]
|
data/lib/watirsplash/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watirsplash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15424087
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
9
|
- 1
|
10
10
|
- rc
|
11
|
-
-
|
12
|
-
version: 2.0.1.
|
11
|
+
- 5
|
12
|
+
version: 2.0.1.rc5
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Jarmo Pertman
|
@@ -177,7 +177,7 @@ rubyforge_project:
|
|
177
177
|
rubygems_version: 1.8.4
|
178
178
|
signing_key:
|
179
179
|
specification_version: 3
|
180
|
-
summary: watirsplash 2.0.1.
|
180
|
+
summary: watirsplash 2.0.1.rc5
|
181
181
|
test_files:
|
182
182
|
- spec/browser_spec.rb
|
183
183
|
- spec/page_spec.rb
|