snagglepuss 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de831b08b102db213d7a9b76b66ac0602304e52e30534178dca97d26becdb50b
4
- data.tar.gz: 6b4aaad4ac4ad6cf77250847c42cbd7660f9920ede419de5c1ff7c817366cf72
3
+ metadata.gz: 933889cd095beb9d16695e800f2432ed234632b0c20c15e986dcd5e27b3aa135
4
+ data.tar.gz: 07ae04dff283e0252485967554a9e80af8860f6a59cdae237ad090c1187d8c37
5
5
  SHA512:
6
- metadata.gz: 13b5522498891d7adc8d058ae7ebda4f10bdd3a2fca72a0dc98c99825cfc3d60e3b4c47337dafaba13139521833111904481ed87078f22fcc36ef62fb7cd4d16
7
- data.tar.gz: 7972db8e27abcf81591eafdc1378a2f0e09f8730a0b4c9337ad1580455effff442c81eeb12121177ac8427b99bb229f4bb84ad508868fb3d3ea075109a2f420d
6
+ metadata.gz: fddd11d96897867ce27d87e74cbc7af7039e8612c6e7f57733a90a94f3544623c4299408cf032ae4ce132e10a5c00fb5249eb4271bf2eaecc503b859a1aba4f8
7
+ data.tar.gz: 8380b3b2ea5346864737b248eb2a8327821c987e52eda511c58180577f2d360c865d47bba9ae40cfafc100bcdba83e4e913295f2247919fee5e72d72e82c939b
@@ -7,7 +7,7 @@ if defined?(ColorMeRad)
7
7
  :exclamation,
8
8
  :partition,
9
9
  :path,
10
- :function,
10
+ :location,
11
11
  ].all?{ |key| ColorMeRad.color_for_key(key) == :light_yellow }
12
12
  ColorMeRad.configure do |config|
13
13
  config.set_colors \
@@ -16,7 +16,8 @@ if defined?(ColorMeRad)
16
16
  :exclamation => :green,
17
17
  :path => :blue,
18
18
  :partition => :light_black,
19
- :function => :magenta
19
+ :location => :magenta,
20
+ :stacktrace => :blue
20
21
  end
21
22
  end
22
23
  end
@@ -8,20 +8,25 @@ module Snagglepuss
8
8
  return line unless Colorize.enabled?
9
9
  return Colorize.key(line, :stacktrace) unless full_match?(line)
10
10
 
11
- path, number, description = line.split(':')
12
- function = description.match(/`(.*)'/)[1].to_s
11
+ values = line.split(':')
13
12
 
14
- '%s:%s in `%s`' % [
13
+ path = values[0]
14
+ number = values[1]
15
+ description = values[2..-1].join(':')
16
+
17
+ location = description.gsub(/in /, '')
18
+
19
+ '%s:%s in %s' % [
15
20
  Colorize.key(path, :path),
16
21
  Colorize.data(number.to_i),
17
- Colorize.key(function, :function),
22
+ Colorize.key(location, :location),
18
23
  ]
19
24
  end
20
25
 
21
26
  private
22
27
 
23
28
  def full_match?(line)
24
- line.match(/[\/\w]+:\d+:in `.*'$/)
29
+ line.match(/[\/\w]+.*:\d+:in `.*'$/)
25
30
  end
26
31
  end
27
32
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Snagglepuss
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snagglepuss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Herrick
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-05-24 00:00:00.000000000 Z
11
+ date: 2025-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: color_me_rad