pct 0.4.0 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +20 -0
- data/lib/pct.rb +5 -6
- data/lib/pct/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20f705dbdf2b39b9af2903d31773fd8c3373358f76e16a3630da0d40290b2b7b
|
4
|
+
data.tar.gz: 5646bd996018cc0e572f338eb61a648d4ce4409ddedb3268f8f3f413a5c9a2ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2764663c9b707fd0071f336bb1476bd352ada66679cf15fd89558f2fb2b118a5b83184fd021ebfae55053aab347a144b98f5af283385cac5b1e91e5fbe73bf9
|
7
|
+
data.tar.gz: 183650a34f5f422ca85023917964c8ddbaf6c309c7e0952a789d49c458b5a3d3a474ae547afc9ee93cc34b506bd7b4823d48fd138d907a8476fc3fea7dacccae
|
@@ -0,0 +1,20 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@v1
|
12
|
+
- name: Set up Ruby 2.6
|
13
|
+
uses: actions/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
ruby-version: 2.6.x
|
16
|
+
- name: Build and test with Rspec
|
17
|
+
run: |
|
18
|
+
gem install bundler
|
19
|
+
bundle install --jobs 4 --retry 3
|
20
|
+
bundle exec rspec
|
data/lib/pct.rb
CHANGED
@@ -8,13 +8,12 @@ module Pct
|
|
8
8
|
class Error < StandardError; end
|
9
9
|
|
10
10
|
class Decryptable
|
11
|
-
def initialize(
|
12
|
-
@client = client
|
11
|
+
def initialize(crypted)
|
13
12
|
@crypted = crypted
|
14
13
|
end
|
15
14
|
|
16
15
|
def decrypted
|
17
|
-
@decrypted ||= client.decrypt({
|
16
|
+
@decrypted ||= Pct.client.decrypt({
|
18
17
|
ciphertext_blob: Base64.decode64(@crypted)
|
19
18
|
}).plaintext
|
20
19
|
end
|
@@ -38,15 +37,15 @@ module Pct
|
|
38
37
|
|
39
38
|
def self.load_config(path)
|
40
39
|
config = YAML.load(File.read(path))
|
41
|
-
|
40
|
+
to_usable(config['configuration'])
|
42
41
|
end
|
43
42
|
|
44
|
-
def to_usable(configuration)
|
43
|
+
def self.to_usable(configuration)
|
45
44
|
Hash[configuration.map do |k, v|
|
46
45
|
if v.is_a?(Hash)
|
47
46
|
[k, to_usable(v)]
|
48
47
|
else
|
49
|
-
[k, Decryptable.new(
|
48
|
+
[k, Decryptable.new(v)]
|
50
49
|
end
|
51
50
|
end]
|
52
51
|
end
|
data/lib/pct/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emily Dobervich
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -74,6 +74,7 @@ executables:
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
+
- ".github/workflows/ruby.yml"
|
77
78
|
- ".gitignore"
|
78
79
|
- ".rspec"
|
79
80
|
- ".travis.yml"
|
@@ -107,8 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
108
|
- !ruby/object:Gem::Version
|
108
109
|
version: '0'
|
109
110
|
requirements: []
|
110
|
-
|
111
|
-
rubygems_version: 2.7.6
|
111
|
+
rubygems_version: 3.0.3
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: ''
|