legion-transport 1.1.0 → 1.1.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23110a16613b190d497bcb383a75dd1aca13738de4ddd763d8ff440799b55df2
|
4
|
+
data.tar.gz: be0dbbf93249755160eb91cc3623991c10766113b9983c71d6e73f999f94da46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 730efb3ba398744f7009f1c219bed8308cb48e95d493b5b0b0bdf67c2a1aadeba94fff05971069a558d1c0c3eaaa8ab554ebe37947313e79476cf4bf810239b6
|
7
|
+
data.tar.gz: 54cf748aa90416a169a6344f02c0e7475c755c3b1f54167ced4d6045816e2e9d68f0bab3389a4f88c0286d7ec434103e9abb53095225f654cbc3b55c6b3650e4
|
data/.idea/legion-transport.iml
CHANGED
@@ -12,17 +12,17 @@
|
|
12
12
|
<orderEntry type="library" scope="PROVIDED" name="amq-protocol (v2.3.2, RVM: ruby-2.7.0) [gem]" level="application" />
|
13
13
|
<orderEntry type="library" scope="PROVIDED" name="ast (v2.4.1, RVM: ruby-2.7.0) [gem]" level="application" />
|
14
14
|
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.1.4, RVM: ruby-2.7.0) [gem]" level="application" />
|
15
|
-
<orderEntry type="library" scope="PROVIDED" name="bunny (v2.
|
15
|
+
<orderEntry type="library" scope="PROVIDED" name="bunny (v2.16.1, RVM: ruby-2.7.0) [gem]" level="application" />
|
16
16
|
<orderEntry type="library" scope="PROVIDED" name="chef (v16.1.0, RVM: ruby-2.7.0) [gem]" level="application" />
|
17
|
-
<orderEntry type="library" scope="PROVIDED" name="codecov (v0.2.
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="codecov (v0.2.6, RVM: ruby-2.7.0) [gem]" level="application" />
|
18
18
|
<orderEntry type="library" scope="PROVIDED" name="colorize (v0.8.1, RVM: ruby-2.7.0) [gem]" level="application" />
|
19
|
-
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.
|
19
|
+
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.7, RVM: ruby-2.7.0) [gem]" level="application" />
|
20
20
|
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.4.4, RVM: ruby-2.7.0) [gem]" level="application" />
|
21
21
|
<orderEntry type="library" scope="PROVIDED" name="docile (v1.3.2, RVM: ruby-2.7.0) [gem]" level="application" />
|
22
22
|
<orderEntry type="library" scope="PROVIDED" name="json (v2.3.1, RVM: ruby-2.7.0) [gem]" level="application" />
|
23
23
|
<orderEntry type="library" scope="PROVIDED" name="legion-json (v1.1.0, RVM: ruby-2.7.0) [gem]" level="application" />
|
24
|
-
<orderEntry type="library" scope="PROVIDED" name="legion-logging (v1.
|
25
|
-
<orderEntry type="library" scope="PROVIDED" name="legion-settings (v1.1.
|
24
|
+
<orderEntry type="library" scope="PROVIDED" name="legion-logging (v1.1.0, RVM: ruby-2.7.0) [gem]" level="application" />
|
25
|
+
<orderEntry type="library" scope="PROVIDED" name="legion-settings (v1.1.1, RVM: ruby-2.7.0) [gem]" level="application" />
|
26
26
|
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.15.0, RVM: ruby-2.7.0) [gem]" level="application" />
|
27
27
|
<orderEntry type="library" scope="PROVIDED" name="parallel (v1.19.2, RVM: ruby-2.7.0) [gem]" level="application" />
|
28
28
|
<orderEntry type="library" scope="PROVIDED" name="parser (v2.7.1.4, RVM: ruby-2.7.0) [gem]" level="application" />
|
@@ -36,10 +36,10 @@
|
|
36
36
|
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.9.1, RVM: ruby-2.7.0) [gem]" level="application" />
|
37
37
|
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.9.3, RVM: ruby-2.7.0) [gem]" level="application" />
|
38
38
|
<orderEntry type="library" scope="PROVIDED" name="rspec_junit_formatter (v0.4.1, RVM: ruby-2.7.0) [gem]" level="application" />
|
39
|
-
<orderEntry type="library" scope="PROVIDED" name="rubocop (v0.
|
39
|
+
<orderEntry type="library" scope="PROVIDED" name="rubocop (v0.89.1, RVM: ruby-2.7.0) [gem]" level="application" />
|
40
40
|
<orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v0.2.0, RVM: ruby-2.7.0) [gem]" level="application" />
|
41
41
|
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.10.1, RVM: ruby-2.7.0) [gem]" level="application" />
|
42
|
-
<orderEntry type="library" scope="PROVIDED" name="simplecov (v0.
|
42
|
+
<orderEntry type="library" scope="PROVIDED" name="simplecov (v0.19.0, RVM: ruby-2.7.0) [gem]" level="application" />
|
43
43
|
<orderEntry type="library" scope="PROVIDED" name="simplecov-html (v0.12.2, RVM: ruby-2.7.0) [gem]" level="application" />
|
44
44
|
<orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v1.7.0, RVM: ruby-2.7.0) [gem]" level="application" />
|
45
45
|
</component>
|
@@ -28,12 +28,18 @@ module Legion
|
|
28
28
|
|
29
29
|
def encode_message
|
30
30
|
message_payload = message
|
31
|
-
message_payload = Legion::JSON.dump(message_payload)
|
32
|
-
|
33
|
-
|
31
|
+
message_payload = Legion::JSON.dump(message_payload) unless message_payload.is_a? String
|
32
|
+
|
33
|
+
if encrypt?
|
34
|
+
encrypted = Legion::Crypt.encrypt(message_payload)
|
35
|
+
headers[:iv] = encrypted[:iv]
|
36
|
+
@options[:content_encoding] = 'encrypted/cs'
|
37
|
+
return encrypted[:enciphered_message]
|
38
|
+
else
|
39
|
+
@options[:content_encoding] = 'identity'
|
40
|
+
end
|
34
41
|
|
35
|
-
|
36
|
-
encrypt_message(message_payload)
|
42
|
+
message_payload
|
37
43
|
end
|
38
44
|
|
39
45
|
def encrypt_message(message, _type = 'cs')
|
@@ -41,7 +47,7 @@ module Legion
|
|
41
47
|
end
|
42
48
|
|
43
49
|
def encrypt?
|
44
|
-
Legion::Settings[:transport][:messages][:encrypt]
|
50
|
+
Legion::Settings[:transport][:messages][:encrypt] && Legion::Settings[:crypt][:cs_encrypt_ready]
|
45
51
|
end
|
46
52
|
|
47
53
|
def exchange_name
|
@@ -7,9 +7,10 @@ module Legion::Transport::Messages # rubocop:disable Style/ClassAndModuleChildre
|
|
7
7
|
def message
|
8
8
|
{ function: 'push_cluster_secret',
|
9
9
|
node_name: Legion::Settings[:client][:name],
|
10
|
-
queue_name: "node.#{Legion::Settings[
|
10
|
+
queue_name: "node.#{Legion::Settings[:client][:name]}",
|
11
11
|
runner_class: 'Legion::Extensions::Node::Runners::Crypt',
|
12
|
-
public_key: Base64.encode64(Legion::Crypt.public_key) }
|
12
|
+
# public_key: Base64.encode64(Legion::Crypt.public_key) }
|
13
|
+
public_key: Legion::Crypt.public_key }
|
13
14
|
end
|
14
15
|
|
15
16
|
def exchange
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: legion-transport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esity
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|