cem_win_spec 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/cem_win_spec/version.rb +1 -1
- data/lib/cem_win_spec.rb +26 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 155b49bb4366a1b2fca4237d9da909e05093d907a5e7ff326f4d7a9c4e75f375
|
4
|
+
data.tar.gz: f374c915ab3afcf1636315c02b869fdd4690291070f8429418108d292a922cce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5709e80190d88d38826deae83c379a948d5e7de72202891db48b00521801ef56e9718a64c681b17ccc7eb82a275af72c955737fef9ee2ab62a8c1fbdccb0aa51
|
7
|
+
data.tar.gz: 3ec1282194e8a3afe8df90e3e13e7bd80428bf9d2a70f7d7b8fe6aea0437460bc3b35e8f7e19e8d3a55ded60076b489b078ba80b551b25aa917ccb9cdc0526d0
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cem_win_spec (0.1.
|
4
|
+
cem_win_spec (0.1.5)
|
5
5
|
parallel_tests (~> 3.4)
|
6
6
|
puppet_forge (~> 4.1)
|
7
7
|
winrm (~> 2.3)
|
@@ -15,7 +15,7 @@ GEM
|
|
15
15
|
coderay (1.1.3)
|
16
16
|
diff-lcs (1.5.0)
|
17
17
|
erubi (1.12.0)
|
18
|
-
faraday (2.7.
|
18
|
+
faraday (2.7.10)
|
19
19
|
faraday-net_http (>= 2.0, < 3.1)
|
20
20
|
ruby2_keywords (>= 0.0.4)
|
21
21
|
faraday-follow_redirects (0.3.0)
|
data/lib/cem_win_spec/version.rb
CHANGED
data/lib/cem_win_spec.rb
CHANGED
@@ -56,12 +56,34 @@ module CemWinSpec
|
|
56
56
|
raise ArgumentError, "Unknown operation: #{operation}"
|
57
57
|
end
|
58
58
|
rescue StandardError => e
|
59
|
-
|
60
|
-
|
61
|
-
|
59
|
+
if operation == :spec
|
60
|
+
begin
|
61
|
+
logger.warn "Error running spec: #{e.message}"
|
62
|
+
logger.debug e.backtrace.join("\n")
|
63
|
+
retry_spec_on_error(runner, module_dir, **options)
|
64
|
+
rescue StandardError => err
|
65
|
+
handle_run_error(err)
|
66
|
+
end
|
67
|
+
else
|
68
|
+
handle_run_error(e)
|
69
|
+
end
|
62
70
|
end
|
63
71
|
end
|
64
72
|
|
73
|
+
def self.handle_run_error(err)
|
74
|
+
logger.fatal "Error: #{err.message}"
|
75
|
+
logger.debug err.backtrace.join("\n")
|
76
|
+
exit 1
|
77
|
+
end
|
78
|
+
|
79
|
+
def self.retry_spec_on_error(runner, module_dir, **options)
|
80
|
+
logger.info 'Cleaning cache and trying again...'
|
81
|
+
clean_fixture_cache_out = clean_fixture_cache(runner, module_dir, **options)
|
82
|
+
check_output!(clean_fixture_cache_out, runner)
|
83
|
+
spec_out = run_spec(runner, module_dir, **options)
|
84
|
+
check_output!(spec_out, runner)
|
85
|
+
end
|
86
|
+
|
65
87
|
def self.setup_remote_environment(runner)
|
66
88
|
runner.enable_long_paths.run
|
67
89
|
runner.enable_symlinks.run
|
@@ -99,8 +121,7 @@ module CemWinSpec
|
|
99
121
|
def self.check_output!(output, runner = nil)
|
100
122
|
unless output.success?
|
101
123
|
runner&.iap_tunnel&.stop(wait: false, log: false)
|
102
|
-
|
103
|
-
exit output.exitcode
|
124
|
+
raise "Command failed with exit code #{output.exitcode}"
|
104
125
|
end
|
105
126
|
end
|
106
127
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cem_win_spec
|
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
|
- Heston Snodgrass
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: winrm
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
|
-
rubygems_version: 3.4.
|
142
|
+
rubygems_version: 3.4.18
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Write a short summary, because RubyGems requires one.
|