jackhammer 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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/jackhammer.rb +9 -0
- data/lib/jackhammer/topic.rb +1 -2
- data/lib/jackhammer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3233e5bc59da2462018ba8fce8316c164a98b67de74febd54adb5eb947ea791
|
4
|
+
data.tar.gz: 1cc3cc86e29fd9f053b35be5ccfb5b3e60c0a6513f049d39c7c725fdf2cc103d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d35d51ed2ed012671cd41035f417e161d5ecdb1c44a01e6c27c0c880e967de30d5c04900a517cddceb93987e7f4ad091e07e11a1b62a09f6893d70d2a8f86c88
|
7
|
+
data.tar.gz: 85720d119ebbde35fbb0f05fb57058f7afe8251f7942891ccfd8765503cd022cb2ea3a376ac73cb978dda66dc16358b9462884e1589d46e218d41b3346065dc3
|
data/Gemfile.lock
CHANGED
data/lib/jackhammer.rb
CHANGED
@@ -37,5 +37,14 @@ module Jackhammer
|
|
37
37
|
def topics
|
38
38
|
@topics ||= TopicManager.topics
|
39
39
|
end
|
40
|
+
|
41
|
+
def publish_options(options = {}, time: Time.now.utc)
|
42
|
+
configuration.publish_options.dup.merge(options).tap do |opts|
|
43
|
+
opts[:timestamp] = time.to_i
|
44
|
+
opts[:app_id] ||= configuration.app_name
|
45
|
+
opts[:headers] ||= {}
|
46
|
+
opts[:headers][:time] ||= time.iso8601
|
47
|
+
end
|
48
|
+
end
|
40
49
|
end
|
41
50
|
end
|
data/lib/jackhammer/topic.rb
CHANGED
@@ -15,8 +15,7 @@ module Jackhammer
|
|
15
15
|
# We're expecting the client to specify at least the routing_key in options
|
16
16
|
# for each message published.
|
17
17
|
def publish(message, options)
|
18
|
-
|
19
|
-
topic.publish message, full_options
|
18
|
+
topic.publish message, Jackhammer.publish_options(options)
|
20
19
|
end
|
21
20
|
|
22
21
|
def queues
|
data/lib/jackhammer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jackhammer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Serok
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|