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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2cee858be81735f0539ebb56696ad2e33e260f37ef0a7163e260838ca720771d
4
- data.tar.gz: aace018115e35bff3ec332546063f88e32b82658916f43e3de356e4c1fc21cf6
3
+ metadata.gz: 534449f95e46f270b6732691e6b64cd605332d6758857560fe30ef670dcf90d0
4
+ data.tar.gz: 32547448013fcfe17e5f5d4d1bfd7f5e992825de150ead34bbb5c1d903d36dd3
5
5
  SHA512:
6
- metadata.gz: ebab075482efdbd442b0b70f46a25427e6818226c4abf4a54a03abf334c56bf448c17f04b8562f9d5f2074baa3370c5ee83ae96978a63baf9fcf2bf0884fb37e
7
- data.tar.gz: 5df29adbee2fb4108bf685affb47d1bfe63e4b1edfb695a7daf791c65e77ad807ab0a9129a827538875a6150014630c11d45b7413d7e7f8a1ccdf3b695d385ae
6
+ metadata.gz: '06229b6f8663907ea832843bc24c401a022364ecfc5ac9c035c2921966c0683535c1872153911cd0268656dc40c8a79d9ac2dd54024e161633bbe23f086fa3a0'
7
+ data.tar.gz: 646f8fc8f941ea54bdfcd671180de7a4b5088a4bc9ede0fb41e1e920a8cf238768a75b3372b80f843e03066bab083bb4a17ea936073f41c89071c69f8f0d5917
@@ -1,62 +1,117 @@
1
1
  version: 2.1
2
2
  orbs:
3
- ruby: circleci/ruby@0.2.1
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: circleci/ruby:2.7-node
9
+ - image: cimg/ruby:2.7
10
10
  steps:
11
11
  - checkout
12
- - ruby/load-cache
13
- - ruby/install-deps
14
- - run:
15
- name: Run Rubocop
16
- command: bundle exec rubocop
17
- - ruby/save-cache
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: circleci/ruby:2.5
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
- - ruby/load-cache
26
- - run:
27
- name: update bundler
28
- command: gem update bundler
29
- - ruby/install-deps
30
- - ruby/run-tests
31
- - ruby/save-cache
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: circleci/ruby:2.6
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
- - ruby/load-cache
40
- - run:
41
- name: update bundler
42
- command: gem update bundler
43
- - ruby/install-deps
44
- - ruby/run-tests
45
- - ruby/save-cache
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
- - ruby/load-cache
54
- - run:
55
- name: update bundler
56
- command: gem update bundler
57
- - ruby/install-deps
58
- - ruby/run-tests
59
- - ruby/save-cache
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- legion-crypt (0.2.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.0.0)
30
- connection_pool
31
- dalli
32
- redis
33
- legion-data (1.1.4)
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.2)
39
- legion-json (1.1.2)
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.5)
48
+ legion-transport (1.1.6)
48
49
  bunny
49
50
  concurrent-ruby
50
51
  legion-json
51
- legionio (0.3.4)
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.9.0)
80
- rspec-core (~> 3.9.0)
81
- rspec-expectations (~> 3.9.0)
82
- rspec-mocks (~> 3.9.0)
83
- rspec-core (3.9.3)
84
- rspec-support (~> 3.9.3)
85
- rspec-expectations (3.9.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.9.0)
88
- rspec-mocks (3.9.1)
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.9.0)
91
- rspec-support (3.9.4)
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.0.0)
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.6.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.0)
105
+ rubocop-ast (1.1.1)
104
106
  parser (>= 2.7.1.5)
105
107
  ruby-progressbar (1.10.1)
106
- sequel (5.37.0)
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
- 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/crypt`. 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
-
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
@@ -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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module Crypt
5
- VERSION = '0.2.2'
5
+ VERSION = '0.2.3'
6
6
  end
7
7
  end
@@ -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.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-10-28 00:00:00.000000000 Z
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: '0'
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: '0'
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
- - bin/console
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.2
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: []
@@ -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__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here