deprecation_collector 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -1
- data/Gemfile.lock +1 -1
- data/README.md +3 -1
- data/lib/deprecation_collector/deprecation.rb +3 -1
- data/lib/deprecation_collector/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2342f445e6c89ba4ea74094dd39894d99ad6e546781405fe43a6ecba71396264
|
4
|
+
data.tar.gz: d5d6edaa942f57a726f9336a06541dabc3eadae2731d01953443a88d84fc7c2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ac2e881d1687dc3756904840f21f98cc62dc497cac31804fcfeac8e4e01c780b5370497ed52da2d1ec22ca14a68ee3be4dc163c5d48cd47c38b775ef0df7b1c
|
7
|
+
data.tar.gz: 5725ea9137d79a83ea8d1df1ae9b458fe0f94479d5e7c9643ac15368ef853f75fac38cce3b7e8543fd4d03df884fa3999019d08902ba437a196f6b5b3c78dd06
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
-
==
|
1
|
+
== 0.0.4
|
2
|
+
- added first_timestamp to deprecations (unix timestamp of first occurrence, not accurate because a worker with later timestamp may dump its deprecations earlier)
|
2
3
|
|
4
|
+
== 0.0.3
|
5
|
+
- Fixed selective deprecation cleanup (`DeprecationCollector.instance.cleanup { |d| d[:message].include?('foo') }`)
|
3
6
|
|
4
7
|
== 0.0.2
|
5
8
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/deprecation_collector.svg)](https://badge.fury.io/rb/deprecation_collector)
|
3
3
|
|
4
4
|
Collects ruby and rails deprecation warnings.
|
5
|
+
Designed to be suitable for use in production under load.
|
6
|
+
|
5
7
|
(gem is a work-in-process, documentation will come later)
|
6
8
|
|
7
9
|
## Installation
|
@@ -41,7 +43,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
41
43
|
|
42
44
|
## Contributing
|
43
45
|
|
44
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
46
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/Vasfed/deprecation_collector.
|
45
47
|
|
46
48
|
## License
|
47
49
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
class DeprecationCollector
|
4
4
|
# :nodoc:
|
5
5
|
class Deprecation
|
6
|
-
attr_reader :message, :realm, :gem_traceline, :app_traceline, :occurences, :full_backtrace
|
6
|
+
attr_reader :message, :realm, :gem_traceline, :app_traceline, :occurences, :first_timestamp, :full_backtrace
|
7
7
|
|
8
8
|
CLEANUP_REGEXES = {
|
9
9
|
# rails views generated methods names are unique per-worker
|
@@ -20,6 +20,7 @@ class DeprecationCollector
|
|
20
20
|
@occurences = 0
|
21
21
|
@gem_traceline = find_gem_traceline(backtrace)
|
22
22
|
@app_traceline = find_app_traceline(backtrace)
|
23
|
+
@first_timestamp = Time.now.to_i
|
23
24
|
|
24
25
|
cleanup_prefixes.each do |path|
|
25
26
|
@gem_traceline.delete_prefix!(path)
|
@@ -68,6 +69,7 @@ class DeprecationCollector
|
|
68
69
|
hostname: Socket.gethostname,
|
69
70
|
revision: DeprecationCollector.instance.app_revision,
|
70
71
|
count: @occurences, # output anyway for frequency estimation (during write_interval inside single process)
|
72
|
+
first_timestamp: first_timestamp, # this may not be accurate, a worker with later timestamp may dump earlier
|
71
73
|
digest_base: digest_base # for debug purposes
|
72
74
|
}.compact
|
73
75
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deprecation_collector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vasily Fedoseyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|