omnes 0.2.1 → 0.2.2

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: eb5f0bfcfdcbaffdfe41c807db505023e8bb84cacdb56378a0851b9effdd51c1
4
- data.tar.gz: 4b2bb740f6525c96651912a88f7738b04ceeca699a4af7b3f883f68a3e60eb55
3
+ metadata.gz: 4d69bcb6ece79550d662ea1ed7cf734cc47940a39d432c58c849f8c15415472a
4
+ data.tar.gz: 459ff5514f310cc52492bb2fabc6bf8786e3a9119f760288aeef6329b609b4d3
5
5
  SHA512:
6
- metadata.gz: 55b5fe1e1bc4fd5cd10e6683ff7539be5dec727f4399758d7fcfe3fd3d485d30fe4d99e8c2f1354bf1aef28f3efffd991573a89d827edf3839827c6fcfcd71d8
7
- data.tar.gz: cc1c6c69c4e98442abad019ffac4dfa56221924182fd041d9830d7c72660eec09b4173c812e90969fb49f28cd7968acaeb91ab89c94bb8a9efb96e3bbe5626e7
6
+ metadata.gz: f395f3f775f8c44d54e17ad8502b0bf40c201edd861170242ac1ab29db90c2ace38273aceea5a257ed5e2910dcaca43370feec8e9563090847febe039ce99805
7
+ data.tar.gz: d2be4901c0fcc8bdd7bd8f1a1887c32445877300f1bf46f1396e7c16312c221f9c295fef1ee58756320a1be20c69f2a0e4dc4d0048451043998f51d89bb2c68c
@@ -12,7 +12,7 @@ jobs:
12
12
  strategy:
13
13
  fail-fast: false
14
14
  matrix:
15
- ruby-version: ['2.7', '3.0', '3.1']
15
+ ruby-version: ['2.5', '2.6', '2.7', '3.0', '3.1']
16
16
 
17
17
  steps:
18
18
  - name: Checkout repository
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.7
2
+ TargetRubyVersion: 2.5
3
3
  NewCops: enable
4
4
  SuggestExtensions: false
5
5
 
@@ -29,7 +29,7 @@ Layout/LineLength:
29
29
  Max: 120
30
30
 
31
31
  Naming/MethodName:
32
- IgnoredPatterns:
32
+ AllowedPatterns:
33
33
  - '.*Type'
34
34
 
35
35
  Lint/ConstantDefinitionInBlock:
data/CHANGELOG.md CHANGED
@@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## Unreleased
7
+ ## [Unreleased]
8
+
9
+ ## [0.2.2] - 2022-05-03
10
+
11
+ ### Added
12
+ - Support Ruby 2.5 & 2.6 [#6](https://github.com/nebulab/omnes/pull/6).
8
13
 
9
14
  ## [0.2.1] - 2022-04-19
10
15
 
@@ -23,7 +28,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
23
28
 
24
29
  ## [0.1.0] - 2022-03-23
25
30
 
26
- [Unreleased]: https://github.com/nebulab/omnes/compare/v0.2.1...HEAD
31
+ [Unreleased]: https://github.com/nebulab/omnes/compare/v0.2.2...HEAD
32
+ [0.2.1]: https://github.com/nebulab/omnes/compare/v0.2.1...v0.2.2
27
33
  [0.2.1]: https://github.com/nebulab/omnes/compare/v0.2.0...v0.2.1
28
34
  [0.2.0]: https://github.com/nebulab/omnes/compare/v0.1.0...v0.2.0
29
35
  [0.1.0]: https://github.com/nebulab/omnes/releases/tag/v0.1.0
data/README.md CHANGED
@@ -162,7 +162,7 @@ class LogEventsSubscription
162
162
  end
163
163
 
164
164
  def call(event)
165
- logger.info("Event #{event.name} published")
165
+ logger.info("Event #{event.omnes_event_name} published")
166
166
  end
167
167
  end
168
168
 
@@ -176,7 +176,7 @@ Custom event matchers can be defined. A matcher is something responding to
176
176
  to match or ignore the event.
177
177
 
178
178
  ```ruby
179
- ORDER_EVENTS_MATCHER = ->(event) { event.name.start_with?(:order) }
179
+ ORDER_EVENTS_MATCHER = ->(event) { event.omnes_event_name.start_with?(:order) }
180
180
 
181
181
  bus.subscribe_with_matcher(ORDER_EVENTS_MATCHER) do |event|
182
182
  # ...
@@ -246,7 +246,7 @@ class LogEventsSubscriber
246
246
  end
247
247
 
248
248
  def log_event(event)
249
- logger.info("Event #{event.name} published")
249
+ logger.info("Event #{event.omnes_event_name} published")
250
250
  end
251
251
  end
252
252
  ```
data/lib/omnes/errors.rb CHANGED
@@ -18,7 +18,7 @@ module Omnes
18
18
  def default_message
19
19
  <<~MSG
20
20
  '#{event_name}' event is not registered.
21
- #{suggestions_message}
21
+ #{suggestions_message if defined?(DidYouMean::PlainFormatter)}
22
22
 
23
23
  All known events are:
24
24
 
data/lib/omnes/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Omnes
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
data/lib/omnes.rb CHANGED
@@ -44,7 +44,12 @@ module Omnes
44
44
  klass.define_method(:omnes_bus) { @omnes_bus ||= Bus.new(cal_loc_start: 2) }
45
45
  Bus.instance_methods(false).each do |method|
46
46
  klass.define_method(method) do |*args, **kwargs, &block|
47
- omnes_bus.send(method, *args, **kwargs, &block)
47
+ # TODO: Forward with ... once we deprecate ruby 2.5 & 2.6
48
+ if kwargs.any?
49
+ omnes_bus.send(method, *args, **kwargs, &block)
50
+ else
51
+ omnes_bus.send(method, *args, &block)
52
+ end
48
53
  end
49
54
  end
50
55
  end
data/omnes.gemspec CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  MSG
18
18
  spec.homepage = "https://github.com/nebulab/omnes"
19
19
  spec.license = "MIT"
20
- spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
20
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
21
21
 
22
22
  spec.metadata["allowed_push_host"] = "https://rubygems.org"
23
23
 
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
36
36
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
37
37
  spec.require_paths = ["lib"]
38
38
 
39
- spec.add_development_dependency "activejob", "~> 7.0"
39
+ spec.add_development_dependency "activejob"
40
40
  spec.add_development_dependency "redcarpet", "~> 3.5"
41
41
  spec.add_development_dependency "sidekiq", "~> 6.4"
42
42
  spec.add_development_dependency "yard", "~> 0.9"
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc Busqué
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-19 00:00:00.000000000 Z
11
+ date: 2022-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '7.0'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '7.0'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: redcarpet
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -130,7 +130,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
130
130
  requirements:
131
131
  - - ">="
132
132
  - !ruby/object:Gem::Version
133
- version: 2.7.0
133
+ version: 2.5.0
134
134
  required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ">="