wisper-activejob-broadcaster 0.1.1 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +4 -1
- data/.semaphore/semaphore.yml +16 -0
- data/Gemfile.lock +55 -0
- data/lib/wisper/activejob/broadcaster/version.rb +1 -1
- data/lib/wisper/activejob/broadcaster.rb +11 -1
- data/wisper-activejob-broadcaster.gemspec +2 -2
- metadata +15 -15
- data/.travis.yml +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1284fc9112871e906cb0ff7acc4f49a54d6d4866fb23acbcef202d31266454e7
|
4
|
+
data.tar.gz: 13ea4ab7e4f5426dae02de27f5e5a76c498234ef05404f9ead13cc045c22bd79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54cac815655a8a5a33d2199efdcae01300982c249b2e1ba8ced0c1bf69fd6f60ad6de4b34eba3e767fdb03acce0d1bcf04f747cd2d757d760ee96699d77828fd
|
7
|
+
data.tar.gz: 6e4ce5bc06344ff61440264bb4170b22ea4a392637246039d56a2aed2950b5cf8d01b092dfbd5a866f1abb79cf81e857d0353bebba54a575a2a5b9c76f9f34eb
|
data/.gitignore
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
version: v1.0
|
2
|
+
name: Ruby
|
3
|
+
agent:
|
4
|
+
machine:
|
5
|
+
type: e1-standard-2
|
6
|
+
os_image: ubuntu2004
|
7
|
+
blocks:
|
8
|
+
- name: bundle exec rspec
|
9
|
+
task:
|
10
|
+
jobs:
|
11
|
+
- name: bundle install
|
12
|
+
commands:
|
13
|
+
- checkout
|
14
|
+
- sem-version ruby 3.0.3
|
15
|
+
- bundle install --deployment --path vendor/bundle
|
16
|
+
- bundle exec rspec
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
wisper-activejob-broadcaster (0.2.1)
|
5
|
+
activejob
|
6
|
+
wisper
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
activejob (7.0.1)
|
12
|
+
activesupport (= 7.0.1)
|
13
|
+
globalid (>= 0.3.6)
|
14
|
+
activesupport (7.0.1)
|
15
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
|
+
i18n (>= 1.6, < 2)
|
17
|
+
minitest (>= 5.1)
|
18
|
+
tzinfo (~> 2.0)
|
19
|
+
concurrent-ruby (1.1.9)
|
20
|
+
diff-lcs (1.5.0)
|
21
|
+
globalid (1.0.0)
|
22
|
+
activesupport (>= 5.0)
|
23
|
+
i18n (1.8.11)
|
24
|
+
concurrent-ruby (~> 1.0)
|
25
|
+
minitest (5.15.0)
|
26
|
+
rake (13.0.6)
|
27
|
+
rspec (3.10.0)
|
28
|
+
rspec-core (~> 3.10.0)
|
29
|
+
rspec-expectations (~> 3.10.0)
|
30
|
+
rspec-mocks (~> 3.10.0)
|
31
|
+
rspec-core (3.10.1)
|
32
|
+
rspec-support (~> 3.10.0)
|
33
|
+
rspec-expectations (3.10.1)
|
34
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
35
|
+
rspec-support (~> 3.10.0)
|
36
|
+
rspec-mocks (3.10.2)
|
37
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
38
|
+
rspec-support (~> 3.10.0)
|
39
|
+
rspec-support (3.10.3)
|
40
|
+
tzinfo (2.0.4)
|
41
|
+
concurrent-ruby (~> 1.0)
|
42
|
+
wisper (2.0.1)
|
43
|
+
|
44
|
+
PLATFORMS
|
45
|
+
x86_64-darwin-20
|
46
|
+
x86_64-linux
|
47
|
+
|
48
|
+
DEPENDENCIES
|
49
|
+
bundler (~> 2.1)
|
50
|
+
rake (>= 12.3.3)
|
51
|
+
rspec
|
52
|
+
wisper-activejob-broadcaster!
|
53
|
+
|
54
|
+
BUNDLED WITH
|
55
|
+
2.2.25
|
@@ -5,7 +5,17 @@ module Wisper
|
|
5
5
|
module Broadcasters
|
6
6
|
class ActiveJobBroadcaster
|
7
7
|
def broadcast(subscriber, _publisher, event, args)
|
8
|
-
subscriber.class.perform_later(event, args)
|
8
|
+
subscriber.class.perform_later(event, args) if perform?(subscriber, event, args)
|
9
|
+
end
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def perform?(subscriber, event, args)
|
14
|
+
# If a predicate method of the format "event_name?" is defined on the subscriber, only run
|
15
|
+
# the subscriber if it evaluates to true
|
16
|
+
return subscriber.send("#{event}?", *args) if subscriber.respond_to?("#{event}?")
|
17
|
+
|
18
|
+
true
|
9
19
|
end
|
10
20
|
end
|
11
21
|
end
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_runtime_dependency "wisper"
|
22
22
|
spec.add_runtime_dependency "activejob"
|
23
23
|
|
24
|
-
spec.add_development_dependency "bundler", "~> 1
|
25
|
-
spec.add_development_dependency "rake", "
|
24
|
+
spec.add_development_dependency "bundler", "~> 2.1"
|
25
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
26
26
|
spec.add_development_dependency "rspec"
|
27
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wisper-activejob-broadcaster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BetterUp Developers
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: wisper
|
@@ -44,28 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1
|
47
|
+
version: '2.1'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1
|
54
|
+
version: '2.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 12.3.3
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 12.3.3
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
description:
|
83
|
+
description:
|
84
84
|
email:
|
85
85
|
- developers@betterup.co
|
86
86
|
executables: []
|
@@ -89,8 +89,9 @@ extra_rdoc_files: []
|
|
89
89
|
files:
|
90
90
|
- ".gitignore"
|
91
91
|
- ".rspec"
|
92
|
-
- ".
|
92
|
+
- ".semaphore/semaphore.yml"
|
93
93
|
- Gemfile
|
94
|
+
- Gemfile.lock
|
94
95
|
- README.md
|
95
96
|
- Rakefile
|
96
97
|
- bin/console
|
@@ -102,7 +103,7 @@ homepage: https://github.com/betterup/wisper-activejob-broadcaster
|
|
102
103
|
licenses:
|
103
104
|
- MIT
|
104
105
|
metadata: {}
|
105
|
-
post_install_message:
|
106
|
+
post_install_message:
|
106
107
|
rdoc_options: []
|
107
108
|
require_paths:
|
108
109
|
- lib
|
@@ -117,9 +118,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
118
|
- !ruby/object:Gem::Version
|
118
119
|
version: '0'
|
119
120
|
requirements: []
|
120
|
-
|
121
|
-
|
122
|
-
signing_key:
|
121
|
+
rubygems_version: 3.2.25
|
122
|
+
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: Broadcast wisper events into activejob queues
|
125
125
|
test_files: []
|
data/.travis.yml
DELETED