signal 1.2.0 → 1.3.0

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: 377390777df52ac155d1c57d345eb6ca0724fa37a6263a4b71eae40410e134cf
4
- data.tar.gz: 19bacbd93f6dfaa9cdc40d5ca309316fe5e6579c43f9b78cd58bde8cb0258af9
3
+ metadata.gz: b9b02225af7234c06c7bdca60c54ca2bc5bd7b56760350fb52c603dcfcd9c6fc
4
+ data.tar.gz: 6ae6ad7189173f3eef745a12b0bba61444a00b6ed6da7680848d8fdfa26c9214
5
5
  SHA512:
6
- metadata.gz: de9c09ac79e17d4d81f39d05182fd4a59d38e6beb275cda6eb63d1dc3da586d98340407332ec815085d5848cb55f35a0f147e9d72bb7ea514a46443a5c7c2125
7
- data.tar.gz: 3a87059e3e2cb9b62fb728c1dfad67fa7b7fb128776854530939af10aa2aa5957e3defd75895f203f6befe152a4ce50aae6e78e33afa52988eeaf41c91b51ce8
6
+ metadata.gz: aba54da3377c2f2eb8eca0d87edc44599dccb195259bf75949008cd17b780f7d2ad9fbce0e54aac6b3e2fd63e0bf61e86f02ad1e02e4bd4b5ba9c6a96baa74c9
7
+ data.tar.gz: b7be39534802b24399c9d732c7af050447b66ac5fff04abd6ee66f46f54324e6e6f636c2d84b62c0f20c490fc471484d3ee86e6f5faca3b833d5a8d17761fcdf
@@ -0,0 +1,3 @@
1
+ ---
2
+ github: [fnando]
3
+ custom: ["https://www.paypal.me/nandovieira/🍕"]
data/.rubocop.yml CHANGED
@@ -4,9 +4,9 @@ inherit_gem:
4
4
 
5
5
  AllCops:
6
6
  TargetRubyVersion: 2.7
7
+ Exclude:
8
+ - vendor/**/*
9
+ - gemfiles/**/*
7
10
 
8
- Metrics/AbcSize:
9
- Enabled: false
10
-
11
- Metrics/MethodLength:
11
+ Metrics:
12
12
  Enabled: false
data/.travis.yml CHANGED
@@ -3,13 +3,16 @@ cache: bundler
3
3
  sudo: false
4
4
  script: bundle exec rake
5
5
  rvm:
6
- - 2.4.2
6
+ - 2.7.1
7
+ - 2.6.2
7
8
  before_script:
8
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
9
- - chmod +x ./cc-test-reporter
10
- - "./cc-test-reporter before-build"
9
+ - "curl -L
10
+ https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
11
+ > ./cc-test-reporter"
12
+ - chmod +x ./cc-test-reporter
13
+ - "./cc-test-reporter before-build"
11
14
  after_script:
12
- - "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"
15
+ - "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"
13
16
  notifications:
14
17
  email: false
15
18
  env:
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # Signal
2
2
 
3
- [![Build Status](https://travis-ci.org/fnando/signal.svg?branch=master)](https://travis-ci.org/fnando/signal)
3
+ [![Build Status](https://travis-ci.org/fnando/signal.svg?branch=main)](https://travis-ci.org/fnando/signal)
4
4
  [![Code Climate](https://codeclimate.com/github/fnando/signal/badges/gpa.svg)](https://codeclimate.com/github/fnando/signal)
5
5
  [![Test Coverage](https://codeclimate.com/github/fnando/signal/badges/coverage.svg)](https://codeclimate.com/github/fnando/signal)
6
+ [![Gem](https://img.shields.io/gem/v/signal.svg)](https://rubygems.org/gems/signal)
7
+ [![Gem](https://img.shields.io/gem/dt/signal.svg)](https://rubygems.org/gems/signal)
6
8
 
7
9
  A simple observer implementation on POROs (Plain Old Ruby Object) and
8
10
  ActiveRecord objects.
data/Rakefile CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "bundler/gem_tasks"
4
4
  require "rake/testtask"
5
+ require "rubocop/rake_task"
5
6
 
6
7
  Rake::TestTask.new(:test) do |t|
7
8
  t.libs << "test"
@@ -9,4 +10,6 @@ Rake::TestTask.new(:test) do |t|
9
10
  t.warning = false
10
11
  end
11
12
 
12
- task default: :test
13
+ RuboCop::RakeTask.new
14
+
15
+ task default: %i[test rubocop]
@@ -13,8 +13,8 @@ module Signal
13
13
  end
14
14
 
15
15
  module ClassMethods
16
- def call(*args)
17
- new(*args).tap do |instance|
16
+ def call(*args, **kwargs)
17
+ new(*args, **kwargs).tap do |instance|
18
18
  yield(instance) if block_given?
19
19
  instance.call
20
20
  end
data/lib/signal/mock.rb CHANGED
@@ -30,7 +30,7 @@ module Signal
30
30
  end
31
31
 
32
32
  private def received_event?(event, count)
33
- received_calls = calls.select {|call| call[:event] == event }.size
33
+ received_calls = calls.count {|call| call[:event] == event }
34
34
 
35
35
  return received_calls.nonzero? if count == -1
36
36
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Signal
4
- VERSION = "1.2.0"
4
+ VERSION = "1.3.0"
5
5
  end
data/signal.gemspec CHANGED
@@ -13,8 +13,9 @@ Gem::Specification.new do |spec|
13
13
  ].join(" ")
14
14
  spec.summary = spec.description
15
15
  spec.homepage = "http://github.com/fnando/signal"
16
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
16
17
 
17
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
19
  f.match(%r{^(test|spec|features)/})
19
20
  end
20
21
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-24 00:00:00.000000000 Z
11
+ date: 2021-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -130,6 +130,7 @@ executables: []
130
130
  extensions: []
131
131
  extra_rdoc_files: []
132
132
  files:
133
+ - ".github/FUNDING.yml"
133
134
  - ".gitignore"
134
135
  - ".rubocop.yml"
135
136
  - ".travis.yml"
@@ -154,7 +155,7 @@ files:
154
155
  homepage: http://github.com/fnando/signal
155
156
  licenses: []
156
157
  metadata: {}
157
- post_install_message:
158
+ post_install_message:
158
159
  rdoc_options: []
159
160
  require_paths:
160
161
  - lib
@@ -162,15 +163,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
163
  requirements:
163
164
  - - ">="
164
165
  - !ruby/object:Gem::Version
165
- version: '0'
166
+ version: 2.7.0
166
167
  required_rubygems_version: !ruby/object:Gem::Requirement
167
168
  requirements:
168
169
  - - ">="
169
170
  - !ruby/object:Gem::Version
170
171
  version: '0'
171
172
  requirements: []
172
- rubygems_version: 3.1.2
173
- signing_key:
173
+ rubygems_version: 3.2.32
174
+ signing_key:
174
175
  specification_version: 4
175
176
  summary: A simple observer implementation for POROs (Plain Old Ruby Object) and ActiveRecord
176
177
  objects.