slosilo 2.2.2 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eee5855bf8948e460edebcc7e04399ad32ea9085f101860ddddb4687139a0bf8
4
- data.tar.gz: 415fa1a618fbffda2ebf1dcb59abc42285d11d01afbc4697299708bbe3bd01fb
3
+ metadata.gz: 81d8f2c013b6f88d01bd7dd4c44b39c7cf0ffaa9385afca3e7ea826dae0855c8
4
+ data.tar.gz: acd627ef6ca45a404ce08c7bc680c8db7ea1ebdbe10d45b248ae09e59e804a02
5
5
  SHA512:
6
- metadata.gz: '098214ef9bbb3ac810a28425e943fe81528573d54e7cdf85261c45cd1ab95fdc57a2387c629adc246339bc04488ff01a04d5655163bf8f423c2edacbb60f7a80'
7
- data.tar.gz: 163a3a8097d4bafc592718d1bb37f1f2f8e25cbb5b637ba68c6478d787f131e08cc5d2a017f9d80bb5127c757d8f817b0a39c0e7c77557b45fc9e01206139305
6
+ metadata.gz: '098a049570888513d10bf23edacfb8c566f605a08a9e918a2a06c15839d406b14696edaf76c49b84820d3c0fc1147b0f7f754c74fdad680a98f919d134cabcc7'
7
+ data.tar.gz: 6cef96001fcc2932c23e106c732d9e7722afd2f6a8af11e99a023a49aa005bdc8ff9f3fa4ce278644b753acfe0e50953e14cf86114e78877368b95107a1126c0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # v3.0.0
2
+
3
+ * Transition to Ruby 3. Consuming projects based on Ruby 2 shall use slosilo V2.X.X.
4
+
1
5
  # v2.2.2
2
6
 
3
7
  * Add rake task `slosilo:recalculate_fingerprints` which rehashes the fingerprints in the keystore.
data/Jenkinsfile CHANGED
@@ -10,13 +10,22 @@ pipeline {
10
10
 
11
11
  stages {
12
12
  stage('Test') {
13
- steps {
14
- sh './test.sh'
13
+ parallel {
14
+ stage('Run tests on EE') {
15
+ agent { label 'executor-v2-rhel-ee' }
16
+ steps {
17
+ sh './test.sh'
18
+ }
19
+ post { always {
20
+ stash name: 'eeTestResults', includes: 'spec/reports/*.xml', allowEmpty:true
21
+ }}
22
+ }
15
23
 
16
- junit 'spec/reports/*.xml'
17
- cobertura coberturaReportFile: 'spec/coverage/coverage.xml'
18
- sh 'cp spec/coverage/coverage.xml cobertura.xml'
19
- ccCoverage("cobertura", "github.com/cyberark/slosilo")
24
+ stage('Run tests') {
25
+ steps {
26
+ sh './test.sh'
27
+ }
28
+ }
20
29
  }
21
30
  }
22
31
 
@@ -52,6 +61,14 @@ pipeline {
52
61
 
53
62
  post {
54
63
  always {
64
+ dir('ee-results'){
65
+ unstash 'eeTestResults'
66
+ }
67
+ junit 'spec/reports/*.xml, ee-results/spec/reports/*.xml'
68
+ cobertura coberturaReportFile: 'spec/coverage/coverage.xml'
69
+ sh 'cp spec/coverage/coverage.xml cobertura.xml'
70
+ ccCoverage("cobertura", "github.com/cyberark/slosilo")
71
+
55
72
  cleanupAndNotify(currentBuild.currentResult)
56
73
  }
57
74
  }
data/README.md CHANGED
@@ -19,6 +19,9 @@ And then execute:
19
19
 
20
20
  ## Compatibility
21
21
 
22
+ Version 3.0 introduced full transition to Ruby 3.
23
+ Consumers who use slosilo in Ruby 2 projects, shall use slosilo V2.X.X.
24
+
22
25
  Version 2.0 introduced new symmetric encryption scheme using AES-256-GCM
23
26
  for authenticated encryption. It allows you to provide AAD on all symmetric
24
27
  encryption primitives. It's also **NOT COMPATIBLE** with CBC used in version <2.
@@ -26,7 +26,10 @@ module Slosilo
26
26
  aad = options[:aad]
27
27
  # note nil.to_s is "", which is exactly the right thing
28
28
  auth_data = aad.respond_to?(:to_proc) ? aad.to_proc : proc{ |_| aad.to_s }
29
- raise ":aad proc must take one argument" unless auth_data.arity.abs == 1 # take abs to allow *args arity, -1
29
+
30
+ # In ruby 3 .arity for #proc returns both 1 and 2, depends on internal #proc
31
+ # This method is also being called with aad which is string, in such case the arity is 1
32
+ raise ":aad proc must take two arguments" unless (auth_data.arity.abs == 2 || auth_data.arity.abs == 1)
30
33
 
31
34
  # push a module onto the inheritance hierarchy
32
35
  # this allows calling super in classes
@@ -1,3 +1,3 @@
1
1
  module Slosilo
2
- VERSION = "2.2.2"
2
+ VERSION = "3.0.0"
3
3
  end
data/slosilo.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
22
22
  gem.name = "slosilo"
23
23
  gem.require_paths = ["lib"]
24
24
  gem.version = Slosilo::VERSION
25
- gem.required_ruby_version = '>= 1.9.3'
25
+ gem.required_ruby_version = '>= 3.0.0'
26
26
 
27
27
  gem.add_development_dependency 'rake'
28
28
  gem.add_development_dependency 'rspec', '~> 3.0'
@@ -30,13 +30,13 @@ describe Slosilo::Adapters::SequelAdapter do
30
30
  describe "#put_key" do
31
31
  let(:id) { "id" }
32
32
  it "creates the key" do
33
- expect(model).to receive(:create).with id: id, key: key.to_der
33
+ expect(model).to receive(:create).with(hash_including(:id => id, :key => key.to_der))
34
34
  allow(model).to receive_messages columns: [:id, :key]
35
35
  subject.put_key id, key
36
36
  end
37
37
 
38
38
  it "adds the fingerprint if feasible" do
39
- expect(model).to receive(:create).with id: id, key: key.to_der, fingerprint: key.fingerprint
39
+ expect(model).to receive(:create).with(hash_including(:id => id, :key => key.to_der, :fingerprint => key.fingerprint))
40
40
  allow(model).to receive_messages columns: [:id, :key, :fingerprint]
41
41
  subject.put_key id, key
42
42
  end
data/test.sh CHANGED
@@ -3,7 +3,7 @@
3
3
  iid=slosilo-test-$(date +%s)
4
4
 
5
5
  docker build -t $iid -f - . << EOF
6
- FROM ruby
6
+ FROM ruby:3.0
7
7
  WORKDIR /app
8
8
  COPY Gemfile slosilo.gemspec ./
9
9
  RUN bundle
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slosilo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafał Rzepecki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-26 00:00:00.000000000 Z
11
+ date: 2022-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -146,7 +146,6 @@ extra_rdoc_files: []
146
146
  files:
147
147
  - ".dockerignore"
148
148
  - ".github/CODEOWNERS"
149
- - ".github/PULL_REQUEST_TEMPLATE.md"
150
149
  - ".gitignore"
151
150
  - ".gitleaks.toml"
152
151
  - ".kateproject"
@@ -199,14 +198,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
199
198
  requirements:
200
199
  - - ">="
201
200
  - !ruby/object:Gem::Version
202
- version: 1.9.3
201
+ version: 3.0.0
203
202
  required_rubygems_version: !ruby/object:Gem::Requirement
204
203
  requirements:
205
204
  - - ">="
206
205
  - !ruby/object:Gem::Version
207
206
  version: '0'
208
207
  requirements: []
209
- rubygems_version: 3.1.2
208
+ rubygems_version: 3.1.6
210
209
  signing_key:
211
210
  specification_version: 4
212
211
  summary: Store SSL keys in a database
@@ -1,21 +0,0 @@
1
- ### What does this PR do?
2
- - _What's changed? Why were these changes made?_
3
- - _How should the reviewer approach this PR, especially if manual tests are required?_
4
- - _Are there relevant screenshots you can add to the PR description?_
5
-
6
- ### What ticket does this PR close?
7
- Connected to #[relevant GitHub issues, eg 76]
8
-
9
- ### Checklists
10
-
11
- #### Change log
12
- - [ ] The CHANGELOG has been updated, or
13
- - [ ] This PR does not include user-facing changes and doesn't require a CHANGELOG update
14
-
15
- #### Test coverage
16
- - [ ] This PR includes new unit and integration tests to go with the code changes, or
17
- - [ ] The changes in this PR do not require tests
18
-
19
- #### Documentation
20
- - [ ] Docs (e.g. `README`s) were updated in this PR, and/or there is a follow-on issue to update docs, or
21
- - [ ] This PR does not require updating any documentation