dogcatcher 0.3.1 → 0.3.2
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 +4 -4
- data/README.md +3 -0
- data/dogcatcher.gemspec +1 -1
- data/lib/dogcatcher/notice.rb +9 -9
- data/lib/dogcatcher/tag_set.rb +16 -0
- data/lib/dogcatcher/version.rb +1 -1
- data/lib/dogcatcher.rb +1 -0
- metadata +12 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c711a24746dd8c51fc688d1d4b507c540dc3ec9e
|
4
|
+
data.tar.gz: c98c797773e3cc00a6cfcffd79b76c60c461ae92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2238d61a7387f1623766a868c0bc1caaed215b7058248492ed367e8aa7e6b956581f2eade6ebff706e191b34aa43605a4cfd819bb61f2943f5699e54e0757a9
|
7
|
+
data.tar.gz: 8365ecf88a20a7f2f434ac74de44286a860bff96fa96f2ff6ce475eb6ccecb2f5dbd033cfaf25e72993ee72b289ebce1f17e93ea34b99b60ec8c7a6c7f620fd5
|
data/README.md
CHANGED
@@ -141,6 +141,9 @@ Custom tags can be sent with exception data by adding them to the config.
|
|
141
141
|
Dogcatcher.configure do |c|
|
142
142
|
c.custom_tags = ['key1:value1']
|
143
143
|
c.custom_tags << 'key2:value2'
|
144
|
+
|
145
|
+
# Proc will be evaluated when exception is caught
|
146
|
+
c.custom_tags << proc { 'key3:value3' }
|
144
147
|
end
|
145
148
|
```
|
146
149
|
|
data/dogcatcher.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_development_dependency 'rake', '~> 10.0'
|
24
24
|
spec.add_development_dependency 'rspec'
|
25
25
|
|
26
|
-
spec.add_runtime_dependency 'activesupport', '
|
26
|
+
spec.add_runtime_dependency 'activesupport', '>= 4', '< 6'
|
27
27
|
spec.add_runtime_dependency 'dogapi', '~> 1.22'
|
28
28
|
spec.add_runtime_dependency 'dogstatsd-ruby', '~> 1.6'
|
29
29
|
end
|
data/lib/dogcatcher/notice.rb
CHANGED
@@ -39,15 +39,15 @@ module Dogcatcher
|
|
39
39
|
#
|
40
40
|
# @return [Array<String>]
|
41
41
|
def tags
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
42
|
+
tagset = Dogcatcher::TagSet.new
|
43
|
+
tagset << "notifier:#{notifier}"
|
44
|
+
tagset << "action:#{action}"
|
45
|
+
tagset << "exception_class:#{exception.class}"
|
46
|
+
tagset << "program:#{@config.program}" if @config.program
|
47
|
+
tagset << "ruby_version:#{RUBY_VERSION}"
|
48
|
+
tagset.merge(gem_tags) if @config.gem_tags
|
49
|
+
tagset.merge(@config.custom_tags)
|
50
|
+
tagset.compile.to_a
|
51
51
|
end
|
52
52
|
|
53
53
|
# Title of the event/notice.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Dogcatcher
|
2
|
+
# A collection of tags
|
3
|
+
class TagSet < Set
|
4
|
+
# Returns a copy of self where proc elements are replaced with the
|
5
|
+
# result of them being called.
|
6
|
+
def compile
|
7
|
+
dup.collect! { |el| el.is_a?(Proc) ? el.call : el }
|
8
|
+
end
|
9
|
+
|
10
|
+
# Replaces the contents of the tag set with the result of calling
|
11
|
+
# {#compile} and returns self.
|
12
|
+
def compile!
|
13
|
+
replace(compile)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/dogcatcher/version.rb
CHANGED
data/lib/dogcatcher.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dogcatcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Vidulich
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -56,16 +56,22 @@ dependencies:
|
|
56
56
|
name: activesupport
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '4'
|
62
|
+
- - "<"
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '6'
|
62
65
|
type: :runtime
|
63
66
|
prerelease: false
|
64
67
|
version_requirements: !ruby/object:Gem::Requirement
|
65
68
|
requirements:
|
66
|
-
- - "
|
69
|
+
- - ">="
|
67
70
|
- !ruby/object:Gem::Version
|
68
71
|
version: '4'
|
72
|
+
- - "<"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '6'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: dogapi
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -119,6 +125,7 @@ files:
|
|
119
125
|
- lib/dogcatcher/markdown.rb
|
120
126
|
- lib/dogcatcher/notice.rb
|
121
127
|
- lib/dogcatcher/notifier.rb
|
128
|
+
- lib/dogcatcher/tag_set.rb
|
122
129
|
- lib/dogcatcher/version.rb
|
123
130
|
- support/screenshot_event.png
|
124
131
|
homepage: https://github.com/zl4bv/dogcatcher
|
@@ -141,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
148
|
version: '0'
|
142
149
|
requirements: []
|
143
150
|
rubyforge_project:
|
144
|
-
rubygems_version: 2.4.
|
151
|
+
rubygems_version: 2.4.8
|
145
152
|
signing_key:
|
146
153
|
specification_version: 4
|
147
154
|
summary: Dogcatcher is a tool to catch exceptions in Ruby applications and send them
|