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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1abe0099e27d4acc209b120a6ec4210a63364edbc1d0daa26d3144c8c12297ab
4
- data.tar.gz: 819b97faa7e063cc668bced918a1337da5d0d2f5048b22ed2966d352eb114fc2
3
+ metadata.gz: ffaa597a2f9951699fe797d9a8059d13bfccc420989c9c323e6d6637e435441f
4
+ data.tar.gz: 50d886008d780357af23b29d5db25043b89f581c03c1426f18d9df5fd83c30f3
5
5
  SHA512:
6
- metadata.gz: b82aa5374867e114891c781d43c5f3e7240542f18735fdbcbf36fd191b39b3e6f9eb48845dcd8027b32e6b93c67eb45fa4f164954be625f4266e4275a32140b7
7
- data.tar.gz: 47da6876adffa2ffff9f56753c92810f33091826b5216d981306db9670b966b01d43037e2721f40916417bda5b4c361e0b9340a22fdb567ccd4d808eece72cd5
6
+ metadata.gz: ced343d85f99296fa5f3c6f982cefbac7a3b40b3b902533a938421658e975e9926c5c128d2ae82b34b8595b31035a783d8601844593838d4bf55d5f8c07619aa
7
+ data.tar.gz: e2f55664ffb74836e4bec48b5550557077e52784c0a7169bc2cab3201fa123d44958224ada1558e3be5f7a3a24a0cc965a9d9356a678cb7b0e7813ea3dc6df28
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lex-node (0.1.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.16.1)
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.10)
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.0)
36
- rbnacl
31
+ legion-crypt (0.2.1)
37
32
  vault
38
- legion-data (0.2.0)
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.0)
44
- legion-json (1.1.0)
38
+ legion-exceptions (1.1.2)
39
+ legion-json (1.1.2)
40
+ json_pure
45
41
  multi_json
46
- legion-logging (1.1.0)
42
+ legion-logging (1.1.3)
47
43
  rainbow (~> 3)
48
- legion-settings (1.1.1)
44
+ legion-settings (1.1.2)
49
45
  legion-json
50
46
  legion-logging
51
- legion-transport (1.1.1)
47
+ legion-transport (1.1.5)
52
48
  bunny
53
49
  concurrent-ruby
54
- legionio (0.2.0)
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
- sleepiq
68
- vault
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.1.4)
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
- rbnacl (7.1.1)
78
- ffi
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.2)
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.89.1)
93
+ rubocop (1.0.0)
98
94
  parallel (~> 1.10)
99
- parser (>= 2.7.1.1)
95
+ parser (>= 2.7.1.5)
100
96
  rainbow (>= 2.2.2, < 4.0)
101
- regexp_parser (>= 1.7)
97
+ regexp_parser (>= 1.8)
102
98
  rexml
103
- rubocop-ast (>= 0.3.0, < 1.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.3.0)
107
- parser (>= 2.7.1.4)
102
+ rubocop-ast (1.0.0)
103
+ parser (>= 2.7.1.5)
108
104
  ruby-progressbar (1.10.1)
109
- sequel (5.35.0)
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/src/'
17
- spec.metadata['changelog_uri'] = 'https://bitbucket.org/legion-io/lex-node/CHANGELOG.md'
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,10 +1,9 @@
1
1
  require 'legion/extensions/node/version'
2
- require 'legion/extensions'
3
2
 
4
3
  module Legion
5
4
  module Extensions
6
5
  module Node
7
- extend Legion::Extensions::Core
6
+ extend Legion::Extensions::Core if Legion::Extensions.const_defined? :Core
8
7
  end
9
8
  end
10
9
  end
@@ -21,7 +21,7 @@ module Legion::Extensions::Node::Actor
21
21
  end
22
22
 
23
23
  def time
24
- 1
24
+ 10
25
25
  end
26
26
  end
27
27
  end
@@ -1,8 +1,6 @@
1
1
  module Legion::Extensions::Node::Runners
2
2
  module Crypt
3
- include Legion::Extensions::Helpers::Lex
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 self.delete_public_key(name:, **_opts)
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 self.request_public_keys(**_opts)
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 self.request_cluster_secret(**_opts)
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 self.push_cluster_secret(public_key:, queue_name:, **_opts)
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 self.receive_cluster_secret(message:, **opts)
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
- include Legion::Extensions::Helpers::Lex
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 self.push_public_key(**_opts)
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 self.update_public_key(name:, public_key:, **_opts)
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 self.push_cluster_secret(public_key:, queue_name:, **_opts)
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 self.receive_cluster_secret(message:, **_opts)
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
@@ -1,5 +1,3 @@
1
- require 'legion/transport/exchanges/node'
2
-
3
1
  module Legion::Extensions::Node
4
2
  module Transport
5
3
  module Exchanges
@@ -1,7 +1,7 @@
1
1
  module Legion
2
2
  module Extensions
3
3
  module Node
4
- VERSION = '0.1.1'.freeze
4
+ VERSION = '0.1.2'.freeze
5
5
  end
6
6
  end
7
7
  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.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-08-24 00:00:00.000000000 Z
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
- - legion-extensions-node.gemspec
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/src/
143
- changelog_uri: https://bitbucket.org/legion-io/lex-node/CHANGELOG.md
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: