legion-crypt 0.2.2 → 0.2.3
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 +89 -34
- data/Gemfile.lock +32 -28
- data/README.md +1 -42
- data/bitbucket-pipelines.yml +18 -0
- data/legion-crypt.gemspec +2 -2
- data/lib/legion/crypt/version.rb +1 -1
- data/sonar-project.properties +11 -0
- metadata +24 -10
- data/bin/console +0 -15
- 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: 534449f95e46f270b6732691e6b64cd605332d6758857560fe30ef670dcf90d0
|
4
|
+
data.tar.gz: 32547448013fcfe17e5f5d4d1bfd7f5e992825de150ead34bbb5c1d903d36dd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '06229b6f8663907ea832843bc24c401a022364ecfc5ac9c035c2921966c0683535c1872153911cd0268656dc40c8a79d9ac2dd54024e161633bbe23f086fa3a0'
|
7
|
+
data.tar.gz: 646f8fc8f941ea54bdfcd671180de7a4b5088a4bc9ede0fb41e1e920a8cf238768a75b3372b80f843e03066bab083bb4a17ea936073f41c89071c69f8f0d5917
|
data/.circleci/config.yml
CHANGED
@@ -1,62 +1,117 @@
|
|
1
1
|
version: 2.1
|
2
2
|
orbs:
|
3
|
-
ruby: circleci/ruby@
|
3
|
+
ruby: circleci/ruby@1.1.2
|
4
4
|
sonarcloud: sonarsource/sonarcloud@1.0.2
|
5
5
|
|
6
6
|
jobs:
|
7
7
|
"rubocop":
|
8
8
|
docker:
|
9
|
-
- image:
|
9
|
+
- image: cimg/ruby:2.7
|
10
10
|
steps:
|
11
11
|
- checkout
|
12
|
-
-
|
13
|
-
|
14
|
-
- run:
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
- restore_cache:
|
13
|
+
key: "bundler-cache-mri-2"
|
14
|
+
- run: bundle update
|
15
|
+
- run: bundle exec rubocop --format=json --out=rubocop-result.json
|
16
|
+
- store_test_results:
|
17
|
+
path: rubocop-result.json
|
18
|
+
- sonarcloud/scan
|
19
|
+
- run: bundle exec rubocop
|
20
|
+
- save_cache:
|
21
|
+
key: "bundler-cache-mri-2"
|
22
|
+
paths:
|
23
|
+
- "/usr/local/bundle"
|
24
|
+
- "/home/circleci/.rubygems"
|
18
25
|
"ruby-two-five":
|
19
26
|
docker:
|
20
|
-
- image:
|
21
|
-
- image: memcached:1.5-alpine
|
27
|
+
- image: cimg/ruby:2.5
|
22
28
|
- image: rabbitmq:3.7
|
23
29
|
steps:
|
24
30
|
- checkout
|
25
|
-
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
31
|
+
- restore_cache:
|
32
|
+
key: "bundler-cache-mri-2"
|
33
|
+
- run: bundle update
|
34
|
+
- save_cache:
|
35
|
+
key: "bundler-cache-mri-2"
|
36
|
+
paths:
|
37
|
+
- "/usr/local/bundle"
|
38
|
+
- "/home/circleci/.rubygems"
|
39
|
+
- run: bundle exec rspec --format progress --format RspecJunitFormatter -o rspec-results.xml
|
40
|
+
- store_test_results:
|
41
|
+
path: rspec-results.xml
|
42
|
+
- sonarcloud/scan
|
32
43
|
"ruby-two-six":
|
33
44
|
docker:
|
34
|
-
- image:
|
35
|
-
- image: memcached:1.5-alpine
|
45
|
+
- image: cimg/ruby:2.6
|
36
46
|
- image: rabbitmq:3.7
|
37
47
|
steps:
|
38
48
|
- checkout
|
39
|
-
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
49
|
+
- restore_cache:
|
50
|
+
key: "bundler-cache-mri-2"
|
51
|
+
- run: bundle update
|
52
|
+
- save_cache:
|
53
|
+
key: "bundler-cache-mri-2"
|
54
|
+
paths:
|
55
|
+
- "/usr/local/bundle"
|
56
|
+
- "/home/circleci/.rubygems"
|
57
|
+
- run: bundle exec rspec --format progress --format RspecJunitFormatter -o rspec-results.xml
|
58
|
+
- store_test_results:
|
59
|
+
path: rspec-results.xml
|
60
|
+
- sonarcloud/scan
|
46
61
|
"ruby-two-seven":
|
47
62
|
docker:
|
48
63
|
- image: circleci/ruby:2.7
|
49
|
-
- image: memcached:1.5-alpine
|
50
64
|
- image: rabbitmq:3.7
|
51
65
|
steps:
|
52
66
|
- checkout
|
53
|
-
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
67
|
+
- restore_cache:
|
68
|
+
key: "bundler-cache-mri-2"
|
69
|
+
- run: bundle update
|
70
|
+
- save_cache:
|
71
|
+
key: "bundler-cache-mri-2"
|
72
|
+
paths:
|
73
|
+
- "/usr/local/bundle"
|
74
|
+
- "/home/circleci/.rubygems"
|
75
|
+
- run: bundle exec rspec --format progress --format RspecJunitFormatter -o rspec-results.xml
|
76
|
+
- store_test_results:
|
77
|
+
path: rspec-results.xml
|
78
|
+
- sonarcloud/scan
|
79
|
+
"jruby92-11jdk":
|
80
|
+
docker:
|
81
|
+
- image: circleci/jruby:9.2-jre11
|
82
|
+
- image: rabbitmq:3.7
|
83
|
+
steps:
|
84
|
+
- checkout
|
85
|
+
- restore_cache:
|
86
|
+
key: "bundler cache jruby92-11jdk"
|
87
|
+
- run: bundle update
|
88
|
+
- save_cache:
|
89
|
+
key: "bundler cache jruby92-11jdk"
|
90
|
+
paths:
|
91
|
+
- "/usr/local/bundle"
|
92
|
+
- "/home/circleci/.rubygems"
|
93
|
+
- run: bundle exec rspec --format progress --format RspecJunitFormatter -o rspec-results.xml
|
94
|
+
- store_test_results:
|
95
|
+
path: rspec-results.xml
|
96
|
+
- sonarcloud/scan
|
97
|
+
"jruby92-14jdk":
|
98
|
+
docker:
|
99
|
+
- image: circleci/jruby:9.2-jdk14
|
100
|
+
- image: rabbitmq:3.7
|
101
|
+
steps:
|
102
|
+
- checkout
|
103
|
+
- restore_cache:
|
104
|
+
key: "bundler cache jruby92-14jdk"
|
105
|
+
- run: bundle update
|
106
|
+
- save_cache:
|
107
|
+
key: "bundler cache jruby92-14jdk"
|
108
|
+
paths:
|
109
|
+
- "/usr/local/bundle"
|
110
|
+
- "/home/circleci/.rubygems"
|
111
|
+
- run: bundle exec rspec --format progress --format RspecJunitFormatter -o rspec-results.xml
|
112
|
+
- store_test_results:
|
113
|
+
path: rspec-results.xml
|
114
|
+
- sonarcloud/scan
|
60
115
|
|
61
116
|
workflows:
|
62
117
|
version: 2
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
legion-crypt (0.2.
|
4
|
+
legion-crypt (0.2.3)
|
5
5
|
vault
|
6
6
|
|
7
7
|
GEM
|
@@ -24,19 +24,20 @@ GEM
|
|
24
24
|
docile (1.3.2)
|
25
25
|
hashdiff (1.0.1)
|
26
26
|
json (2.3.1)
|
27
|
-
json (2.3.1-java)
|
28
27
|
json_pure (2.3.1)
|
29
|
-
legion-cache (1.
|
30
|
-
connection_pool
|
31
|
-
dalli
|
32
|
-
redis
|
33
|
-
legion-
|
28
|
+
legion-cache (1.1.0)
|
29
|
+
connection_pool (>= 2.2.3)
|
30
|
+
dalli (>= 2.7)
|
31
|
+
redis (>= 4.2)
|
32
|
+
legion-cli (0.2.0)
|
33
|
+
thor
|
34
|
+
legion-data (1.1.5)
|
34
35
|
legion-logging
|
35
36
|
legion-settings
|
36
37
|
mysql2
|
37
38
|
sequel
|
38
|
-
legion-exceptions (1.1.
|
39
|
-
legion-json (1.1.
|
39
|
+
legion-exceptions (1.1.4)
|
40
|
+
legion-json (1.1.3)
|
40
41
|
json_pure
|
41
42
|
multi_json
|
42
43
|
legion-logging (1.1.3)
|
@@ -44,17 +45,18 @@ GEM
|
|
44
45
|
legion-settings (1.1.2)
|
45
46
|
legion-json
|
46
47
|
legion-logging
|
47
|
-
legion-transport (1.1.
|
48
|
+
legion-transport (1.1.6)
|
48
49
|
bunny
|
49
50
|
concurrent-ruby
|
50
51
|
legion-json
|
51
|
-
legionio (0.3.
|
52
|
+
legionio (0.3.5)
|
52
53
|
bunny
|
53
54
|
concurrent-ruby
|
54
55
|
concurrent-ruby-ext
|
55
56
|
daemons
|
56
57
|
hashdiff
|
57
58
|
legion-cache
|
59
|
+
legion-cli
|
58
60
|
legion-crypt
|
59
61
|
legion-data
|
60
62
|
legion-exceptions
|
@@ -76,49 +78,50 @@ GEM
|
|
76
78
|
redis (4.2.2)
|
77
79
|
regexp_parser (1.8.2)
|
78
80
|
rexml (3.2.4)
|
79
|
-
rspec (3.
|
80
|
-
rspec-core (~> 3.
|
81
|
-
rspec-expectations (~> 3.
|
82
|
-
rspec-mocks (~> 3.
|
83
|
-
rspec-core (3.
|
84
|
-
rspec-support (~> 3.
|
85
|
-
rspec-expectations (3.
|
81
|
+
rspec (3.10.0)
|
82
|
+
rspec-core (~> 3.10.0)
|
83
|
+
rspec-expectations (~> 3.10.0)
|
84
|
+
rspec-mocks (~> 3.10.0)
|
85
|
+
rspec-core (3.10.0)
|
86
|
+
rspec-support (~> 3.10.0)
|
87
|
+
rspec-expectations (3.10.0)
|
86
88
|
diff-lcs (>= 1.2.0, < 2.0)
|
87
|
-
rspec-support (~> 3.
|
88
|
-
rspec-mocks (3.
|
89
|
+
rspec-support (~> 3.10.0)
|
90
|
+
rspec-mocks (3.10.0)
|
89
91
|
diff-lcs (>= 1.2.0, < 2.0)
|
90
|
-
rspec-support (~> 3.
|
91
|
-
rspec-support (3.
|
92
|
+
rspec-support (~> 3.10.0)
|
93
|
+
rspec-support (3.10.0)
|
92
94
|
rspec_junit_formatter (0.4.1)
|
93
95
|
rspec-core (>= 2, < 4, != 2.12.0)
|
94
|
-
rubocop (1.
|
96
|
+
rubocop (1.2.0)
|
95
97
|
parallel (~> 1.10)
|
96
98
|
parser (>= 2.7.1.5)
|
97
99
|
rainbow (>= 2.2.2, < 4.0)
|
98
100
|
regexp_parser (>= 1.8)
|
99
101
|
rexml
|
100
|
-
rubocop-ast (>= 0.
|
102
|
+
rubocop-ast (>= 1.0.1)
|
101
103
|
ruby-progressbar (~> 1.7)
|
102
104
|
unicode-display_width (>= 1.4.0, < 2.0)
|
103
|
-
rubocop-ast (1.1.
|
105
|
+
rubocop-ast (1.1.1)
|
104
106
|
parser (>= 2.7.1.5)
|
105
107
|
ruby-progressbar (1.10.1)
|
106
|
-
sequel (5.
|
108
|
+
sequel (5.38.0)
|
107
109
|
simplecov (0.17.1)
|
108
110
|
docile (~> 1.1)
|
109
111
|
json (>= 1.8, < 3)
|
110
112
|
simplecov-html (~> 0.10.0)
|
111
113
|
simplecov-html (0.10.2)
|
114
|
+
simplecov_json_formatter (0.1.2)
|
115
|
+
thor (1.0.1)
|
112
116
|
unicode-display_width (1.7.0)
|
113
117
|
vault (0.15.0)
|
114
118
|
aws-sigv4
|
115
119
|
|
116
120
|
PLATFORMS
|
117
|
-
java
|
118
121
|
ruby
|
119
122
|
|
120
123
|
DEPENDENCIES
|
121
|
-
bundler
|
124
|
+
bundler (>= 2)
|
122
125
|
legion-crypt!
|
123
126
|
legion-logging
|
124
127
|
legion-settings
|
@@ -129,6 +132,7 @@ DEPENDENCIES
|
|
129
132
|
rspec_junit_formatter
|
130
133
|
rubocop
|
131
134
|
simplecov (< 0.18.0)
|
135
|
+
simplecov_json_formatter
|
132
136
|
|
133
137
|
BUNDLED WITH
|
134
138
|
2.1.4
|
data/README.md
CHANGED
@@ -1,44 +1,3 @@
|
|
1
1
|
# Legion::Crypt
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
|
-
|
7
|
-
## Installation
|
8
|
-
|
9
|
-
Add this line to your application's Gemfile:
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'legion-crypt'
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
$ bundle install
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
$ gem install legion-crypt
|
22
|
-
|
23
|
-
## Usage
|
24
|
-
|
25
|
-
Ciper class
|
26
|
-
1) check to see if connected to vault, if so, use that
|
27
|
-
2) check to see if it was set via config
|
28
|
-
3) request it from the cluster
|
29
|
-
4) generate it
|
30
|
-
|
31
|
-
## Development
|
32
|
-
|
33
|
-
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.
|
34
|
-
|
35
|
-
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).
|
36
|
-
|
37
|
-
## Contributing
|
38
|
-
|
39
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/legion-crypt.
|
40
|
-
|
41
|
-
|
42
|
-
## License
|
43
|
-
|
44
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
3
|
+
The Legion encryption module
|
@@ -0,0 +1,18 @@
|
|
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 bundler gem-release rspec
|
11
|
+
- bundle install
|
12
|
+
- (umask 077 ; echo $gem_creds | base64 --decode > ~/.gem/credentials)
|
13
|
+
- gem release
|
14
|
+
artifacts:
|
15
|
+
- pkg/**
|
16
|
+
definitions:
|
17
|
+
caches:
|
18
|
+
bundler: /usr/local/bundle
|
data/legion-crypt.gemspec
CHANGED
@@ -21,12 +21,11 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
22
22
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
23
23
|
end
|
24
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
24
|
spec.require_paths = ['lib']
|
26
25
|
|
27
26
|
spec.add_dependency 'vault'
|
28
27
|
|
29
|
-
spec.add_development_dependency 'bundler'
|
28
|
+
spec.add_development_dependency 'bundler', '>= 2'
|
30
29
|
spec.add_development_dependency 'legionio'
|
31
30
|
spec.add_development_dependency 'legion-logging'
|
32
31
|
spec.add_development_dependency 'legion-settings'
|
@@ -36,4 +35,5 @@ Gem::Specification.new do |spec|
|
|
36
35
|
spec.add_development_dependency 'rspec_junit_formatter'
|
37
36
|
spec.add_development_dependency 'rubocop'
|
38
37
|
spec.add_development_dependency 'simplecov', '< 0.18.0'
|
38
|
+
spec.add_development_dependency 'simplecov_json_formatter'
|
39
39
|
end
|
data/lib/legion/crypt/version.rb
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
sonar.projectKey=legion-io_legion-crypt
|
2
|
+
sonar.organization=legion-io
|
3
|
+
sonar.sources=.
|
4
|
+
sonar.exclusions=vendor/**
|
5
|
+
sonar.coverage.exclusions=spec/**
|
6
|
+
sonar.ruby.coverage.reportPath=coverage/.resultset.json
|
7
|
+
sonar.ruby.file.suffixes=rb,ruby
|
8
|
+
sonar.ruby.coverage.framework=RSpec
|
9
|
+
sonar.ruby.rubocopConfig=.rubocop.yml
|
10
|
+
sonar.ruby.rubocop.reportPath=rubocop-result.json
|
11
|
+
sonar.ruby.rubocop.filePath=.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: legion-crypt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esity
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: vault
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: legionio
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,6 +164,20 @@ dependencies:
|
|
164
164
|
- - "<"
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: 0.18.0
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: simplecov_json_formatter
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
167
181
|
description: Integrates with Hashicorps vault and other encryption type things
|
168
182
|
email:
|
169
183
|
- matthewdiverson@gmail.com
|
@@ -180,8 +194,7 @@ files:
|
|
180
194
|
- LICENSE.txt
|
181
195
|
- README.md
|
182
196
|
- Rakefile
|
183
|
-
-
|
184
|
-
- bin/setup
|
197
|
+
- bitbucket-pipelines.yml
|
185
198
|
- legion-crypt.gemspec
|
186
199
|
- lib/legion/crypt.rb
|
187
200
|
- lib/legion/crypt/cipher.rb
|
@@ -190,6 +203,7 @@ files:
|
|
190
203
|
- lib/legion/crypt/vault_renewer.rb
|
191
204
|
- lib/legion/crypt/version.rb
|
192
205
|
- settings/transport.json
|
206
|
+
- sonar-project.properties
|
193
207
|
homepage: https://bitbucket.org/legion-io/legion-vault/
|
194
208
|
licenses:
|
195
209
|
- MIT
|
@@ -197,7 +211,7 @@ metadata:
|
|
197
211
|
homepage_uri: https://bitbucket.org/legion-io/legion-vault/
|
198
212
|
source_code_uri: https://bitbucket.org/legion-io/legion/
|
199
213
|
changelog_uri: https://bitbucket.org/legion-io/legion/src/master/CHANGELOG.md
|
200
|
-
post_install_message:
|
214
|
+
post_install_message:
|
201
215
|
rdoc_options: []
|
202
216
|
require_paths:
|
203
217
|
- lib
|
@@ -212,8 +226,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
212
226
|
- !ruby/object:Gem::Version
|
213
227
|
version: '0'
|
214
228
|
requirements: []
|
215
|
-
rubygems_version: 3.1.
|
216
|
-
signing_key:
|
229
|
+
rubygems_version: 3.1.4
|
230
|
+
signing_key:
|
217
231
|
specification_version: 4
|
218
232
|
summary: Legion::Vault is used to keep things safe
|
219
233
|
test_files: []
|
data/bin/console
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require 'bundler/setup'
|
5
|
-
require 'legion/crypt'
|
6
|
-
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
9
|
-
|
10
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
-
# require "pry"
|
12
|
-
# Pry.start
|
13
|
-
|
14
|
-
require 'irb'
|
15
|
-
IRB.start(__FILE__)
|