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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6633e0f63267821bc8ae8c99dcfe483c2d81d01
4
- data.tar.gz: d35de5e19c075db347e4aabfa8d2c78faf3aac40
3
+ metadata.gz: bdaed8c0afa61cf7344d8408f594a2a2a46e7e7c
4
+ data.tar.gz: c24c856b988deed8436fd94251738699d4fd7d80
5
5
  SHA512:
6
- metadata.gz: 16f339daef3a6ea79e3a79bab28e160b7520a899306fe6c83108336eeeb39b41478a9f7130487faf0cd9c935bbf4e2e501319fc7ba2ece3ea58595006121eb36
7
- data.tar.gz: 211d1887abc5d273a27a3b4a14795c8935fd9adf1ab24224d488830fd2e2f5e2c45e3fe0ea51ec41688526d7a27d1df4245c766d155e6c43a8fb10dabd5cb079
6
+ metadata.gz: 587e74eea5569336e755092841a477f011de54e8a739f16513854f921e427b2b23a143e9ee13f97e4552489d4ba77a71e053cad941f1d71ad25d0490210226e5
7
+ data.tar.gz: 185f0229cd4709b4151b09384975065db999fbeccc4805c8cb1befd266c9d5056b2a91368a96b3657df8b7365207780e40877efcd2c0396f4c1108f3cb9bcbdf
@@ -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
@@ -1,3 +1,3 @@
1
1
  module DebtCeiling
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: debt_ceiling
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Glusman