dry-monitor 0.5.0 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/README.md +4 -4
- data/dry-monitor.gemspec +3 -2
- data/lib/dry/monitor/notifications.rb +2 -1
- data/lib/dry/monitor/rack/logger.rb +0 -1
- data/lib/dry/monitor/rack/middleware.rb +0 -2
- data/lib/dry/monitor/sql/logger.rb +0 -5
- data/lib/dry/monitor/version.rb +1 -1
- data/lib/dry/monitor.rb +21 -4
- metadata +18 -5
- data/lib/dry/monitor/constants.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dce5901ccf5b7f6600561461fa96a18db936057302892d789213a44742ee341f
|
4
|
+
data.tar.gz: 9ced6da7af00e039075a381a786c978fa15698727f1853774944945213161c7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cd1eea659a61e3786614e324d6285f360581efd637412c670f9c28053eb4b0e6db1c9e057edf1aee397bdd541d3d0077a7da117c432dc3a282bb9cefe102e33
|
7
|
+
data.tar.gz: cc5dc34cbbb488ab20b6961e6e1bf0dec3d6f1478b63a96330dfb7c7d34c5c78002e91a0290c5ba3757766abf0fa96dc58d704a5128c28028f214528ea97e00b
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
<!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
|
2
2
|
|
3
|
+
## 0.6.1 2022-07-11
|
4
|
+
|
5
|
+
|
6
|
+
### Fixed
|
7
|
+
|
8
|
+
- Include dry-core's constants in Notifications (fixes #46) (@solnic)
|
9
|
+
|
10
|
+
|
11
|
+
[Compare v0.6.0...v0.6.1](https://github.com/dry-rb/dry-monitor/compare/v0.6.0...v0.6.1)
|
12
|
+
|
13
|
+
## 0.6.0 2022-07-10
|
14
|
+
|
15
|
+
|
16
|
+
### Added
|
17
|
+
|
18
|
+
- Zeitwerk integration :tada: so that you can simply do `require "dry/monitor"` and other constants will be auto-loaded on demand (via #47) (@gmcgibbon)
|
19
|
+
|
20
|
+
|
21
|
+
[Compare v0.5.0...v0.6.0](https://github.com/dry-rb/dry-monitor/compare/v0.5.0...v0.6.0)
|
22
|
+
|
3
23
|
## 0.5.0 2021-09-12
|
4
24
|
|
5
25
|
|
data/README.md
CHANGED
@@ -8,10 +8,10 @@
|
|
8
8
|
# dry-monitor [![Join the chat at https://dry-rb.zulipchat.com](https://img.shields.io/badge/dry--rb-join%20chat-%23346b7a.svg)][chat]
|
9
9
|
|
10
10
|
[![Gem Version](https://badge.fury.io/rb/dry-monitor.svg)][gem]
|
11
|
-
[![CI Status](https://github.com/dry-rb/dry-monitor/workflows/
|
11
|
+
[![CI Status](https://github.com/dry-rb/dry-monitor/workflows/ci/badge.svg)][actions]
|
12
12
|
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/984c4274e56d423a818e7a1bf5e963d0)][codacy]
|
13
13
|
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/984c4274e56d423a818e7a1bf5e963d0)][codacy]
|
14
|
-
[![Inline docs](http://inch-ci.org/github/dry-rb/dry-monitor.svg?branch=
|
14
|
+
[![Inline docs](http://inch-ci.org/github/dry-rb/dry-monitor.svg?branch=main)][inchpages]
|
15
15
|
|
16
16
|
## Links
|
17
17
|
|
@@ -22,8 +22,8 @@
|
|
22
22
|
|
23
23
|
This library officially supports the following Ruby versions:
|
24
24
|
|
25
|
-
* MRI `>= 2.
|
26
|
-
*
|
25
|
+
* MRI `>= 2.7.0`
|
26
|
+
* jruby `>= 9.3` (postponed until 2.7 is supported)
|
27
27
|
|
28
28
|
## License
|
29
29
|
|
data/dry-monitor.gemspec
CHANGED
@@ -22,16 +22,17 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
24
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
25
|
-
spec.metadata["changelog_uri"] = "https://github.com/dry-rb/dry-monitor/blob/
|
25
|
+
spec.metadata["changelog_uri"] = "https://github.com/dry-rb/dry-monitor/blob/main/CHANGELOG.md"
|
26
26
|
spec.metadata["source_code_uri"] = "https://github.com/dry-rb/dry-monitor"
|
27
27
|
spec.metadata["bug_tracker_uri"] = "https://github.com/dry-rb/dry-monitor/issues"
|
28
28
|
|
29
|
-
spec.required_ruby_version = ">= 2.
|
29
|
+
spec.required_ruby_version = ">= 2.7.0"
|
30
30
|
|
31
31
|
# to update dependencies edit project.yml
|
32
32
|
spec.add_runtime_dependency "dry-configurable", "~> 0.13", ">= 0.13.0"
|
33
33
|
spec.add_runtime_dependency "dry-core", "~> 0.5", ">= 0.5"
|
34
34
|
spec.add_runtime_dependency "dry-events", "~> 0.2"
|
35
|
+
spec.add_runtime_dependency "zeitwerk", "~> 2.5"
|
35
36
|
|
36
37
|
spec.add_development_dependency "bundler"
|
37
38
|
spec.add_development_dependency "rake"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "dry/core/constants"
|
3
4
|
require "dry/events/publisher"
|
4
|
-
require "dry/monitor/constants"
|
5
5
|
|
6
6
|
module Dry
|
7
7
|
module Monitor
|
@@ -20,6 +20,7 @@ module Dry
|
|
20
20
|
CLOCK = Clock.new
|
21
21
|
|
22
22
|
class Notifications
|
23
|
+
include Core::Constants
|
23
24
|
include Events::Publisher["Dry::Monitor::Notifications"]
|
24
25
|
|
25
26
|
attr_reader :id, :clock
|
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
require "dry-configurable"
|
4
4
|
require "dry/core/extensions"
|
5
|
-
require "dry/monitor/notifications"
|
6
5
|
|
7
6
|
module Dry
|
8
7
|
module Monitor
|
@@ -14,8 +13,6 @@ module Dry
|
|
14
13
|
extend Dry::Configurable
|
15
14
|
|
16
15
|
register_extension(:default_colorizer) do
|
17
|
-
require_relative "./colorizers/default"
|
18
|
-
|
19
16
|
module DefaultColorizer
|
20
17
|
def colorizer
|
21
18
|
@colorizer ||= Colorizers::Default.new(config.theme)
|
@@ -26,8 +23,6 @@ module Dry
|
|
26
23
|
end
|
27
24
|
|
28
25
|
register_extension(:rouge_colorizer) do
|
29
|
-
require_relative "./colorizers/rouge"
|
30
|
-
|
31
26
|
module RougeColorizer
|
32
27
|
def colorizer
|
33
28
|
@colorizer ||= Colorizers::Rouge.new(config.theme)
|
data/lib/dry/monitor/version.rb
CHANGED
data/lib/dry/monitor.rb
CHANGED
@@ -1,20 +1,37 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "
|
4
|
-
|
3
|
+
require "zeitwerk"
|
4
|
+
|
5
5
|
require "dry/core/extensions"
|
6
|
+
require "dry/core/constants"
|
7
|
+
require "dry/monitor/version"
|
6
8
|
|
7
9
|
module Dry
|
8
10
|
module Monitor
|
9
11
|
extend Dry::Core::Extensions
|
12
|
+
include Dry::Core::Constants
|
10
13
|
|
11
14
|
register_extension(:rack) do
|
12
15
|
require "rack/utils"
|
13
|
-
|
16
|
+
|
17
|
+
Dry::Monitor::Rack::Logger
|
14
18
|
end
|
15
19
|
|
16
20
|
register_extension(:sql) do
|
17
|
-
|
21
|
+
Dry::Monitor::SQL::Logger
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.loader
|
25
|
+
@loader ||= Zeitwerk::Loader.new.tap do |loader|
|
26
|
+
root = File.expand_path("..", __dir__)
|
27
|
+
loader.tag = "dry-monitor"
|
28
|
+
loader.inflector = Zeitwerk::GemInflector.new("#{root}/dry-monitor.rb")
|
29
|
+
loader.push_dir(root)
|
30
|
+
loader.ignore("#{root}/dry-monitor.rb", "#{root}/dry/monitor/version.rb")
|
31
|
+
loader.inflector.inflect "sql" => "SQL"
|
32
|
+
end
|
18
33
|
end
|
19
34
|
end
|
20
35
|
end
|
36
|
+
|
37
|
+
Dry::Monitor.loader.setup
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-monitor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|
@@ -64,6 +64,20 @@ dependencies:
|
|
64
64
|
- - "~>"
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '0.2'
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: zeitwerk
|
69
|
+
requirement: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - "~>"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '2.5'
|
74
|
+
type: :runtime
|
75
|
+
prerelease: false
|
76
|
+
version_requirements: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - "~>"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '2.5'
|
67
81
|
- !ruby/object:Gem::Dependency
|
68
82
|
name: bundler
|
69
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -139,7 +153,6 @@ files:
|
|
139
153
|
- dry-monitor.gemspec
|
140
154
|
- lib/dry-monitor.rb
|
141
155
|
- lib/dry/monitor.rb
|
142
|
-
- lib/dry/monitor/constants.rb
|
143
156
|
- lib/dry/monitor/logger.rb
|
144
157
|
- lib/dry/monitor/notifications.rb
|
145
158
|
- lib/dry/monitor/rack/logger.rb
|
@@ -153,7 +166,7 @@ licenses:
|
|
153
166
|
- MIT
|
154
167
|
metadata:
|
155
168
|
allowed_push_host: https://rubygems.org
|
156
|
-
changelog_uri: https://github.com/dry-rb/dry-monitor/blob/
|
169
|
+
changelog_uri: https://github.com/dry-rb/dry-monitor/blob/main/CHANGELOG.md
|
157
170
|
source_code_uri: https://github.com/dry-rb/dry-monitor
|
158
171
|
bug_tracker_uri: https://github.com/dry-rb/dry-monitor/issues
|
159
172
|
post_install_message:
|
@@ -164,7 +177,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
164
177
|
requirements:
|
165
178
|
- - ">="
|
166
179
|
- !ruby/object:Gem::Version
|
167
|
-
version: 2.
|
180
|
+
version: 2.7.0
|
168
181
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
182
|
requirements:
|
170
183
|
- - ">="
|