fitting 4.0.4 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92eb81d86fad0e91e7a8b05ba39a157158400f7002594cfc6232044249d70a16
4
- data.tar.gz: 441412e6014c7a303771443862a1ac3e23858e994957bef162bfc4c23e202bcf
3
+ metadata.gz: 72158c60c83bde6488bbad275ac0f6f1c02cec83eb25dd755cd2abfbfb9c874d
4
+ data.tar.gz: e400a4a677dd936873cc7f694dc21d2c0b23631161b4a13ba32a30a8804f12e2
5
5
  SHA512:
6
- metadata.gz: 2dd67c0d5f0a783f70caada577f1501d70f070503e70c0af2bf7c9750bbfc8749fc98adf426931572bff447a8b733069723bffd39f127e34267dc997a734f0d8
7
- data.tar.gz: e54ba08c80cbe3194ade774e9a142951fe759b757f9de61938605a6d77ba71298736457200d39c52634bd76a9fa61edd579403be1df092801ee806c73a7e123c
6
+ metadata.gz: 1b166dd8af2adebcbd578feffc335faba4b8fd3b30f35ecd76c4eaa84e0d6c085aa049498c19e4cc678f796ee804666bc3132e4c8371d03414ab0d6be97b322b
7
+ data.tar.gz: 4da148652a82d91add5807394fb86ae0b5bc703f6091f97867b6c239ab3249ab6b2a6cb7caa7f28ead4347a291afe80ea091e5eb4d0f5ef03c4661972a534406
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Change log
2
2
 
3
+ ### 4.2.0 - 2024-01-17
4
+
5
+ * features
6
+ * print report green if no failures
7
+
8
+ ### 4.1.0 - 2023-10-16
9
+
10
+ * features
11
+ * add exit for invalid case
12
+
3
13
  ### 4.0.4 - 2023-10-06
4
14
 
5
15
  * patch
data/lib/fitting/log.rb CHANGED
@@ -96,7 +96,14 @@ module Fitting
96
96
  Fitting::Log.failure(logs).each_with_index do |log, index|
97
97
  puts "\e[31m #{index + 1}) #{log.error.class} #{log.error.message}\n\n\e[0m"
98
98
  end
99
- print "\e[31m#{logs.size} examples, #{Fitting::Log.failure(logs).size} failure, #{Fitting::Log.pending(logs).size} pending\e[0m\n"
99
+
100
+ failure_count = Fitting::Log.failure(logs).size
101
+ color_code = failure_count > 0 ? 31 : 32
102
+ print "\e[#{color_code}m#{logs.size} examples, #{failure_count} failure, #{Fitting::Log.pending(logs).size} pending\e[0m\n"
103
+
104
+ unless Fitting::Log.failure(logs).size <= 0
105
+ exit 1
106
+ end
100
107
  end
101
108
  end
102
- end
109
+ end
@@ -1,3 +1,3 @@
1
1
  module Fitting
2
- VERSION = '4.0.4'.freeze
2
+ VERSION = '4.2.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fitting
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.4
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - d.efimov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-06 00:00:00.000000000 Z
11
+ date: 2024-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json-schema