lex-node 0.1.0 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +26 -5
- data/.rubocop.yml +2 -7
- data/Dockerfile +9 -0
- data/Gemfile.lock +93 -25
- data/README.md +10 -26
- data/bitbucket-pipelines.yml +19 -0
- data/docker_deploy.rb +12 -0
- data/{legion-extensions-node.gemspec → lex-node.gemspec} +9 -4
- data/lib/legion/extensions/node.rb +1 -2
- data/lib/legion/extensions/node/actors/beat.rb +1 -1
- data/lib/legion/extensions/node/actors/push_key.rb +1 -1
- data/lib/legion/extensions/node/actors/vault.rb +27 -0
- data/lib/legion/extensions/node/actors/vault_token_request.rb +27 -0
- data/lib/legion/extensions/node/runners/crypt.rb +15 -16
- data/lib/legion/extensions/node/runners/node.rb +30 -11
- data/lib/legion/extensions/node/runners/vault.rb +40 -0
- data/lib/legion/extensions/node/transport.rb +1 -1
- data/lib/legion/extensions/node/transport/messages/public_key.rb +4 -0
- data/lib/legion/extensions/node/transport/messages/push_cluster_secret.rb +5 -5
- data/lib/legion/extensions/node/transport/messages/push_vault_token.rb +35 -0
- data/lib/legion/extensions/node/transport/messages/request_cluster_secret.rb +4 -0
- data/lib/legion/extensions/node/transport/messages/request_public_keys.rb +4 -0
- data/lib/legion/extensions/node/transport/messages/request_vault_token.rb +28 -0
- data/lib/legion/extensions/node/transport/queues/crypt.rb +7 -0
- data/lib/legion/extensions/node/transport/queues/node.rb +1 -1
- data/lib/legion/extensions/node/transport/queues/vault.rb +7 -0
- data/lib/legion/extensions/node/version.rb +1 -1
- data/sonar-project.properties +12 -0
- metadata +66 -20
- data/.idea/.rakeTasks +0 -7
- data/.idea/lex-node.iml +0 -35
- data/.idea/misc.xml +0 -7
- data/.idea/modules.xml +0 -8
- data/.idea/vagrant.xml +0 -7
- data/.idea/workspace.xml +0 -13
- data/bin/console +0 -14
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57282ad0a74feb119bb7f43008957194222cb16b40cf867caa5203f000815a82
|
4
|
+
data.tar.gz: 6a823a49db69980ffe7aca97a26971bc9a92a96f46f62c58e6496bb062dc2ce1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84321b370b8abf331d9ea35e80be811a2b5373598001e3a94ae6f4e9e4c24a1617cc526308b2c3a543073f316943227a857018713135cc3b4c904f6769253e6e
|
7
|
+
data.tar.gz: 8542c4a20d07f2feb945336cf02d1b44b12ce4e48b39d7c1268c839e678344e48431e9cbea623379ae6df99cd4ab4d02e70aad6b2582450e01ccac7c98e31813
|
data/.circleci/config.yml
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
version: 2.1
|
2
2
|
orbs:
|
3
3
|
ruby: circleci/ruby@0.2.1
|
4
|
+
sonarcloud: sonarsource/sonarcloud@1.0.1
|
4
5
|
|
5
6
|
jobs:
|
6
7
|
"rubocop":
|
7
8
|
docker:
|
8
|
-
- image: circleci/ruby:2.
|
9
|
+
- image: circleci/ruby:2.7-node
|
9
10
|
steps:
|
10
11
|
- checkout
|
11
12
|
- ruby/load-cache
|
@@ -17,33 +18,49 @@ jobs:
|
|
17
18
|
"ruby-two-five":
|
18
19
|
docker:
|
19
20
|
- image: circleci/ruby:2.5
|
20
|
-
- image: memcached:1.5-alpine
|
21
21
|
steps:
|
22
22
|
- checkout
|
23
23
|
- ruby/load-cache
|
24
|
+
- run:
|
25
|
+
name: update bundler
|
26
|
+
command: gem update bundler
|
24
27
|
- ruby/install-deps
|
25
28
|
- ruby/run-tests
|
26
29
|
- ruby/save-cache
|
27
30
|
"ruby-two-six":
|
28
31
|
docker:
|
29
32
|
- image: circleci/ruby:2.6
|
30
|
-
- image: memcached:1.5-alpine
|
31
33
|
steps:
|
32
34
|
- checkout
|
33
35
|
- ruby/load-cache
|
36
|
+
- run:
|
37
|
+
name: update bundler
|
38
|
+
command: gem update bundler
|
34
39
|
- ruby/install-deps
|
35
40
|
- ruby/run-tests
|
36
41
|
- ruby/save-cache
|
37
42
|
"ruby-two-seven":
|
38
43
|
docker:
|
39
44
|
- image: circleci/ruby:2.7
|
40
|
-
- image: memcached:1.5-alpine
|
41
45
|
steps:
|
42
46
|
- checkout
|
43
47
|
- ruby/load-cache
|
44
48
|
- ruby/install-deps
|
45
49
|
- ruby/run-tests
|
46
50
|
- ruby/save-cache
|
51
|
+
"sonarcloud":
|
52
|
+
docker:
|
53
|
+
- image: circleci/ruby:2.7
|
54
|
+
steps:
|
55
|
+
- checkout
|
56
|
+
- ruby/load-cache
|
57
|
+
- ruby/install-deps
|
58
|
+
- ruby/run-tests
|
59
|
+
- run:
|
60
|
+
name: Run Rubocop
|
61
|
+
command: bundle exec rubocop --format=json --out=rubocop-result.json
|
62
|
+
- sonarcloud/scan
|
63
|
+
- ruby/save-cache
|
47
64
|
|
48
65
|
workflows:
|
49
66
|
version: 2
|
@@ -58,4 +75,8 @@ workflows:
|
|
58
75
|
- ruby-two-five
|
59
76
|
- ruby-two-seven:
|
60
77
|
requires:
|
61
|
-
- ruby-two-five
|
78
|
+
- ruby-two-five
|
79
|
+
- sonarcloud:
|
80
|
+
requires:
|
81
|
+
- ruby-two-seven
|
82
|
+
- ruby-two-six
|
data/.rubocop.yml
CHANGED
@@ -6,17 +6,12 @@ Metrics/ClassLength:
|
|
6
6
|
Max: 1500
|
7
7
|
Metrics/BlockLength:
|
8
8
|
Max: 50
|
9
|
-
Layout/SpaceAroundEqualsInParameterDefault:
|
10
|
-
EnforcedStyle: space
|
11
|
-
Style/SymbolArray:
|
12
|
-
Enabled: true
|
13
|
-
Layout/HashAlignment:
|
14
|
-
EnforcedHashRocketStyle: table
|
15
|
-
EnforcedColonStyle: table
|
16
9
|
Style/Documentation:
|
17
10
|
Enabled: false
|
18
11
|
AllCops:
|
19
12
|
TargetRubyVersion: 2.5
|
13
|
+
NewCops: enable
|
14
|
+
SuggestExtensions: false
|
20
15
|
Style/FrozenStringLiteralComment:
|
21
16
|
Enabled: false
|
22
17
|
Naming/FileName:
|
data/Dockerfile
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
FROM legionio/legion:latest
|
2
|
+
LABEL maintainer="Matthew Iverson <matthewdiverson@gmail.com>"
|
3
|
+
|
4
|
+
RUN mkdir /etc/legionio
|
5
|
+
RUN apk update && apk add build-base tzdata gcc git
|
6
|
+
|
7
|
+
COPY . ./
|
8
|
+
RUN gem install lex-elastic_app_search --no-document --no-prerelease
|
9
|
+
CMD ruby --jit $(which legionio)
|
data/Gemfile.lock
CHANGED
@@ -1,52 +1,120 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lex-node (0.1.
|
4
|
+
lex-node (0.1.5)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
amq-protocol (2.3.2)
|
10
|
+
ast (2.4.2)
|
11
|
+
aws-eventstream (1.1.0)
|
12
|
+
aws-sigv4 (1.2.2)
|
13
|
+
aws-eventstream (~> 1, >= 1.0.2)
|
14
|
+
bunny (2.17.0)
|
15
|
+
amq-protocol (~> 2.3, >= 2.3.1)
|
16
|
+
concurrent-ruby (1.1.8)
|
17
|
+
concurrent-ruby-ext (1.1.8)
|
18
|
+
concurrent-ruby (= 1.1.8)
|
19
|
+
connection_pool (2.2.3)
|
20
|
+
daemons (1.3.1)
|
21
|
+
dalli (2.7.11)
|
22
|
+
diff-lcs (1.4.4)
|
23
|
+
docile (1.3.5)
|
24
|
+
json (2.5.1)
|
25
|
+
json_pure (2.5.1)
|
26
|
+
legion-cache (1.1.1)
|
27
|
+
connection_pool (>= 2.2.3)
|
28
|
+
dalli (>= 2.7)
|
29
|
+
redis (>= 4.2)
|
30
|
+
legion-crypt (0.2.3)
|
31
|
+
vault
|
32
|
+
legion-exceptions (1.1.5)
|
33
|
+
legion-json (1.1.4)
|
34
|
+
json_pure
|
35
|
+
legion-exceptions (>= 1.1.5)
|
36
|
+
multi_json
|
37
|
+
legion-logging (1.1.4)
|
38
|
+
rainbow (~> 3)
|
39
|
+
legion-settings (1.1.3)
|
40
|
+
legion-json
|
41
|
+
legion-logging
|
42
|
+
legion-transport (1.1.9)
|
43
|
+
bunny (>= 2.17.0)
|
44
|
+
concurrent-ruby (>= 1.1.7)
|
45
|
+
legion-json
|
46
|
+
legionio (0.4.2)
|
47
|
+
concurrent-ruby (>= 1.1.7)
|
48
|
+
concurrent-ruby-ext (>= 1.1.7)
|
49
|
+
daemons (>= 1.3.1)
|
50
|
+
legion-cache
|
51
|
+
legion-crypt (>= 0.2.0)
|
52
|
+
legion-exceptions
|
53
|
+
legion-json
|
54
|
+
legion-logging
|
55
|
+
legion-settings
|
56
|
+
legion-transport (>= 1.1.9)
|
57
|
+
lex-node
|
58
|
+
oj (>= 3.10)
|
59
|
+
thor (>= 1)
|
60
|
+
multi_json (1.15.0)
|
61
|
+
oj (3.11.2)
|
62
|
+
parallel (1.20.1)
|
63
|
+
parser (3.0.0.0)
|
64
|
+
ast (~> 2.4.1)
|
15
65
|
rainbow (3.0.0)
|
16
|
-
rake (13.0.
|
66
|
+
rake (13.0.3)
|
67
|
+
redis (4.2.5)
|
68
|
+
regexp_parser (2.1.1)
|
17
69
|
rexml (3.2.4)
|
18
|
-
rspec (3.
|
19
|
-
rspec-core (~> 3.
|
20
|
-
rspec-expectations (~> 3.
|
21
|
-
rspec-mocks (~> 3.
|
22
|
-
rspec-core (3.
|
23
|
-
rspec-support (~> 3.
|
24
|
-
rspec-expectations (3.
|
70
|
+
rspec (3.10.0)
|
71
|
+
rspec-core (~> 3.10.0)
|
72
|
+
rspec-expectations (~> 3.10.0)
|
73
|
+
rspec-mocks (~> 3.10.0)
|
74
|
+
rspec-core (3.10.1)
|
75
|
+
rspec-support (~> 3.10.0)
|
76
|
+
rspec-expectations (3.10.1)
|
25
77
|
diff-lcs (>= 1.2.0, < 2.0)
|
26
|
-
rspec-support (~> 3.
|
27
|
-
rspec-mocks (3.
|
78
|
+
rspec-support (~> 3.10.0)
|
79
|
+
rspec-mocks (3.10.2)
|
28
80
|
diff-lcs (>= 1.2.0, < 2.0)
|
29
|
-
rspec-support (~> 3.
|
30
|
-
rspec-support (3.
|
31
|
-
|
32
|
-
|
81
|
+
rspec-support (~> 3.10.0)
|
82
|
+
rspec-support (3.10.2)
|
83
|
+
rspec_junit_formatter (0.4.1)
|
84
|
+
rspec-core (>= 2, < 4, != 2.12.0)
|
85
|
+
rubocop (1.11.0)
|
33
86
|
parallel (~> 1.10)
|
34
|
-
parser (>=
|
87
|
+
parser (>= 3.0.0.0)
|
35
88
|
rainbow (>= 2.2.2, < 4.0)
|
89
|
+
regexp_parser (>= 1.8, < 3.0)
|
36
90
|
rexml
|
91
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
37
92
|
ruby-progressbar (~> 1.7)
|
38
|
-
unicode-display_width (>= 1.4.0, <
|
39
|
-
|
40
|
-
|
93
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
94
|
+
rubocop-ast (1.4.1)
|
95
|
+
parser (>= 2.7.1.5)
|
96
|
+
ruby-progressbar (1.11.0)
|
97
|
+
simplecov (0.17.1)
|
98
|
+
docile (~> 1.1)
|
99
|
+
json (>= 1.8, < 3)
|
100
|
+
simplecov-html (~> 0.10.0)
|
101
|
+
simplecov-html (0.10.2)
|
102
|
+
thor (1.1.0)
|
103
|
+
unicode-display_width (2.0.0)
|
104
|
+
vault (0.15.0)
|
105
|
+
aws-sigv4
|
41
106
|
|
42
107
|
PLATFORMS
|
43
108
|
ruby
|
44
109
|
|
45
110
|
DEPENDENCIES
|
111
|
+
legionio
|
46
112
|
lex-node!
|
47
113
|
rake
|
48
114
|
rspec
|
115
|
+
rspec_junit_formatter
|
49
116
|
rubocop
|
117
|
+
simplecov (< 0.18.0)
|
50
118
|
|
51
119
|
BUNDLED WITH
|
52
120
|
2.1.4
|
data/README.md
CHANGED
@@ -1,39 +1,23 @@
|
|
1
1
|
# Legion::Extensions::Node
|
2
2
|
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/legion/extensions/node`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
3
|
|
7
4
|
## Installation
|
8
5
|
|
9
|
-
|
6
|
+
This LEX is installed into LegionIO by default. You can disable it with the following setting
|
10
7
|
|
11
|
-
```
|
12
|
-
|
8
|
+
```json
|
9
|
+
{
|
10
|
+
"extensions": {
|
11
|
+
"node": {
|
12
|
+
"enabled": false
|
13
|
+
}
|
14
|
+
}
|
15
|
+
}
|
13
16
|
```
|
14
17
|
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
$ bundle install
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
$ gem install legion-extensions-node
|
22
|
-
|
23
18
|
## Usage
|
24
19
|
|
25
|
-
|
26
|
-
|
27
|
-
## Development
|
28
|
-
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
-
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
-
|
33
|
-
## Contributing
|
34
|
-
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/legion-extensions-node.
|
36
|
-
|
20
|
+
This is used by default and you shouldn't have to do anything special to use it
|
37
21
|
|
38
22
|
## License
|
39
23
|
|
data/bitbucket-pipelines.yml
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
image: ruby:2.7
|
2
|
+
|
3
|
+
pipelines:
|
4
|
+
tags:
|
5
|
+
"v*":
|
6
|
+
- step:
|
7
|
+
name: Push to RubyGems
|
8
|
+
deployment: RubyGems
|
9
|
+
script:
|
10
|
+
- gem install gem-release
|
11
|
+
- (umask 077 ; echo $gem_creds | base64 --decode > ~/.gem/credentials)
|
12
|
+
- gem release
|
13
|
+
artifacts:
|
14
|
+
- pkg/**
|
15
|
+
- step:
|
16
|
+
name: Push to Docker
|
17
|
+
deployment: Docker
|
18
|
+
script:
|
19
|
+
- './docker_deploy.rb'
|
data/docker_deploy.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
version = Legion::Extensions::ElasticAppSearch::VERSION
|
4
|
+
name = 'elastic_app_search'
|
5
|
+
|
6
|
+
require "./lib/legion/extensions/#{name}/version"
|
7
|
+
puts "Building docker image for Legion v#{version}"
|
8
|
+
system("docker build --tag legionio/lex-#{name}:v#{version} .")
|
9
|
+
puts 'Pushing to hub.docker.com'
|
10
|
+
system("docker push legionio/lex-#{name}:v#{version}")
|
11
|
+
system("docker push legionio/lex-#{name}:latest")
|
12
|
+
puts 'completed'
|
@@ -8,20 +8,25 @@ Gem::Specification.new do |spec|
|
|
8
8
|
|
9
9
|
spec.summary = 'Does Legion Node things'
|
10
10
|
spec.description = 'This lex is responsible for sending heartbeats, and allowing for dynamic confgs'
|
11
|
-
spec.homepage = 'https://bitbucket.org/legion-io/lex-node/
|
11
|
+
spec.homepage = 'https://bitbucket.org/legion-io/lex-node/'
|
12
12
|
spec.license = 'MIT'
|
13
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.
|
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)/}) }
|
21
23
|
end
|
22
24
|
spec.require_paths = ['lib']
|
23
25
|
|
26
|
+
spec.add_development_dependency 'legionio'
|
24
27
|
spec.add_development_dependency 'rake'
|
25
28
|
spec.add_development_dependency 'rspec'
|
29
|
+
spec.add_development_dependency 'rspec_junit_formatter'
|
26
30
|
spec.add_development_dependency 'rubocop'
|
31
|
+
spec.add_development_dependency 'simplecov', '< 0.18.0'
|
27
32
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Legion::Extensions::Node::Actor
|
2
|
+
class Vault < Legion::Extensions::Actors::Subscription
|
3
|
+
# def delay_start
|
4
|
+
# 2
|
5
|
+
# end
|
6
|
+
|
7
|
+
def runner_class
|
8
|
+
Legion::Extensions::Node::Runners::Vault
|
9
|
+
end
|
10
|
+
|
11
|
+
def disabled?
|
12
|
+
false
|
13
|
+
end
|
14
|
+
|
15
|
+
def use_runner?
|
16
|
+
true
|
17
|
+
end
|
18
|
+
|
19
|
+
def check_subtask?
|
20
|
+
false
|
21
|
+
end
|
22
|
+
|
23
|
+
def generate_task?
|
24
|
+
false
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Legion::Extensions::Node::Actor
|
2
|
+
class VaultTokenRequest < Legion::Extensions::Actors::Once
|
3
|
+
def runner_function
|
4
|
+
'request_token'
|
5
|
+
end
|
6
|
+
|
7
|
+
def runner_class
|
8
|
+
Legion::Extensions::Node::Runners::Vault
|
9
|
+
end
|
10
|
+
|
11
|
+
def use_runner?
|
12
|
+
false
|
13
|
+
end
|
14
|
+
|
15
|
+
def check_subtask?
|
16
|
+
false
|
17
|
+
end
|
18
|
+
|
19
|
+
def generate_task?
|
20
|
+
false
|
21
|
+
end
|
22
|
+
|
23
|
+
def delay
|
24
|
+
0
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -1,10 +1,8 @@
|
|
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
|
-
message_hash = { function:
|
5
|
+
message_hash = { function: 'update_public_key',
|
8
6
|
public_key: Base64.encode64(Legion::Crypt.public_key),
|
9
7
|
**Legion::Settings[:client] }
|
10
8
|
Legion::Extensions::Node::Transport::Messages::PublicKey.new(message_hash).publish
|
@@ -17,46 +15,47 @@ 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
|
|
43
|
-
encrypted = Legion::Crypt.encrypt_from_keypair(
|
44
|
-
message:
|
41
|
+
encrypted = Legion::Crypt.encrypt_from_keypair(pub_key: public_key,
|
42
|
+
message: Legion::Settings[:crypt][:cluster_secret].to_s)
|
45
43
|
legion = Legion::Crypt.encrypt('legion')
|
46
|
-
Legion::Extensions::Node::Transport::Messages::PushClusterSecret.new(message:
|
47
|
-
queue_name:
|
44
|
+
Legion::Extensions::Node::Transport::Messages::PushClusterSecret.new(message: encrypted,
|
45
|
+
queue_name: queue_name,
|
48
46
|
validation_string: 'legion',
|
49
|
-
encrypted_string:
|
47
|
+
encrypted_string: legion).publish
|
50
48
|
{}
|
51
49
|
end
|
52
50
|
|
53
|
-
def
|
51
|
+
def receive_cluster_secret(message:, **opts)
|
54
52
|
log.debug 'receive_cluster_secret'
|
55
|
-
|
56
|
-
Legion::Settings[:crypt][:cluster_secret] = Legion::Crypt.decrypt_from_keypair(public_key, message)
|
53
|
+
Legion::Settings[:crypt][:cluster_secret] = Legion::Crypt.decrypt_from_keypair(message)
|
57
54
|
Legion::Settings[:crypt][:encrypted_string] = opts[:encrypted_string]
|
58
55
|
Legion::Settings[:crypt][:validation_string] = opts[:validation_string]
|
59
56
|
{}
|
60
57
|
end
|
58
|
+
|
59
|
+
include Legion::Extensions::Helpers::Lex
|
61
60
|
end
|
62
61
|
end
|
@@ -1,15 +1,14 @@
|
|
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?
|
9
7
|
|
10
|
-
|
8
|
+
case v
|
9
|
+
when String
|
11
10
|
Legion::Settings[k] = v
|
12
|
-
|
11
|
+
when Hash
|
13
12
|
v.each do |key, value|
|
14
13
|
Legion::Settings[k][key] = value
|
15
14
|
end
|
@@ -17,26 +16,46 @@ module Legion::Extensions::Node::Runners
|
|
17
16
|
end
|
18
17
|
end
|
19
18
|
|
20
|
-
def
|
19
|
+
def push_public_key(**_opts)
|
21
20
|
log.debug 'push_public_key'
|
22
|
-
message_hash = { function:
|
21
|
+
message_hash = { function: 'update_public_key',
|
23
22
|
public_key: Legion::Crypt.public_key.to_s,
|
24
23
|
**Legion::Settings[:client] }
|
25
24
|
Legion::Extensions::Node::Transport::Messages::PublicKey.new(message_hash).publish
|
26
25
|
{}
|
27
26
|
end
|
28
27
|
|
29
|
-
def
|
28
|
+
def update_public_key(name:, public_key:, **_opts)
|
30
29
|
log.debug 'update_public_key'
|
31
30
|
Legion::Settings[:cluster][:public_keys][name] = public_key
|
32
31
|
{}
|
33
32
|
end
|
34
33
|
|
35
|
-
def
|
34
|
+
def push_cluster_secret(public_key:, queue_name:, **_opts)
|
35
|
+
log.debug 'push_cluster_secret'
|
36
|
+
return {} unless Legion::Settings[:crypt][:cs_encrypt_ready]
|
37
|
+
|
38
|
+
encrypted = Legion::Crypt.encrypt_from_keypair(pub_key: public_key,
|
39
|
+
message: Legion::Settings[:crypt][:cluster_secret].to_s)
|
40
|
+
legion = Legion::Crypt.encrypt('legion')
|
41
|
+
Legion::Extensions::Node::Transport::Messages::PushClusterSecret.new(message: encrypted,
|
42
|
+
queue_name: queue_name,
|
43
|
+
validation_string: 'legion',
|
44
|
+
encrypted_string: legion).publish
|
45
|
+
{}
|
46
|
+
end
|
47
|
+
|
48
|
+
def receive_cluster_secret(message:, **_opts)
|
36
49
|
log.debug 'receive_cluster_secret'
|
37
|
-
Legion::Settings[:crypt][:cluster_secret] = Legion::Crypt.decrypt_from_keypair(
|
38
|
-
message: message)
|
50
|
+
Legion::Settings[:crypt][:cluster_secret] = Legion::Crypt.decrypt_from_keypair(message: message)
|
39
51
|
{}
|
40
52
|
end
|
53
|
+
|
54
|
+
def receive_vault_token(message:, routing_key:, public_key:, **)
|
55
|
+
Legion::Extensions::Node::Runners::Vault.receive_vault_token(message: message, routing_key: routing_key,
|
56
|
+
public_key: public_key)
|
57
|
+
end
|
58
|
+
|
59
|
+
include Legion::Extensions::Helpers::Lex
|
41
60
|
end
|
42
61
|
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Legion::Extensions::Node::Runners
|
2
|
+
module Vault
|
3
|
+
def request_token(**)
|
4
|
+
return {} if Legion::Settings[:crypt][:vault][:connected]
|
5
|
+
return {} unless Legion::Settings[:crypt][:vault][:enabled]
|
6
|
+
|
7
|
+
request_vault_token
|
8
|
+
end
|
9
|
+
|
10
|
+
def request_vault_token(**)
|
11
|
+
Legion::Extensions::Node::Transport::Messages::RequestVaultToken.new.publish
|
12
|
+
{}
|
13
|
+
end
|
14
|
+
|
15
|
+
def receive_vault_token(message:, **opts) # rubocop:disable Metrics/AbcSize
|
16
|
+
return if Legion::Settings[:crypt][:vault][:connected]
|
17
|
+
|
18
|
+
Legion::Settings[:crypt][:vault][:token] = Legion::Crypt.decrypt_from_keypair(message: message)
|
19
|
+
%i[protocol address port].each do |setting|
|
20
|
+
next unless opts.key? setting
|
21
|
+
next unless Legion::Settings[:crypt][:vault][setting].nil?
|
22
|
+
|
23
|
+
Legion::Settings[:crypt][:vault][setting] = opts[setting]
|
24
|
+
end
|
25
|
+
Legion::Crypt.connect_vault
|
26
|
+
{}
|
27
|
+
end
|
28
|
+
|
29
|
+
def push_vault_token(public_key:, node_name:, **)
|
30
|
+
return {} unless Legion::Settings[:crypt][:vault][:token]
|
31
|
+
|
32
|
+
encrypted = Legion::Crypt.encrypt_from_keypair(message: Legion::Settings[:crypt][:vault][:token],
|
33
|
+
pub_key: public_key)
|
34
|
+
Legion::Extensions::Node::Transport::Messages::PushVaultToken.new(token: encrypted, queue_name: node_name).publish
|
35
|
+
{}
|
36
|
+
end
|
37
|
+
|
38
|
+
include Legion::Extensions::Helpers::Lex
|
39
|
+
end
|
40
|
+
end
|
@@ -3,7 +3,7 @@ require 'legion/extensions/transport'
|
|
3
3
|
module Legion::Extensions::Node::Transport
|
4
4
|
extend Legion::Extensions::Transport
|
5
5
|
def self.additional_e_to_q
|
6
|
-
array = [{ from: 'node', to: 'node', routing_key: "node.#{Legion::Settings[
|
6
|
+
array = [{ from: 'node', to: 'node', routing_key: "node.#{Legion::Settings[:client][:name]}" }]
|
7
7
|
array.push(from: 'node', to: 'node', routing_key: 'node.data.#') if Legion::Settings[:data][:connected]
|
8
8
|
array.push(from: 'node', to: 'node', routing_key: 'node.cache.#') if Legion::Settings[:cache][:connected]
|
9
9
|
array.push(from: 'node', to: 'node', routing_key: 'node.crypt.#')
|
@@ -9,12 +9,12 @@ module Legion::Extensions::Node::Transport::Messages
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def message
|
12
|
-
{ function:
|
13
|
-
runner_class:
|
14
|
-
message:
|
12
|
+
{ function: 'receive_cluster_secret',
|
13
|
+
runner_class: 'Legion::Extensions::Node::Runners::Crypt',
|
14
|
+
message: @options[:message],
|
15
15
|
validation_string: @options[:validation_string] || nil,
|
16
|
-
encrypted_string:
|
17
|
-
public_key:
|
16
|
+
encrypted_string: @options[:encrypted_string] || nil,
|
17
|
+
public_key: Base64.encode64(Legion::Crypt.public_key) }
|
18
18
|
end
|
19
19
|
|
20
20
|
def type
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Legion::Extensions::Node::Transport::Messages
|
2
|
+
class PushVaultToken < Legion::Transport::Message
|
3
|
+
def routing_key
|
4
|
+
"node.#{@options[:queue_name]}"
|
5
|
+
end
|
6
|
+
|
7
|
+
def exchange
|
8
|
+
Legion::Transport::Exchanges::Node
|
9
|
+
end
|
10
|
+
|
11
|
+
def message
|
12
|
+
data =
|
13
|
+
{ function: 'receive_vault_token',
|
14
|
+
runner_class: 'Legion::Extensions::Node::Runners::Vault',
|
15
|
+
message: @options[:token],
|
16
|
+
public_key: Base64.encode64(Legion::Crypt.public_key) }
|
17
|
+
|
18
|
+
Legion::Logging.unknown data
|
19
|
+
Legion::Logging.unknown routing_key
|
20
|
+
data
|
21
|
+
end
|
22
|
+
|
23
|
+
def type
|
24
|
+
'task'
|
25
|
+
end
|
26
|
+
|
27
|
+
def encrypt?
|
28
|
+
false
|
29
|
+
end
|
30
|
+
|
31
|
+
def validate
|
32
|
+
@valid = true
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Legion::Extensions::Node::Transport::Messages
|
2
|
+
class RequestVaultToken < Legion::Transport::Message
|
3
|
+
def routing_key
|
4
|
+
'vault'
|
5
|
+
end
|
6
|
+
|
7
|
+
def message
|
8
|
+
{
|
9
|
+
function: 'push_vault_token',
|
10
|
+
node_name: Legion::Settings[:client][:name],
|
11
|
+
runner_class: 'Legion::Extensions::Node::Runners::Vault',
|
12
|
+
public_key: Legion::Crypt.public_key
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
def type
|
17
|
+
'task'
|
18
|
+
end
|
19
|
+
|
20
|
+
def encrypt?
|
21
|
+
false
|
22
|
+
end
|
23
|
+
|
24
|
+
def validate
|
25
|
+
@valid = true
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
sonar.projectKey=legion-io_lex-node
|
2
|
+
sonar.organization=legion-io
|
3
|
+
sonar.projectName=Legion::Extensions::Node
|
4
|
+
sonar.sources=.
|
5
|
+
sonar.exclusions=vendor/**
|
6
|
+
sonar.coverage.exclusions=spec/**
|
7
|
+
sonar.ruby.coverage.reportPath=coverage/.resultset.json
|
8
|
+
sonar.ruby.file.suffixes=rb,ruby
|
9
|
+
sonar.ruby.coverage.framework=RSpec
|
10
|
+
sonar.ruby.rubocopConfig=.rubocop.yml
|
11
|
+
sonar.ruby.rubocop.reportPath=rubocop-result.json
|
12
|
+
sonar.ruby.rubocop.filePath=.
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esity
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: legionio
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rake
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,6 +52,20 @@ dependencies:
|
|
38
52
|
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec_junit_formatter
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
70
|
name: rubocop
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +80,20 @@ dependencies:
|
|
52
80
|
- - ">="
|
53
81
|
- !ruby/object:Gem::Version
|
54
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "<"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.18.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "<"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.18.0
|
55
97
|
description: This lex is responsible for sending heartbeats, and allowing for dynamic
|
56
98
|
confgs
|
57
99
|
email:
|
@@ -62,48 +104,52 @@ extra_rdoc_files: []
|
|
62
104
|
files:
|
63
105
|
- ".circleci/config.yml"
|
64
106
|
- ".gitignore"
|
65
|
-
- ".idea/.rakeTasks"
|
66
|
-
- ".idea/lex-node.iml"
|
67
|
-
- ".idea/misc.xml"
|
68
|
-
- ".idea/modules.xml"
|
69
|
-
- ".idea/vagrant.xml"
|
70
|
-
- ".idea/workspace.xml"
|
71
107
|
- ".rspec"
|
72
108
|
- ".rubocop.yml"
|
109
|
+
- Dockerfile
|
73
110
|
- Gemfile
|
74
111
|
- Gemfile.lock
|
75
112
|
- LICENSE.txt
|
76
113
|
- README.md
|
77
114
|
- Rakefile
|
78
|
-
- bin/console
|
79
|
-
- bin/setup
|
80
115
|
- bitbucket-pipelines.yml
|
81
|
-
-
|
116
|
+
- docker_deploy.rb
|
117
|
+
- lex-node.gemspec
|
82
118
|
- lib/legion/extensions/node.rb
|
83
119
|
- lib/legion/extensions/node/actors/beat.rb
|
84
120
|
- lib/legion/extensions/node/actors/crypt.rb
|
85
121
|
- lib/legion/extensions/node/actors/push_key.rb
|
122
|
+
- lib/legion/extensions/node/actors/vault.rb
|
123
|
+
- lib/legion/extensions/node/actors/vault_token_request.rb
|
86
124
|
- lib/legion/extensions/node/runners/beat.rb
|
87
125
|
- lib/legion/extensions/node/runners/crypt.rb
|
88
126
|
- lib/legion/extensions/node/runners/node.rb
|
127
|
+
- lib/legion/extensions/node/runners/vault.rb
|
89
128
|
- lib/legion/extensions/node/transport.rb
|
90
129
|
- lib/legion/extensions/node/transport/exchanges/node.rb
|
91
130
|
- lib/legion/extensions/node/transport/messages/beat.rb
|
92
131
|
- lib/legion/extensions/node/transport/messages/public_key.rb
|
93
132
|
- lib/legion/extensions/node/transport/messages/push_cluster_secret.rb
|
133
|
+
- lib/legion/extensions/node/transport/messages/push_vault_token.rb
|
94
134
|
- lib/legion/extensions/node/transport/messages/request_cluster_secret.rb
|
95
135
|
- lib/legion/extensions/node/transport/messages/request_public_keys.rb
|
136
|
+
- lib/legion/extensions/node/transport/messages/request_vault_token.rb
|
137
|
+
- lib/legion/extensions/node/transport/queues/crypt.rb
|
96
138
|
- lib/legion/extensions/node/transport/queues/health.rb
|
97
139
|
- lib/legion/extensions/node/transport/queues/node.rb
|
140
|
+
- lib/legion/extensions/node/transport/queues/vault.rb
|
98
141
|
- lib/legion/extensions/node/version.rb
|
99
|
-
|
142
|
+
- sonar-project.properties
|
143
|
+
homepage: https://bitbucket.org/legion-io/lex-node/
|
100
144
|
licenses:
|
101
145
|
- MIT
|
102
146
|
metadata:
|
103
|
-
homepage_uri: https://bitbucket.org/legion-io/lex-node/
|
104
|
-
source_code_uri: https://bitbucket.org/legion-io/lex-node
|
105
|
-
|
106
|
-
|
147
|
+
homepage_uri: https://bitbucket.org/legion-io/lex-node/
|
148
|
+
source_code_uri: https://bitbucket.org/legion-io/lex-node
|
149
|
+
documentation_uri: https://legionio.atlassian.net/wiki/spaces/LEX/pages/612139025
|
150
|
+
changelog_uri: https://legionio.atlassian.net/wiki/spaces/LEX/pages/612139042/
|
151
|
+
bug_tracker_uri: https://bitbucket.org/legion-io/lex-node/issues
|
152
|
+
post_install_message:
|
107
153
|
rdoc_options: []
|
108
154
|
require_paths:
|
109
155
|
- lib
|
@@ -111,15 +157,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
157
|
requirements:
|
112
158
|
- - ">="
|
113
159
|
- !ruby/object:Gem::Version
|
114
|
-
version: 2.
|
160
|
+
version: 2.5.0
|
115
161
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
162
|
requirements:
|
117
163
|
- - ">="
|
118
164
|
- !ruby/object:Gem::Version
|
119
165
|
version: '0'
|
120
166
|
requirements: []
|
121
|
-
rubygems_version: 3.
|
122
|
-
signing_key:
|
167
|
+
rubygems_version: 3.2.6
|
168
|
+
signing_key:
|
123
169
|
specification_version: 4
|
124
170
|
summary: Does Legion Node things
|
125
171
|
test_files: []
|
data/.idea/.rakeTasks
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<Settings><!--This file was automatically generated by Ruby plugin.
|
3
|
-
You are allowed to:
|
4
|
-
1. Remove rake task
|
5
|
-
2. Add existing rake tasks
|
6
|
-
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
-
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build lex-node-0.1.0.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Build and install lex-node-0.1.0.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install lex-node-0.1.0.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v0.1.0 and build and push lex-node-0.1.0.gem to rubygems.org" fullCmd="release[remote]" taksId="release[remote]" /><RakeTask description="Run RSpec code examples" fullCmd="spec" taksId="spec" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="release" taksId="release" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup></RakeGroup></Settings>
|
data/.idea/lex-node.iml
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<module type="RUBY_MODULE" version="4">
|
3
|
-
<component name="ModuleRunConfigurationManager">
|
4
|
-
<shared />
|
5
|
-
</component>
|
6
|
-
<component name="NewModuleRootManager">
|
7
|
-
<content url="file://$MODULE_DIR$">
|
8
|
-
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
9
|
-
</content>
|
10
|
-
<orderEntry type="inheritedJdk" />
|
11
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
12
|
-
<orderEntry type="library" scope="PROVIDED" name="ast (v2.4.0, RVM: ruby-2.6.3) [gem]" level="application" />
|
13
|
-
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.1.4, RVM: ruby-2.6.3) [gem]" level="application" />
|
14
|
-
<orderEntry type="library" scope="PROVIDED" name="chef (v15.8.23, RVM: ruby-2.6.3) [gem]" level="application" />
|
15
|
-
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.3, RVM: ruby-2.6.3) [gem]" level="application" />
|
16
|
-
<orderEntry type="library" scope="PROVIDED" name="jaro_winkler (v1.5.4, RVM: ruby-2.6.3) [gem]" level="application" />
|
17
|
-
<orderEntry type="library" scope="PROVIDED" name="parallel (v1.19.1, RVM: ruby-2.6.3) [gem]" level="application" />
|
18
|
-
<orderEntry type="library" scope="PROVIDED" name="parser (v2.7.0.4, RVM: ruby-2.6.3) [gem]" level="application" />
|
19
|
-
<orderEntry type="library" scope="PROVIDED" name="rainbow (v3.0.0, RVM: ruby-2.6.3) [gem]" level="application" />
|
20
|
-
<orderEntry type="library" scope="PROVIDED" name="rake (v13.0.1, RVM: ruby-2.6.3) [gem]" level="application" />
|
21
|
-
<orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.4, RVM: ruby-2.6.3) [gem]" level="application" />
|
22
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.9.0, RVM: ruby-2.6.3) [gem]" level="application" />
|
23
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.9.1, RVM: ruby-2.6.3) [gem]" level="application" />
|
24
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.9.0, RVM: ruby-2.6.3) [gem]" level="application" />
|
25
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.9.1, RVM: ruby-2.6.3) [gem]" level="application" />
|
26
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.9.2, RVM: ruby-2.6.3) [gem]" level="application" />
|
27
|
-
<orderEntry type="library" scope="PROVIDED" name="rubocop (v0.80.1, RVM: ruby-2.6.3) [gem]" level="application" />
|
28
|
-
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.10.1, RVM: ruby-2.6.3) [gem]" level="application" />
|
29
|
-
<orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v1.6.1, RVM: ruby-2.6.3) [gem]" level="application" />
|
30
|
-
</component>
|
31
|
-
<component name="RModuleSettingsStorage">
|
32
|
-
<LOAD_PATH number="1" string0="$MODULE_DIR$/lib/legion" />
|
33
|
-
<I18N_FOLDERS number="0" />
|
34
|
-
</component>
|
35
|
-
</module>
|
data/.idea/misc.xml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<project version="4">
|
3
|
-
<component name="JavaScriptSettings">
|
4
|
-
<option name="languageLevel" value="ES6" />
|
5
|
-
</component>
|
6
|
-
<component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-2.6.3" project-jdk-type="RUBY_SDK" />
|
7
|
-
</project>
|
data/.idea/modules.xml
DELETED
data/.idea/vagrant.xml
DELETED
data/.idea/workspace.xml
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<project version="4">
|
3
|
-
<component name="CoverageOptionsProvider">
|
4
|
-
<option name="myAddOrReplace" value="0" />
|
5
|
-
</component>
|
6
|
-
<component name="Git.Settings">
|
7
|
-
<option name="PUSH_AUTO_UPDATE" value="true" />
|
8
|
-
<option name="ROOT_SYNC" value="DONT_SYNC" />
|
9
|
-
</component>
|
10
|
-
<component name="PropertiesComponent">
|
11
|
-
<property name="settings.editor.selected.configurable" value="reference.settingsdialog.project.vagrant" />
|
12
|
-
</component>
|
13
|
-
</project>
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'bundler/setup'
|
4
|
-
require 'legion/extensions/node'
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require 'irb'
|
14
|
-
IRB.start(__FILE__)
|