dry-monitor 0.5.0 → 0.6.1

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: 973eacb62c325645cdf9f3b01b5c39512e4b8f461b99ffcd7993edbd0d6e813f
4
- data.tar.gz: 3b7687f24f0a6498516a7fe5e9a36c4c1b4bb988a64e708a9bf5b4f2c52a17ad
3
+ metadata.gz: c6e53105874b359055963dd30faf125aed4c90db22d9acbc4e15f7bf92b69466
4
+ data.tar.gz: 1644f3f329b528447928c67a168f2d39e62e4e04a5c4f991651c960cc0705e0f
5
5
  SHA512:
6
- metadata.gz: 8feea8bd4a5b2a38ab32b1565620b8e4c6696c5960e2abbcf4c4b9875a183a9fbef76361e794aeb17a18e41781669988f41367b6cdf3eb49d5ad8761ea71da17
7
- data.tar.gz: 80bf24f9be77459e782a417c9e8ca4a106ab4e07e0ef1b89174bab41205d13658723736064bcdc0cdbe60b3a50277b20b38bd037632a37845a147bda3bb14e98
6
+ metadata.gz: bff59a82b1994313d32a0feb2f4161b1af4b8eb516caadb948d74a893a3821069f5448315c16c4a0ec3458d7453e3b62c9b8b391a5c609b9e94595bce35c64c7
7
+ data.tar.gz: 52e5c21154a9520e514761bba7ff7adcbc45646d80a9a2ce93f90f116d92327f6e769b059400f92857a27c7a36fa704db1f40f52045930201aa546d6640781c7
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/CI/badge.svg)][actions]
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=master)][inchpages]
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.6.0`
26
- * ~~jruby~~ `>= 9.3` (we are waiting for [2.6 support](https://github.com/jruby/jruby/issues/6161))
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/master/CHANGELOG.md"
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.6.0"
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
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "dry/configurable"
4
- require "dry/monitor/rack/middleware"
5
4
 
6
5
  module Dry
7
6
  module Monitor
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "dry/monitor/notifications"
4
-
5
3
  module Dry
6
4
  module Monitor
7
5
  module Rack
@@ -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)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dry
4
4
  module Monitor
5
- VERSION = "0.5.0"
5
+ VERSION = "0.6.1"
6
6
  end
7
7
  end
data/lib/dry/monitor.rb CHANGED
@@ -1,20 +1,36 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "dry/monitor/logger"
4
- require "dry/monitor/notifications"
3
+ require "zeitwerk"
4
+
5
5
  require "dry/core/extensions"
6
+ require "dry/core/constants"
6
7
 
7
8
  module Dry
8
9
  module Monitor
9
10
  extend Dry::Core::Extensions
11
+ include Dry::Core::Constants
10
12
 
11
13
  register_extension(:rack) do
12
14
  require "rack/utils"
13
- require "dry/monitor/rack/logger"
15
+
16
+ Dry::Monitor::Rack::Logger
14
17
  end
15
18
 
16
19
  register_extension(:sql) do
17
- require "dry/monitor/sql/logger"
20
+ Dry::Monitor::SQL::Logger
21
+ end
22
+
23
+ def self.loader
24
+ @loader ||= Zeitwerk::Loader.new.tap do |loader|
25
+ root = File.expand_path("..", __dir__)
26
+ loader.tag = "dry-monitor"
27
+ loader.inflector = Zeitwerk::GemInflector.new("#{root}/dry-monitor.rb")
28
+ loader.push_dir(root)
29
+ loader.ignore("#{root}/dry-monitor.rb")
30
+ loader.inflector.inflect "sql" => "SQL"
31
+ end
18
32
  end
19
33
  end
20
34
  end
35
+
36
+ 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.5.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Solnica
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-12 00:00:00.000000000 Z
11
+ date: 2022-07-11 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/master/CHANGELOG.md
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.6.0
180
+ version: 2.7.0
168
181
  required_rubygems_version: !ruby/object:Gem::Requirement
169
182
  requirements:
170
183
  - - ">="
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "dry/core/constants"
4
-
5
- module Dry
6
- module Monitor
7
- include Dry::Core::Constants
8
- end
9
- end