pushyd 0.28.0 → 0.29.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/defaults.yml +17 -7
- data/lib/pushyd/consumer.rb +6 -0
- data/lib/pushyd/proxy.rb +2 -2
- data/lib/pushyd/shouter.rb +1 -0
- data/pushyd.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a749a292924095ab9fec8a08f289af5fa6a16b53
|
4
|
+
data.tar.gz: ed181381859547eb6912b00bb52cf8cf36661247
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f7d19606c8bac6f49177b03d7ac978ca957131008eb31cdbddcdb8cfdf77475dcb42efdb2755f0a4ea47dddb9bd5890461915ba48bc09aa2a29e8f30a117fcd
|
7
|
+
data.tar.gz: 35d995274060434296d2a4bdd298129b999eba4de30b8d3f18d7aeab77ef649e1e3fcaca18bc25ded0ea6675043f32654d02b4593a47e99b7bb2d12884d55b58
|
data/defaults.yml
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
# common defaults
|
2
|
+
daemonize: true
|
3
|
+
|
2
4
|
broker: amqp://guest:guest@localhost:5672/%2F
|
3
5
|
|
4
6
|
logs:
|
@@ -36,12 +38,20 @@ rollbar:
|
|
36
38
|
# topic: proxy
|
37
39
|
# keys: proxy.#
|
38
40
|
# keys: proxy.key1, proxy.key2, proxy.key3
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
# keys: "proxy.#"
|
44
|
-
# keys: "proxy.#"
|
41
|
+
# keys:
|
42
|
+
# - proxy.key1
|
43
|
+
# - proxy.key2
|
44
|
+
# - proxy.key3
|
45
45
|
# subscribe: false
|
46
|
-
#
|
46
|
+
# relay: http://target-host.com/url
|
47
|
+
# sign:
|
48
|
+
# method: hmac-kong
|
49
|
+
# user: brice+2@wildmoka.com
|
50
|
+
# secret: g9WoMkz0cp4C
|
51
|
+
# headers:
|
52
|
+
# - date
|
53
|
+
# - content-md5
|
54
|
+
# headers:
|
55
|
+
# Authorization: none
|
56
|
+
# SampleHeader: header-value
|
47
57
|
|
data/lib/pushyd/consumer.rb
CHANGED
@@ -86,6 +86,12 @@ module PushyDaemon
|
|
86
86
|
user_agent: BmcDaemonLib::Conf.generate_user_agent,
|
87
87
|
}
|
88
88
|
|
89
|
+
# Set custom headers if provided
|
90
|
+
@rule[:headers].each do |header_name, header_value|
|
91
|
+
log_debug "set header [#{header_name}] to [#{header_value}]"
|
92
|
+
headers[header_name] = header_value.to_s
|
93
|
+
end if @rule[:headers].is_a? Enumerable
|
94
|
+
|
89
95
|
# Compute: payload MD5, HMAC signature
|
90
96
|
headers_md5 headers, request_body
|
91
97
|
headers_sign headers, @rule[:sign]
|
data/lib/pushyd/proxy.rb
CHANGED
@@ -106,8 +106,8 @@ module PushyDaemon
|
|
106
106
|
end
|
107
107
|
|
108
108
|
# Check we have a topic and at least one routing key
|
109
|
-
fail BmcDaemonLib::MqConsumerError, "rule [#{rule_name}]
|
110
|
-
fail BmcDaemonLib::MqConsumerError, "rule [#{rule_name}]
|
109
|
+
fail BmcDaemonLib::MqConsumerError, "rule [#{rule_name}]: missing topic" unless rule_topic
|
110
|
+
fail BmcDaemonLib::MqConsumerError, "rule [#{rule_name}]: missing keys" if rule_keys.empty?
|
111
111
|
|
112
112
|
# Build a new consumer on its own channel
|
113
113
|
channel = @conn.create_channel
|
data/lib/pushyd/shouter.rb
CHANGED
data/pushyd.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pushyd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.29.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bruno MEDICI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|