cyrun 0.1.4 → 0.1.5
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.
- checksums.yaml +4 -4
- data/lib/cyrun/runner.rb +13 -4
- data/lib/cyrun/version.rb +1 -1
- data/sig/runner.rbs +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 22f061f7542fcae4b9a2dedd25e8a587609a1b92d3b7ca27e2a52877184908e7
|
|
4
|
+
data.tar.gz: 4121f67c20e6f5ecb7af1963b6968362d5fa1316cb84ecd1d3904dc605711318
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6ea6474ebbb7bc53454f106c1c129321e6fcce19878c9ed57ed339a51a0275850a796ab8ab5321cacf64f9681842fb4bf7f259ad9b6259abc23065e3cfd42576
|
|
7
|
+
data.tar.gz: d8cdec67384115be7599ae31f52bccb12d9f6803486eba1f7dbd723df274e31f8b5342f7666ce6f662eea60a8d023b4c4f775a4f549ce0ded3194c76b41052f0
|
data/lib/cyrun/runner.rb
CHANGED
|
@@ -62,15 +62,24 @@ module Cyrun
|
|
|
62
62
|
|
|
63
63
|
info "Moving #{results.screenshots.size} screenshots to #{directory}"
|
|
64
64
|
results.screenshots.each do |path|
|
|
65
|
-
|
|
66
|
-
rescue StandardError => e
|
|
67
|
-
error "Failed to move screenshot #{path}: #{e.message}"
|
|
68
|
-
success = false
|
|
65
|
+
success &&= move_screenshot path, directory
|
|
69
66
|
end
|
|
70
67
|
|
|
71
68
|
success
|
|
72
69
|
end
|
|
73
70
|
|
|
71
|
+
def move_screenshot(path, directory)
|
|
72
|
+
target_path = "#{directory}/#{SecureRandom.uuid}-#{File.basename(path)}"
|
|
73
|
+
info " -> Moving #{path} to #{target_path}"
|
|
74
|
+
FileUtils.mv(path, target_path)
|
|
75
|
+
|
|
76
|
+
true
|
|
77
|
+
rescue StandardError => e
|
|
78
|
+
error "Failed to move screenshot #{path}: #{e.message}"
|
|
79
|
+
|
|
80
|
+
false
|
|
81
|
+
end
|
|
82
|
+
|
|
74
83
|
def collect_specs
|
|
75
84
|
info 'Collecting specs ...'
|
|
76
85
|
collector.files.each do |filename|
|
data/lib/cyrun/version.rb
CHANGED
data/sig/runner.rbs
CHANGED
|
@@ -21,6 +21,9 @@ module Cyrun
|
|
|
21
21
|
def collect_specs: (String) -> void
|
|
22
22
|
|
|
23
23
|
def copy_result_files: (Array[SingleSpecExecutionResult], String) -> bool
|
|
24
|
+
|
|
25
|
+
def move_screenshot: (String, String)-> bool
|
|
26
|
+
|
|
24
27
|
def move_screenshots: (SpecGroupExecutionResult, String) -> bool
|
|
25
28
|
|
|
26
29
|
def handle_single_execution_result: (SingleSpecExecutionResult) -> void
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cyrun
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Oskar Kirmis
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-04-
|
|
11
|
+
date: 2023-04-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: colorize
|