lex-node 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +29 -39
- data/{legion-extensions-node.gemspec → lex-node.gemspec} +4 -2
- data/lib/legion/extensions/node.rb +1 -2
- data/lib/legion/extensions/node/actors/beat.rb +1 -1
- data/lib/legion/extensions/node/runners/crypt.rb +8 -8
- data/lib/legion/extensions/node/runners/node.rb +7 -7
- data/lib/legion/extensions/node/transport/exchanges/node.rb +0 -2
- data/lib/legion/extensions/node/version.rb +1 -1
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffaa597a2f9951699fe797d9a8059d13bfccc420989c9c323e6d6637e435441f
|
4
|
+
data.tar.gz: 50d886008d780357af23b29d5db25043b89f581c03c1426f18d9df5fd83c30f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ced343d85f99296fa5f3c6f982cefbac7a3b40b3b902533a938421658e975e9926c5c128d2ae82b34b8595b31035a783d8601844593838d4bf55d5f8c07619aa
|
7
|
+
data.tar.gz: e2f55664ffb74836e4bec48b5550557077e52784c0a7169bc2cab3201fa123d44958224ada1558e3be5f7a3a24a0cc965a9d9356a678cb7b0e7813ea3dc6df28
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lex-node (0.1.
|
4
|
+
lex-node (0.1.2)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -11,47 +11,45 @@ GEM
|
|
11
11
|
aws-eventstream (1.1.0)
|
12
12
|
aws-sigv4 (1.2.2)
|
13
13
|
aws-eventstream (~> 1, >= 1.0.2)
|
14
|
-
bunny (2.
|
14
|
+
bunny (2.17.0)
|
15
15
|
amq-protocol (~> 2.3, >= 2.3.1)
|
16
16
|
concurrent-ruby (1.1.7)
|
17
17
|
concurrent-ruby-ext (1.1.7)
|
18
18
|
concurrent-ruby (= 1.1.7)
|
19
19
|
connection_pool (2.2.3)
|
20
20
|
daemons (1.3.1)
|
21
|
-
dalli (2.7.
|
21
|
+
dalli (2.7.11)
|
22
22
|
diff-lcs (1.4.4)
|
23
23
|
docile (1.3.2)
|
24
|
-
faraday (1.0.1)
|
25
|
-
multipart-post (>= 1.2, < 3)
|
26
|
-
faraday_middleware (1.0.0)
|
27
|
-
faraday (~> 1.0)
|
28
|
-
ffi (1.13.1)
|
29
24
|
hashdiff (1.0.1)
|
30
25
|
json (2.3.1)
|
26
|
+
json_pure (2.3.1)
|
31
27
|
legion-cache (1.0.0)
|
32
28
|
connection_pool
|
33
29
|
dalli
|
34
30
|
redis
|
35
|
-
legion-crypt (0.2.
|
36
|
-
rbnacl
|
31
|
+
legion-crypt (0.2.1)
|
37
32
|
vault
|
38
|
-
legion-data (
|
33
|
+
legion-data (1.1.4)
|
39
34
|
legion-logging
|
40
35
|
legion-settings
|
41
36
|
mysql2
|
42
37
|
sequel
|
43
|
-
legion-exceptions (1.1.
|
44
|
-
legion-json (1.1.
|
38
|
+
legion-exceptions (1.1.2)
|
39
|
+
legion-json (1.1.2)
|
40
|
+
json_pure
|
45
41
|
multi_json
|
46
|
-
legion-logging (1.1.
|
42
|
+
legion-logging (1.1.3)
|
47
43
|
rainbow (~> 3)
|
48
|
-
legion-settings (1.1.
|
44
|
+
legion-settings (1.1.2)
|
49
45
|
legion-json
|
50
46
|
legion-logging
|
51
|
-
legion-transport (1.1.
|
47
|
+
legion-transport (1.1.5)
|
52
48
|
bunny
|
53
49
|
concurrent-ruby
|
54
|
-
|
50
|
+
legion-json
|
51
|
+
legionio (0.3.4)
|
52
|
+
bunny
|
55
53
|
concurrent-ruby
|
56
54
|
concurrent-ruby-ext
|
57
55
|
daemons
|
@@ -64,26 +62,24 @@ GEM
|
|
64
62
|
legion-logging
|
65
63
|
legion-settings
|
66
64
|
legion-transport
|
67
|
-
|
68
|
-
|
65
|
+
lex-node
|
66
|
+
oj
|
69
67
|
multi_json (1.15.0)
|
70
|
-
multipart-post (2.1.1)
|
71
68
|
mysql2 (0.5.3)
|
69
|
+
oj (3.10.15)
|
72
70
|
parallel (1.19.2)
|
73
|
-
parser (2.7.
|
71
|
+
parser (2.7.2.0)
|
74
72
|
ast (~> 2.4.1)
|
75
73
|
rainbow (3.0.0)
|
76
74
|
rake (13.0.1)
|
77
|
-
|
78
|
-
|
79
|
-
redis (4.2.1)
|
80
|
-
regexp_parser (1.7.1)
|
75
|
+
redis (4.2.2)
|
76
|
+
regexp_parser (1.8.2)
|
81
77
|
rexml (3.2.4)
|
82
78
|
rspec (3.9.0)
|
83
79
|
rspec-core (~> 3.9.0)
|
84
80
|
rspec-expectations (~> 3.9.0)
|
85
81
|
rspec-mocks (~> 3.9.0)
|
86
|
-
rspec-core (3.9.
|
82
|
+
rspec-core (3.9.3)
|
87
83
|
rspec-support (~> 3.9.3)
|
88
84
|
rspec-expectations (3.9.2)
|
89
85
|
diff-lcs (>= 1.2.0, < 2.0)
|
@@ -94,30 +90,24 @@ GEM
|
|
94
90
|
rspec-support (3.9.3)
|
95
91
|
rspec_junit_formatter (0.4.1)
|
96
92
|
rspec-core (>= 2, < 4, != 2.12.0)
|
97
|
-
rubocop (0.
|
93
|
+
rubocop (1.0.0)
|
98
94
|
parallel (~> 1.10)
|
99
|
-
parser (>= 2.7.1.
|
95
|
+
parser (>= 2.7.1.5)
|
100
96
|
rainbow (>= 2.2.2, < 4.0)
|
101
|
-
regexp_parser (>= 1.
|
97
|
+
regexp_parser (>= 1.8)
|
102
98
|
rexml
|
103
|
-
rubocop-ast (>= 0.
|
99
|
+
rubocop-ast (>= 0.6.0)
|
104
100
|
ruby-progressbar (~> 1.7)
|
105
101
|
unicode-display_width (>= 1.4.0, < 2.0)
|
106
|
-
rubocop-ast (0.
|
107
|
-
parser (>= 2.7.1.
|
102
|
+
rubocop-ast (1.0.0)
|
103
|
+
parser (>= 2.7.1.5)
|
108
104
|
ruby-progressbar (1.10.1)
|
109
|
-
sequel (5.
|
105
|
+
sequel (5.37.0)
|
110
106
|
simplecov (0.17.1)
|
111
107
|
docile (~> 1.1)
|
112
108
|
json (>= 1.8, < 3)
|
113
109
|
simplecov-html (~> 0.10.0)
|
114
110
|
simplecov-html (0.10.2)
|
115
|
-
sleepiq (0.2.2)
|
116
|
-
dalli
|
117
|
-
faraday
|
118
|
-
faraday_middleware
|
119
|
-
thor
|
120
|
-
thor (1.0.1)
|
121
111
|
unicode-display_width (1.7.0)
|
122
112
|
vault (0.15.0)
|
123
113
|
aws-sigv4
|
@@ -13,8 +13,10 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
|
14
14
|
|
15
15
|
spec.metadata['homepage_uri'] = spec.homepage
|
16
|
-
spec.metadata['source_code_uri'] = 'https://bitbucket.org/legion-io/lex-node
|
17
|
-
spec.metadata['
|
16
|
+
spec.metadata['source_code_uri'] = 'https://bitbucket.org/legion-io/lex-node'
|
17
|
+
spec.metadata['documentation_uri'] = 'https://legionio.atlassian.net/wiki/spaces/LEX/pages/612139025'
|
18
|
+
spec.metadata['changelog_uri'] = 'https://legionio.atlassian.net/wiki/spaces/LEX/pages/612139042/'
|
19
|
+
spec.metadata['bug_tracker_uri'] = 'https://bitbucket.org/legion-io/lex-node/issues'
|
18
20
|
|
19
21
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
20
22
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
@@ -1,8 +1,6 @@
|
|
1
1
|
module Legion::Extensions::Node::Runners
|
2
2
|
module Crypt
|
3
|
-
|
4
|
-
|
5
|
-
def self.push_public_key(**_opts)
|
3
|
+
def push_public_key(**_opts)
|
6
4
|
log.debug 'push_public_key'
|
7
5
|
message_hash = { function: 'update_public_key',
|
8
6
|
public_key: Base64.encode64(Legion::Crypt.public_key),
|
@@ -17,26 +15,26 @@ module Legion::Extensions::Node::Runners
|
|
17
15
|
{}
|
18
16
|
end
|
19
17
|
|
20
|
-
def
|
18
|
+
def delete_public_key(name:, **_opts)
|
21
19
|
log.debug 'delete_public_key'
|
22
20
|
Legion::Settings[:cluster][:public_keys].delete(name)
|
23
21
|
{}
|
24
22
|
end
|
25
23
|
|
26
|
-
def
|
24
|
+
def request_public_keys(**_opts)
|
27
25
|
log.debug 'request_public_keys'
|
28
26
|
message_hash = { function: 'push_public_key' }
|
29
27
|
Legion::Extensions::Node::Transport::Messages::RequestPublicKeys.new(message_hash).publish
|
30
28
|
{}
|
31
29
|
end
|
32
30
|
|
33
|
-
def
|
31
|
+
def request_cluster_secret(**_opts)
|
34
32
|
log.debug 'request_cluster_secret'
|
35
33
|
Legion::Transport::Messages::RequestClusterSecret.new.publish
|
36
34
|
{}
|
37
35
|
end
|
38
36
|
|
39
|
-
def
|
37
|
+
def push_cluster_secret(public_key:, queue_name:, **_opts)
|
40
38
|
log.debug 'push_cluster_secret'
|
41
39
|
return {} unless Legion::Settings[:crypt][:cs_encrypt_ready]
|
42
40
|
|
@@ -50,12 +48,14 @@ module Legion::Extensions::Node::Runners
|
|
50
48
|
{}
|
51
49
|
end
|
52
50
|
|
53
|
-
def
|
51
|
+
def receive_cluster_secret(message:, **opts)
|
54
52
|
log.debug 'receive_cluster_secret'
|
55
53
|
Legion::Settings[:crypt][:cluster_secret] = Legion::Crypt.decrypt_from_keypair(message)
|
56
54
|
Legion::Settings[:crypt][:encrypted_string] = opts[:encrypted_string]
|
57
55
|
Legion::Settings[:crypt][:validation_string] = opts[:validation_string]
|
58
56
|
{}
|
59
57
|
end
|
58
|
+
|
59
|
+
include Legion::Extensions::Helpers::Lex
|
60
60
|
end
|
61
61
|
end
|
@@ -1,8 +1,6 @@
|
|
1
1
|
module Legion::Extensions::Node::Runners
|
2
2
|
module Node
|
3
|
-
|
4
|
-
|
5
|
-
def self.message(_options = {}, **hash)
|
3
|
+
def message(_options = {}, **hash)
|
6
4
|
log.debug 'message'
|
7
5
|
hash.each do |k, v|
|
8
6
|
raise 'Cannot override base setting that doesn\'t exist' if Legion::Settings[k].nil?
|
@@ -18,7 +16,7 @@ module Legion::Extensions::Node::Runners
|
|
18
16
|
end
|
19
17
|
end
|
20
18
|
|
21
|
-
def
|
19
|
+
def push_public_key(**_opts)
|
22
20
|
log.debug 'push_public_key'
|
23
21
|
message_hash = { function: 'update_public_key',
|
24
22
|
public_key: Legion::Crypt.public_key.to_s,
|
@@ -27,13 +25,13 @@ module Legion::Extensions::Node::Runners
|
|
27
25
|
{}
|
28
26
|
end
|
29
27
|
|
30
|
-
def
|
28
|
+
def update_public_key(name:, public_key:, **_opts)
|
31
29
|
log.debug 'update_public_key'
|
32
30
|
Legion::Settings[:cluster][:public_keys][name] = public_key
|
33
31
|
{}
|
34
32
|
end
|
35
33
|
|
36
|
-
def
|
34
|
+
def push_cluster_secret(public_key:, queue_name:, **_opts)
|
37
35
|
log.debug 'push_cluster_secret'
|
38
36
|
return {} unless Legion::Settings[:crypt][:cs_encrypt_ready]
|
39
37
|
|
@@ -47,10 +45,12 @@ module Legion::Extensions::Node::Runners
|
|
47
45
|
{}
|
48
46
|
end
|
49
47
|
|
50
|
-
def
|
48
|
+
def receive_cluster_secret(message:, **_opts)
|
51
49
|
log.debug 'receive_cluster_secret'
|
52
50
|
Legion::Settings[:crypt][:cluster_secret] = Legion::Crypt.decrypt_from_keypair(message: message)
|
53
51
|
{}
|
54
52
|
end
|
53
|
+
|
54
|
+
include Legion::Extensions::Helpers::Lex
|
55
55
|
end
|
56
56
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lex-node
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
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-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: legionio
|
@@ -114,7 +114,7 @@ files:
|
|
114
114
|
- bin/console
|
115
115
|
- bin/setup
|
116
116
|
- bitbucket-pipelines.yml
|
117
|
-
-
|
117
|
+
- lex-node.gemspec
|
118
118
|
- lib/legion/extensions/node.rb
|
119
119
|
- lib/legion/extensions/node/actors/beat.rb
|
120
120
|
- lib/legion/extensions/node/actors/crypt.rb
|
@@ -139,8 +139,10 @@ licenses:
|
|
139
139
|
- MIT
|
140
140
|
metadata:
|
141
141
|
homepage_uri: https://bitbucket.org/legion-io/lex-node/CHANGELOG.md
|
142
|
-
source_code_uri: https://bitbucket.org/legion-io/lex-node
|
143
|
-
|
142
|
+
source_code_uri: https://bitbucket.org/legion-io/lex-node
|
143
|
+
documentation_uri: https://legionio.atlassian.net/wiki/spaces/LEX/pages/612139025
|
144
|
+
changelog_uri: https://legionio.atlassian.net/wiki/spaces/LEX/pages/612139042/
|
145
|
+
bug_tracker_uri: https://bitbucket.org/legion-io/lex-node/issues
|
144
146
|
post_install_message:
|
145
147
|
rdoc_options: []
|
146
148
|
require_paths:
|