nadir 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/nadir/notification.rb +12 -1
- data/lib/nadir/plugins/rake.rb +18 -0
- data/lib/nadir/version.rb +1 -1
- data/lib/nadir.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebf7758a7e2952ee2101193ec799df617673ec864257b7ed22c8612d51ea54aa
|
4
|
+
data.tar.gz: ab0a0156a9a301a3ca3289a4d38984c7267e096489e4e9c4fae63dd1fe659ec5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d83220a00af3f9fd3ebf9c38a0ff2d7f8c480ee959a0c2a87be46d0ce9535e7fcbda1acb8d611605f022e321a4f63804490ed1e6516b34fae8da32538cf53827
|
7
|
+
data.tar.gz: b7d6281376eaaf197a799d306e1ff151eead022b26c901ed1a53e43ccdcc65acf17cfbe098ff6f508256523ae7529bbc42a254dcd6b789b08a79170497436889
|
data/Gemfile.lock
CHANGED
data/lib/nadir/notification.rb
CHANGED
@@ -21,6 +21,7 @@ module Nadir
|
|
21
21
|
request_headers: @params.dig(:request, :headers),
|
22
22
|
user: @params.dig(:request, :user),
|
23
23
|
job: @params.dig(:job),
|
24
|
+
revision: revision
|
24
25
|
}
|
25
26
|
end
|
26
27
|
|
@@ -34,9 +35,11 @@ module Nadir
|
|
34
35
|
@_backtrace ||=
|
35
36
|
begin
|
36
37
|
cleaner = ActiveSupport::BacktraceCleaner.new
|
37
|
-
gem_paths.each { |gem_path| cleaner.add_filter { |line| line.sub(gem_path, '') } }
|
38
|
+
gem_paths.each { |gem_path| cleaner.add_filter { |line| line.sub(gem_path, '[GEM_ROOT]/') } }
|
39
|
+
cleaner.add_filter { |line| line.sub(ruby_path, '[RUBY_ROOT]/') }
|
38
40
|
cleaner.add_filter { |line| line.sub(Nadir.config.root.to_s, '') }
|
39
41
|
cleaner.add_filter { |line| line.sub('/', '') }
|
42
|
+
cleaner.add_filter { |line| line.start_with?('.') ? line.sub('.', '') : line }
|
40
43
|
|
41
44
|
cleaner.clean(@exception.backtrace)
|
42
45
|
end
|
@@ -52,6 +55,14 @@ module Nadir
|
|
52
55
|
def gem_paths
|
53
56
|
@gem_paths ||= Gem.path | [Gem.default_dir]
|
54
57
|
end
|
58
|
+
|
59
|
+
def ruby_path
|
60
|
+
ENV['RUBY_ROOT']
|
61
|
+
end
|
62
|
+
|
63
|
+
def revision
|
64
|
+
`git rev-parse HEAD`
|
65
|
+
end
|
55
66
|
end
|
56
67
|
end
|
57
68
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Rake
|
2
|
+
class Application
|
3
|
+
alias_method :orig_display_error_message, :display_error_message
|
4
|
+
|
5
|
+
def display_error_message(exception)
|
6
|
+
begin
|
7
|
+
location = "rake #{top_level_tasks.join(' ')}"
|
8
|
+
|
9
|
+
Nadir.notify exception, location: location
|
10
|
+
Nadir::Transport::HTTPAsync.shut_down
|
11
|
+
rescue => e
|
12
|
+
Nadir.logger.error "[Nadir] Internal error: #{e.inspect}"
|
13
|
+
end
|
14
|
+
|
15
|
+
orig_display_error_message exception
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/nadir/version.rb
CHANGED
data/lib/nadir.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nadir
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Georgi Mitrev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -104,6 +104,7 @@ files:
|
|
104
104
|
- lib/nadir/middleware/rack.rb
|
105
105
|
- lib/nadir/notification.rb
|
106
106
|
- lib/nadir/plugins/rails.rb
|
107
|
+
- lib/nadir/plugins/rake.rb
|
107
108
|
- lib/nadir/plugins/sidekiq.rb
|
108
109
|
- lib/nadir/transport/http_async.rb
|
109
110
|
- lib/nadir/version.rb
|