warning_signs 0.0.1 → 0.1.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: 55b5a8c89a3c99603f0b3878a341c8ab5cce9833a364ae43e6fa6e2f4a601b77
4
- data.tar.gz: 288ec53101a4c0fcfc17b326521ed49b88bfb081e642795c6667d0adbdf687c9
3
+ metadata.gz: f982e2333c10256fd6056e6cf26208949d18721a98d5fbb1bdf7c7de19092856
4
+ data.tar.gz: ab14c9f2b8116c49c5b711d5dfc651285cccd004c11b82acef60505505412ca3
5
5
  SHA512:
6
- metadata.gz: b6bbbff2c40d7299d8f559172a929d549f31ed5b1555262cae957d6958450e7fc9cadd87e4d6adcb23c15f9e16a0590336b9e036b54cbddcd32b097baf3e4929
7
- data.tar.gz: c24f89c8d34ff9ea560998af85d6ae6385945e35fdb6d5acd0a01a3258e5bb09186308d730760bc7b9f2657628d673d1776c5bf00e9b08bc8eba545999efe92d
6
+ metadata.gz: 11ea7552143006ab573fa74211b7306eedd136f7a738887a8ff16f51965d4c1778f2e7af8a2f152d1787b05644a684848e0f3efe6fdd600baeed20a0e1d9f6d4
7
+ data.tar.gz: 3536a9efdbc5ce68a0fa6243c456df00c8cfba30e8d523614173aa97a98c2bea6d4e7078f4b541ac2fa32ea925c09aac224dcd95f5d5ed9eeca63944a7b3432b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
1
  ## 0.1.0
2
2
 
3
+ * Smarter caller information for Ruby warnings
4
+
5
+ ## 0.0.1
6
+
3
7
  * Initial public release
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- warning_signs (0.0.1)
4
+ warning_signs (0.1.0)
5
5
  awesome_print
6
6
  railties
7
7
 
@@ -48,6 +48,10 @@ GEM
48
48
  minitest (5.18.0)
49
49
  nokogiri (1.14.3-arm64-darwin)
50
50
  racc (~> 1.4)
51
+ nokogiri (1.14.3-x86_64-darwin)
52
+ racc (~> 1.4)
53
+ nokogiri (1.14.3-x86_64-linux)
54
+ racc (~> 1.4)
51
55
  parallel (1.23.0)
52
56
  parser (3.2.2.1)
53
57
  ast (~> 2.4.1)
@@ -104,7 +108,7 @@ GEM
104
108
  rubocop-ast (>= 1.28.0, < 2.0)
105
109
  ruby-progressbar (~> 1.7)
106
110
  unicode-display_width (>= 2.4.0, < 3.0)
107
- rubocop-ast (1.28.0)
111
+ rubocop-ast (1.28.1)
108
112
  parser (>= 3.2.1.0)
109
113
  rubocop-performance (1.16.0)
110
114
  rubocop (>= 1.7.0, < 2.0)
@@ -115,7 +119,7 @@ GEM
115
119
  json (>= 1.8, < 3)
116
120
  simplecov-html (~> 0.10.0)
117
121
  simplecov-html (0.10.2)
118
- standard (1.28.0)
122
+ standard (1.28.2)
119
123
  language_server-protocol (~> 3.17.0.2)
120
124
  lint_roller (~> 1.0)
121
125
  rubocop (~> 1.50.2)
@@ -5,7 +5,14 @@ module WarningSigns
5
5
  end
6
6
 
7
7
  def augmented_message(message)
8
- "RUBY DEPRECATION WARNING: #{message} called from #{caller_locations(2..2).first}"
8
+ "RUBY DEPRECATION WARNING: #{message} called from #{caller_location}"
9
+ end
10
+
11
+ def caller_location
12
+ caller_locations.find do |location|
13
+ !location.to_s.include?("internal:warning") &&
14
+ !location.to_s.include?("warning_signs")
15
+ end
9
16
  end
10
17
  end
11
18
  end
@@ -1,3 +1,3 @@
1
1
  module WarningSigns
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warning_signs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noel Rappin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-01 00:00:00.000000000 Z
11
+ date: 2023-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry-byebug