debt_ceiling 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/debt_ceiling/audit.rb +10 -0
- data/lib/debt_ceiling/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdaed8c0afa61cf7344d8408f594a2a2a46e7e7c
|
4
|
+
data.tar.gz: c24c856b988deed8436fd94251738699d4fd7d80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 587e74eea5569336e755092841a477f011de54e8a739f16513854f921e427b2b23a143e9ee13f97e4552489d4ba77a71e053cad941f1d71ad25d0490210226e5
|
7
|
+
data.tar.gz: 185f0229cd4709b4151b09384975065db999fbeccc4805c8cb1befd266c9d5056b2a91368a96b3657df8b7365207780e40877efcd2c0396f4c1108f3cb9bcbdf
|
data/lib/debt_ceiling/audit.rb
CHANGED
@@ -58,6 +58,15 @@ module DebtCeiling
|
|
58
58
|
exceeded_total_limit? || missed_target? || max_debt_per_module_exceeded?
|
59
59
|
end
|
60
60
|
|
61
|
+
def failure_message
|
62
|
+
message = ""
|
63
|
+
message += "DEBT CEILING FAILURE: " if failed_condition?
|
64
|
+
message += "EXCEEDED TOTAL DEBT CEILING " if exceeded_total_limit?
|
65
|
+
message += "MISSED DEBT REDUCTION TARGET " if missed_target?
|
66
|
+
message += "MAX DEBT PER MODULE EXCEEDED IN AT LEAST ONE LOCATION" if max_debt_per_module_exceeded?
|
67
|
+
message
|
68
|
+
end
|
69
|
+
|
61
70
|
def exceeded_total_limit?
|
62
71
|
debt_ceiling && debt_ceiling <= total_debt
|
63
72
|
end
|
@@ -72,6 +81,7 @@ module DebtCeiling
|
|
72
81
|
end
|
73
82
|
|
74
83
|
def fail_test
|
84
|
+
puts failure_message
|
75
85
|
at_exit do
|
76
86
|
Kernel.exit 1
|
77
87
|
end
|
data/lib/debt_ceiling/version.rb
CHANGED