yellowscorpion 0.0.0 → 0.0.1

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: 4d34d1b03770896ba3693d27f86bc509734e5ad500e96431ce8ccbc9f0384e42
4
- data.tar.gz: a9e0911e3f73d46e1facd40597f06247ed17f9bd33fd3bcae8d72045cd69f767
3
+ metadata.gz: 4c944d90ea63a003756698faee233594871dc69b3fd7e19d80bd46f8cf16b9a7
4
+ data.tar.gz: 90b342259f0cc084c697a204291a064c3f9879efda5c6fdcf45a810700e816fc
5
5
  SHA512:
6
- metadata.gz: bdf23411418b5cc36e38e21be7940f7053e8ac70f46661d45df24cc405f030f5cb3f94aace59c11135d51971d3c785a56a0075be477cd8fd03aef6c0dbdd4178
7
- data.tar.gz: 1c53cbdef42970c712a1c7829651696c1ebe169039451452c717e3bf897a5334d27b357f29df46066878ffb564dbf44c3d0b77926bed87a4e1039ce49994dcd6
6
+ metadata.gz: ef0c8da40bd6b309fa06adf958b98c6ded07268129ed8aa35dade013737a1fdf26cd9f37b126e560eb29a44e0574b2aabb4e00eac8f7a7455050700e63701ff2
7
+ data.tar.gz: '0291c05a8fd2d89c8177039807ea99ea19db13b358add494712d0b5b3f88bd1a3ddfd794962f606d2c65490a2ef7616d2d0bd26721c1217d49a99b8b245e69af'
@@ -3,8 +3,12 @@ module Yellowscorpion
3
3
  def assert(expression)
4
4
  return if expression == true
5
5
 
6
- backlocation = caller_locations(1, 1)[0].to_s
7
- printf "\e[31m#{backlocation}\e[0m \n"
6
+ backlocation = caller_locations(1, 1)[0]
7
+ lineno = backlocation.lineno
8
+ method_name = backlocation.to_s[/`.*'/][1..-2].split(" ")[-1]
9
+ filename = backlocation.to_s.split(":")[0]
10
+ message = "Assertion failed: method #{method_name}, file #{filename}, line #{lineno}."
11
+ printf "\e[31m#{message}\e[0m \n"
8
12
  abort
9
13
  end
10
14
  end
@@ -1,3 +1,3 @@
1
1
  module Yellowscorpion
2
- VERSION = "0.0.0"
2
+ VERSION = "0.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yellowscorpion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaíque Kandy Koga