party_bus 0.3.0 → 0.4.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: '0110038615068e66e523892618e01699781d171dba48ff9c3cde8e848da5e733'
4
- data.tar.gz: 52030ca8f0099a88f91f999edc5ecc4034cd195862c61789b7ad2a58a0d3eff9
3
+ metadata.gz: c484de78eda6cdad24bcbe12acc92afb139ebf046aa91539944e83568a68759b
4
+ data.tar.gz: 638499cd363796d5b93c801e5ed20b3e0e0781acb812253d3fec43fa9952a2f3
5
5
  SHA512:
6
- metadata.gz: 8690c05498ce9aa66a0b6d83a0c9f1eb7dfc307c927debde799d1d4750797da8d98c588d735dd833587dd09dd988fc30a6428a420315a3a9b6915e2f888b34af
7
- data.tar.gz: 40202ab15c221fb616e27b5a6769b52188d3c5250d7c8aae08e8d2a09406eea0ab1696392f9ea5a3ea7da75813fd0d4698c45230b1d776b76c53bf65915af8fb
6
+ metadata.gz: 1c7cb41f8793bf7a5ae6196dae85459dc94f50636a8e19070f78e93426aa2201a26041aa03aa7aad7a6a6832131b2b054956bc744bfed16d38d101732c7cfe09
7
+ data.tar.gz: 3b3110e0ab2e70e21e57622da6fae956d442f22e6ce2e2c470f419aa5a837562ee8657c78d9aafeb09885aacd9f3629a94cf7bc9ec49399cc02594d44ae7f547
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- party_bus (0.3.0)
4
+ party_bus (0.4.0)
5
5
  activerecord (>= 6.0, <= 8.0)
6
6
  after_do (~> 0.4.0)
7
7
  httparty (~> 0.20.0)
@@ -9,21 +9,21 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activemodel (7.0.3.1)
13
- activesupport (= 7.0.3.1)
14
- activerecord (7.0.3.1)
15
- activemodel (= 7.0.3.1)
16
- activesupport (= 7.0.3.1)
17
- activesupport (7.0.3.1)
12
+ activemodel (7.0.4.3)
13
+ activesupport (= 7.0.4.3)
14
+ activerecord (7.0.4.3)
15
+ activemodel (= 7.0.4.3)
16
+ activesupport (= 7.0.4.3)
17
+ activesupport (7.0.4.3)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (>= 1.6, < 2)
20
20
  minitest (>= 5.1)
21
21
  tzinfo (~> 2.0)
22
- addressable (2.8.0)
23
- public_suffix (>= 2.0.2, < 5.0)
22
+ addressable (2.8.1)
23
+ public_suffix (>= 2.0.2, < 6.0)
24
24
  after_do (0.4.0)
25
25
  byebug (11.1.3)
26
- concurrent-ruby (1.1.10)
26
+ concurrent-ruby (1.2.2)
27
27
  crack (0.4.5)
28
28
  rexml
29
29
  diff-lcs (1.5.0)
@@ -36,29 +36,29 @@ GEM
36
36
  concurrent-ruby (~> 1.0)
37
37
  mime-types (3.4.1)
38
38
  mime-types-data (~> 3.2015)
39
- mime-types-data (3.2022.0105)
40
- minitest (5.16.3)
39
+ mime-types-data (3.2023.0218.1)
40
+ minitest (5.18.0)
41
41
  multi_xml (0.6.0)
42
- pg (1.4.3)
43
- public_suffix (4.0.7)
42
+ pg (1.4.6)
43
+ public_suffix (5.0.1)
44
44
  rake (12.3.3)
45
45
  rexml (3.2.5)
46
- rspec (3.10.0)
47
- rspec-core (~> 3.10.0)
48
- rspec-expectations (~> 3.10.0)
49
- rspec-mocks (~> 3.10.0)
50
- rspec-core (3.10.1)
51
- rspec-support (~> 3.10.0)
52
- rspec-expectations (3.10.2)
46
+ rspec (3.12.0)
47
+ rspec-core (~> 3.12.0)
48
+ rspec-expectations (~> 3.12.0)
49
+ rspec-mocks (~> 3.12.0)
50
+ rspec-core (3.12.1)
51
+ rspec-support (~> 3.12.0)
52
+ rspec-expectations (3.12.2)
53
53
  diff-lcs (>= 1.2.0, < 2.0)
54
- rspec-support (~> 3.10.0)
55
- rspec-mocks (3.10.2)
54
+ rspec-support (~> 3.12.0)
55
+ rspec-mocks (3.12.4)
56
56
  diff-lcs (>= 1.2.0, < 2.0)
57
- rspec-support (~> 3.10.0)
58
- rspec-support (3.10.3)
59
- tzinfo (2.0.5)
57
+ rspec-support (~> 3.12.0)
58
+ rspec-support (3.12.0)
59
+ tzinfo (2.0.6)
60
60
  concurrent-ruby (~> 1.0)
61
- webmock (3.14.0)
61
+ webmock (3.18.1)
62
62
  addressable (>= 2.8.0)
63
63
  crack (>= 0.3.2)
64
64
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -4,17 +4,15 @@ module PartyBus
4
4
  def self.perform_using(
5
5
  connection_id:,
6
6
  payload:,
7
- resource_action:,
8
- resource_type:,
9
- timestamp: Time.now
7
+ timestamp: Time.now,
8
+ topic:
10
9
  )
11
- new(connection_id, payload, resource_type, resource_action, timestamp).perform
10
+ new(connection_id, payload, topic, timestamp).perform
12
11
  end
13
12
 
14
- def initialize(connection_id, payload, resource_type, resource_action, timestamp)
13
+ def initialize(connection_id, payload, topic, timestamp)
15
14
  @connection_id = connection_id
16
- @resource_type = resource_type
17
- @resource_action = resource_action
15
+ @topic = topic
18
16
  @payload = payload
19
17
  @timestamp = timestamp
20
18
  end
@@ -24,8 +22,7 @@ module PartyBus
24
22
  body: {
25
23
  event: {
26
24
  payload: @payload,
27
- resource_action: @resource_action,
28
- resource_type: @resource_type
25
+ topic: @topic,
29
26
  }
30
27
  },
31
28
  path: "/api/v1/connections/#{@connection_id}/events",
@@ -49,8 +49,7 @@ module Publishable
49
49
  {
50
50
  connection_id: pb_connection_id,
51
51
  payload: pb_payload,
52
- resource_type: pb_resource_name,
53
- resource_action: action,
52
+ topic: "#{pb_resource_name}.#{action}"
54
53
  }
55
54
  end
56
55
 
@@ -1,3 +1,3 @@
1
1
  module PartyBus
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: party_bus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - corey jergensen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-24 00:00:00.000000000 Z
11
+ date: 2023-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: after_do