koine-event_manager 1.1 → 2.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
- SHA1:
3
- metadata.gz: 775de95f0d2768e1147c12eea5a66dd28fd23fee
4
- data.tar.gz: 6bb2f1ef07c98614d119a615769f67e318f32e77
2
+ SHA256:
3
+ metadata.gz: 264cee5964fb227323548961304f0a9110abb63da35ab855917a5b51076bd7b8
4
+ data.tar.gz: f664cfc5d29d7a21e7ffaae1b8888416e98cc7cde592b5074cf017bb7612d330
5
5
  SHA512:
6
- metadata.gz: 0c6b9922bd907cd760a065bb74a564142b6817881a213e52b0674535beb223b954eda7e418e389c101b71a29ffbde0ab7d3b98329318453a59d2e57e9d5896dc
7
- data.tar.gz: 7c653751ff81a31f53ec7267aa952225b61de01f50b9e1181a3b506cdd18e22270c3131e043ae25383e7c3a3a95b32bfacee96c317b1c077930711bd793b7ccd
6
+ metadata.gz: 8a4bb7a37ef2eea3783aacc8800e609888bfaa0c481d86696b85d952b3a5180f0a5875b9c66c4a5eb23f67057b1cecddd003ab7a125fe90f31b2f1ba39d97477
7
+ data.tar.gz: 1f60e42695cae9fa481d0ca6faa469c6bc59b0dd538a47d7987d9b01e7c016081672a436ef9cbba71db436b02b2f269a6962cbf0905fc87f0d8c8a6541eec91d
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,81 @@
1
+ require: rubocop-rspec
2
+
3
+ # https://github.com/rubocop-hq/rubocop/blob/36404b40cbdac743b596c8520877c4ca3eee5691/manual/cops.md
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 2.3
7
+ Exclude:
8
+ - config/environment.rb
9
+ - apps/web/application.rb
10
+ Layout/AlignParameters:
11
+ Enabled: false
12
+
13
+ Layout/ClosingParenthesisIndentation:
14
+ Enabled: false
15
+
16
+ Layout/FirstParameterIndentation:
17
+ Enabled: false
18
+
19
+ Layout/IndentHash:
20
+ Enabled: false
21
+
22
+ Layout/IndentArray:
23
+ Enabled: false
24
+
25
+ Layout/MultilineMethodCallIndentation:
26
+ Enabled: false
27
+
28
+ Layout/MultilineOperationIndentation:
29
+ Enabled: true
30
+ EnforcedStyle: indented
31
+
32
+ Lint/MissingCopEnableDirective:
33
+ Enabled: false
34
+
35
+ Style/BlockComments:
36
+ Enabled: false
37
+
38
+ Metrics/BlockLength:
39
+ Exclude:
40
+ - 'spec/**/*_spec.rb'
41
+
42
+ Metrics/LineLength:
43
+ Max: 100
44
+
45
+ Style/CommentedKeyword:
46
+ Enabled: false
47
+
48
+ Style/Documentation:
49
+ Enabled: false
50
+
51
+ Style/GuardClause:
52
+ Enabled: false
53
+
54
+ Style/IfUnlessModifier:
55
+ Enabled: false
56
+
57
+ Style/TrailingCommaInArrayLiteral:
58
+ EnforcedStyleForMultiline: comma
59
+
60
+ Style/TrailingCommaInHashLiteral:
61
+ EnforcedStyleForMultiline: comma
62
+
63
+ # rubocop-rspec cops
64
+
65
+ Capybara/FeatureMethods:
66
+ Enabled: false
67
+
68
+ FactoryBot/CreateList:
69
+ Enabled: false
70
+
71
+ RSpec/ExampleLength:
72
+ Enabled: false
73
+
74
+ RSpec/MessageSpies:
75
+ Enabled: false
76
+
77
+ RSpec/MultipleExpectations:
78
+ Enabled: false
79
+
80
+ RSpec/NestedGroups:
81
+ Enabled: false
data/.travis.yml CHANGED
@@ -1,9 +1,7 @@
1
1
  language: ruby
2
2
  cache: bundle
3
+ script:
4
+ - COVERALLS=1 bundle exec rake
3
5
  rvm:
4
- - 1.9.3
5
- - 2.0
6
- - 2.1
7
- - 2.2
8
- - 2.2
9
- before_install: gem install bundler -v 1.10.6
6
+ - 2.4.4
7
+ before_install: gem install bundler -v 1.16.3
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,13 +1,74 @@
1
- # Contributor Code of Conduct
1
+ # Contributor Covenant Code of Conduct
2
2
 
3
- As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
3
+ ## Our Pledge
4
4
 
5
- We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
6
11
 
7
- Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
12
+ ## Our Standards
8
13
 
9
- Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
10
16
 
11
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
12
22
 
13
- This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at marcelo.jacobus@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile CHANGED
@@ -1,4 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
+
3
7
  # Specify your gem's dependencies in koine-event_manager.gemspec
4
8
  gemspec
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015 Marcelo Jacobus
3
+ Copyright (c) 2015-2018 Marcelo Jacobus
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -3,10 +3,8 @@
3
3
  Event manager for ruby.
4
4
 
5
5
  [![Build Status](https://travis-ci.org/mjacobus/koine-event-manager.svg)](https://travis-ci.org/mjacobus/koine-event-manager)
6
- [![Code Coverage](https://scrutinizer-ci.com/g/mjacobus/koine-event-manager/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/mjacobus/koine-event-manager/?branch=master)
6
+ [![Coverage Status](https://coveralls.io/repos/github/mjacobus/koine-event-manager/badge.svg?branch=master)](https://coveralls.io/github/mjacobus/koine-event-manager?branch=master)
7
7
  [![Code Climate](https://codeclimate.com/github/mjacobus/koine-event-manager/badges/gpa.svg)](https://codeclimate.com/github/mjacobus/koine-event-manager)
8
- [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mjacobus/koine-event-manager/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mjacobus/koine-event-manager/?branch=master)
9
- [![Dependency Status](https://gemnasium.com/mjacobus/koine-event-manager.svg)](https://gemnasium.com/mjacobus/koine-event-manager)
10
8
  [![Gem Version](https://badge.fury.io/rb/koine-event_manager.svg)](https://badge.fury.io/rb/koine-event_manager)
11
9
 
12
10
  ## Installation
@@ -83,36 +81,21 @@ And trigger the event on the event manager
83
81
  event_manager.trigger(UserSignedIn.new(some_user))
84
82
  ```
85
83
 
86
- ## Adding event manager awareness to your classes
84
+ ### Subscribers
87
85
 
88
- **CAUTION**: This make use of the singleton instance of event manager.
89
- Singletons are usually a bad idea, so prefer dependency injection over
90
- singleton instances.
86
+ You can add and remove subscribers as follows:
91
87
 
92
88
  ```ruby
93
- require "koine/event_manager/event_manager_aware"
94
-
95
- class MyModel
96
- include Koine::EventManager::EventManagerAware
97
-
98
- def some_method
99
- event_manager.trigger(SomeEvent.new(foo: :bar))
89
+ class MySubscriber
90
+ def publish(event)
91
+ # do something
100
92
  end
101
93
  end
102
- ```
103
-
104
- The above is the same as:
105
94
 
106
- ```ruby
107
- class MyModel
108
- def some_method
109
- event_manager.trigger(SomeEvent.new(foo: :bar))
110
- end
95
+ subscriber = MySubscriber.new
111
96
 
112
- def event_manager
113
- Koine::EventManager::EventManager.instance
114
- end
115
- end
97
+ event_manager.subscribe(subscriber, to: UserListener)
98
+ event_manager.unsubscribe(subscriber, from: UserListener)
116
99
  ```
117
100
 
118
101
  ## Development
data/Rakefile CHANGED
@@ -1,27 +1,11 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
1
+ # frozen_string_literal: true
3
2
 
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << "spec"
6
- t.libs << "lib"
7
- t.test_files = FileList['spec/**/*_spec.rb']
8
- end
9
-
10
- namespace :test do
11
- task :coveralls do
12
- ENV["COVERALLS"] = "true"
13
- Rake::Task["test:coverage"].invoke
14
- end
3
+ require 'bundler/gem_tasks'
15
4
 
16
- task :coverage do
17
- ENV["COVERAGE"] = "true"
18
- Rake::Task["test"].invoke
19
- end
20
-
21
- task :scrutinizer do
22
- ENV["SCRUTINIZER"] = "true"
23
- Rake::Task["test"].invoke
24
- end
5
+ # rubocop:disable Lint/HandleExceptions
6
+ begin
7
+ require 'rspec/core/rake_task'
8
+ RSpec::Core::RakeTask.new(:spec)
9
+ task default: :spec
10
+ rescue LoadError
25
11
  end
26
-
27
- task :default => :test
data/bin/console CHANGED
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require "bundler/setup"
4
- require "koine/event_manager"
4
+ require 'bundler/setup'
5
+ require 'koine/event_manager'
5
6
 
6
7
  # You can add fixtures and/or initialization code here to make experimenting
7
8
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +11,5 @@ require "koine/event_manager"
10
11
  # require "pry"
11
12
  # Pry.start
12
13
 
13
- require "irb"
14
- IRB.start
14
+ require 'irb'
15
+ IRB.start(__FILE__)
data/bin/setup CHANGED
@@ -1,6 +1,7 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
  IFS=$'\n\t'
4
+ set -vx
4
5
 
5
6
  bundle install
6
7
 
@@ -1,36 +1,43 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'koine/event_manager/version'
5
6
 
7
+ # rubocop:disable Metrics/BlockLength
6
8
  Gem::Specification.new do |spec|
7
- spec.name = "koine-event_manager"
9
+ spec.name = 'koine-event_manager'
8
10
  spec.version = Koine::EventManager::VERSION
9
- spec.authors = ["Marcelo Jacobus"]
10
- spec.email = ["marcelo.jacobus@gmail.com"]
11
+ spec.authors = ['Marcelo Jacobus']
12
+ spec.email = ['marcelo.jacobus@gmail.com']
11
13
 
12
- spec.summary = %q{Event Manager for ruby}
13
- spec.description = %q{Event Manager for ruby}
14
- spec.homepage = "https://github.com/mjacobus/koine-event-manager"
15
- spec.license = "MIT"
14
+ spec.summary = 'Event Manager for ruby'
15
+ spec.description = 'Event Manager for ruby'
16
+ spec.homepage = 'https://github.com/mjacobus/koine-event-manager'
17
+ spec.license = 'MIT'
16
18
 
17
- # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
18
- # delete this section to allow pushing this gem to any host.
19
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
20
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
21
  if spec.respond_to?(:metadata)
20
- spec.metadata['allowed_push_host'] = "https://rubygems.org"
22
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
21
23
  else
22
- raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
24
+ raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
23
25
  end
24
26
 
25
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
- spec.bindir = "exe"
27
+ # Specify which files should be added to the gem when it is released.
28
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
29
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
30
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
31
+ end
32
+ spec.bindir = 'exe'
27
33
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
- spec.require_paths = ["lib"]
34
+ spec.require_paths = ['lib']
29
35
 
30
- spec.add_development_dependency "bundler", "~> 1.10"
31
- spec.add_development_dependency "rake", "~> 10.0"
32
- spec.add_development_dependency "minitest"
33
- spec.add_development_dependency "scrutinizer-ocular"
34
- spec.add_development_dependency "coveralls"
35
- spec.add_development_dependency "simplecov"
36
+ spec.add_development_dependency 'bundler', '~> 1.16'
37
+ spec.add_development_dependency 'coveralls'
38
+ spec.add_development_dependency 'rake', '~> 10.0'
39
+ spec.add_development_dependency 'rspec', '~> 3.0'
40
+ spec.add_development_dependency 'rubocop', '0.58'
41
+ spec.add_development_dependency 'rubocop-rspec', '~>1.30'
42
+ spec.add_development_dependency 'simplecov'
36
43
  end
@@ -1,6 +1,8 @@
1
- require "koine/event_manager/version"
2
- require "koine/event_manager/event_manager"
3
- require "koine/event_manager/event_listener"
1
+ # frozen_string_literal: true
2
+
3
+ require 'koine/event_manager/version'
4
+ require 'koine/event_manager/event_manager'
5
+ require 'koine/event_manager/event_listener'
4
6
 
5
7
  module Koine
6
8
  module EventManager
@@ -1,30 +1,64 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Koine
2
4
  module EventManager
3
5
  class EventListener
4
- def listen_to(event_name, &block)
5
- raise ArgumentError, "block not given" unless block_given?
6
- listeners_for(event_name) << block
6
+ def initialize
7
+ @listeners = {}
8
+ @subscribers = {}
9
+ end
10
+
11
+ def listen_to(event_type, &block)
12
+ raise ArgumentError, 'block not given' unless block_given?
13
+ add_listener(event_type, &block)
14
+ end
15
+
16
+ def subscribe(subscriber, to:)
17
+ @subscribers[subscriber] ||= []
18
+ @subscribers[subscriber] << to
19
+ end
20
+
21
+ def unsubscribe(subscriber, from:)
22
+ all = Array(subscribers[subscriber])
23
+ filtered = all.reject do |object_type|
24
+ object_type.to_s == from.to_s
25
+ end
26
+ subscribers[subscriber] = filtered
7
27
  end
8
28
 
9
29
  def trigger(event_object)
10
30
  listeners_for(event_object.class).each do |block|
11
31
  block.call(event_object)
12
32
  end
33
+
34
+ subscribers.each do |subscriber, events|
35
+ events.each do |event|
36
+ if event_object.class.ancestors.map(&:to_s).include?(event.to_s)
37
+ subscriber.publish(event_object)
38
+ end
39
+ end
40
+ end
13
41
  end
14
42
 
15
- def listeners_for(event)
16
- listeners[key_for(event)] ||= []
43
+ def listeners_for(event_type)
44
+ listeners.select do |class_or_object, _collection|
45
+ event_type.ancestors.map(&:to_s).include?(class_or_object.to_s)
46
+ end.values.flatten
17
47
  end
18
48
 
19
49
  private
20
50
 
51
+ def add_listener(event_type, &block)
52
+ listeners[event_type.to_s] ||= []
53
+ listeners[event_type.to_s] << block
54
+ end
55
+
21
56
  def key_for(object_or_class)
22
57
  object_or_class.to_s
23
58
  end
24
59
 
25
- def listeners
26
- @listeners ||= {}
27
- end
60
+ attr_reader :listeners
61
+ attr_reader :subscribers
28
62
  end
29
63
  end
30
64
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Koine
2
4
  module EventManager
3
5
  class EventManager
@@ -9,6 +11,14 @@ module Koine
9
11
  @internal_listener.listen_to(event, &block)
10
12
  end
11
13
 
14
+ def subscribe(subscriber, to:)
15
+ @internal_listener.subscribe(subscriber, to: to)
16
+ end
17
+
18
+ def unsubscribe(subscriber, from:)
19
+ @internal_listener.unsubscribe(subscriber, from: from)
20
+ end
21
+
12
22
  def attach_listener(listener)
13
23
  listeners << listener
14
24
  end
@@ -26,11 +36,7 @@ module Koine
26
36
  end
27
37
 
28
38
  def listeners
29
- @listners ||= []
30
- end
31
-
32
- def self.instance
33
- @@instance ||= new
39
+ @listeners ||= []
34
40
  end
35
41
  end
36
42
  end
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Koine
2
4
  module EventManager
3
- VERSION = "1.1"
5
+ VERSION = '2.1'
4
6
  end
5
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: koine-event_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.1'
4
+ version: '2.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcelo Jacobus
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-14 00:00:00.000000000 Z
11
+ date: 2018-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.10'
19
+ version: '1.16'
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: '1.10'
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: coveralls
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rake
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -39,47 +53,47 @@ dependencies:
39
53
  - !ruby/object:Gem::Version
40
54
  version: '10.0'
41
55
  - !ruby/object:Gem::Dependency
42
- name: minitest
56
+ name: rspec
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - ">="
59
+ - - "~>"
46
60
  - !ruby/object:Gem::Version
47
- version: '0'
61
+ version: '3.0'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - ">="
66
+ - - "~>"
53
67
  - !ruby/object:Gem::Version
54
- version: '0'
68
+ version: '3.0'
55
69
  - !ruby/object:Gem::Dependency
56
- name: scrutinizer-ocular
70
+ name: rubocop
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - ">="
73
+ - - '='
60
74
  - !ruby/object:Gem::Version
61
- version: '0'
75
+ version: '0.58'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - ">="
80
+ - - '='
67
81
  - !ruby/object:Gem::Version
68
- version: '0'
82
+ version: '0.58'
69
83
  - !ruby/object:Gem::Dependency
70
- name: coveralls
84
+ name: rubocop-rspec
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
- - - ">="
87
+ - - "~>"
74
88
  - !ruby/object:Gem::Version
75
- version: '0'
89
+ version: '1.30'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
- - - ">="
94
+ - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '0'
96
+ version: '1.30'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: simplecov
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -102,6 +116,8 @@ extensions: []
102
116
  extra_rdoc_files: []
103
117
  files:
104
118
  - ".gitignore"
119
+ - ".rspec"
120
+ - ".rubocop.yml"
105
121
  - ".scrutinizer.yml"
106
122
  - ".travis.yml"
107
123
  - CODE_OF_CONDUCT.md
@@ -115,7 +131,6 @@ files:
115
131
  - lib/koine/event_manager.rb
116
132
  - lib/koine/event_manager/event_listener.rb
117
133
  - lib/koine/event_manager/event_manager.rb
118
- - lib/koine/event_manager/event_manager_aware.rb
119
134
  - lib/koine/event_manager/version.rb
120
135
  homepage: https://github.com/mjacobus/koine-event-manager
121
136
  licenses:
@@ -138,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
153
  version: '0'
139
154
  requirements: []
140
155
  rubyforge_project:
141
- rubygems_version: 2.4.6
156
+ rubygems_version: 2.7.6
142
157
  signing_key:
143
158
  specification_version: 4
144
159
  summary: Event Manager for ruby
@@ -1,13 +0,0 @@
1
- module Koine
2
- module EventManager
3
- module EventManagerAware
4
- def self.included(klass)
5
- klass.instance_eval do
6
- define_method "event_manager" do
7
- Koine::EventManager::EventManager.instance
8
- end
9
- end
10
- end
11
- end
12
- end
13
- end