assert 2.19.4 → 2.19.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/assert/cli.rb +13 -4
- data/lib/assert/version.rb +1 -1
- 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: 35f8f95e4407b3f78d1f7f1c764bb22c0287bbdb8cf44574c50c43bb9f30732c
|
4
|
+
data.tar.gz: 1c1ab4b120c4b8e006971b492ec5ac776d5cd4e55ac9df85f387d5065801d7fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77ffacb188ba7c3accba0ece4702a8695dd6735a09e2c86183c0e0a4106946b28d7e18bf8e4ead82046bd9376697fc45886b1e6bc43098f6c5eeaf4e78350037
|
7
|
+
data.tar.gz: 633e0ca4b3e75f7a653ff301cfebe98b76cd55a0665c3082dfb3cbd9b24e0d582e4f5aa752ec42a76e0c7035b61502f03cb4eddfd94662e9f797c04e093f4dd4
|
data/lib/assert/cli.rb
CHANGED
@@ -8,6 +8,9 @@ require "assert/version"
|
|
8
8
|
|
9
9
|
module Assert
|
10
10
|
class CLI
|
11
|
+
SUCCESS_EXIT_STATUS = 0
|
12
|
+
ERROR_EXIT_STATUS = 1
|
13
|
+
|
11
14
|
def self.debug?(args)
|
12
15
|
args.include?("-d") || args.include?("--debug")
|
13
16
|
end
|
@@ -68,25 +71,31 @@ module Assert
|
|
68
71
|
end
|
69
72
|
|
70
73
|
def run
|
74
|
+
fails_plus_errors_count = 0
|
71
75
|
begin
|
72
76
|
@cli.parse!(@args)
|
73
77
|
catch(:halt) do
|
74
|
-
|
78
|
+
fails_plus_errors_count =
|
79
|
+
Assert::AssertRunner.new(Assert.config, @cli.args, @cli.opts).run
|
75
80
|
end
|
76
81
|
rescue CLIRB::HelpExit
|
77
82
|
puts help
|
83
|
+
exit(SUCCESS_EXIT_STATUS)
|
78
84
|
rescue CLIRB::VersionExit
|
79
85
|
puts Assert::VERSION
|
86
|
+
exit(SUCCESS_EXIT_STATUS)
|
80
87
|
rescue CLIRB::Error => ex
|
81
88
|
puts "#{ex.message}\n\n"
|
82
89
|
puts Assert.config.debug ? ex.backtrace.join("\n") : help
|
83
|
-
exit(
|
90
|
+
exit(ERROR_EXIT_STATUS)
|
84
91
|
rescue => ex
|
85
92
|
puts "#{ex.class}: #{ex.message}"
|
86
93
|
puts ex.backtrace.join("\n")
|
87
|
-
exit(
|
94
|
+
exit(ERROR_EXIT_STATUS)
|
88
95
|
end
|
89
|
-
exit(
|
96
|
+
exit(
|
97
|
+
fails_plus_errors_count == 0 ? SUCCESS_EXIT_STATUS : ERROR_EXIT_STATUS,
|
98
|
+
)
|
90
99
|
end
|
91
100
|
|
92
101
|
def help
|
data/lib/assert/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: assert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.19.
|
4
|
+
version: 2.19.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kelly Redding
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-01-
|
12
|
+
date: 2021-01-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: much-style-guide
|