pct 0.4.0 → 0.7.2

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: b1f3eda427a8c6faa05bde5f37b542a2025c3adaf1b4e00b5ede5499a5805fc0
4
- data.tar.gz: c8c11080fc227c4ab87e81553c805656c0c0ed247c32fce534233493f619e4a1
3
+ metadata.gz: 20f705dbdf2b39b9af2903d31773fd8c3373358f76e16a3630da0d40290b2b7b
4
+ data.tar.gz: 5646bd996018cc0e572f338eb61a648d4ce4409ddedb3268f8f3f413a5c9a2ea
5
5
  SHA512:
6
- metadata.gz: 6b8ab87ae536ac1fe4c19eb5726d5141f2616103f27d06fd2803144575c31d382840780f74476ce03ca0b98bc6ba4a31ba68155abd25ac2a77faaebf9c28d1b5
7
- data.tar.gz: 03d92501baf2b58e796bd0f8e3722951ec6c6d33a313f5bb7e983f08e902a15dcc59834ccfd7384fdfcdae2a561ae22a408afc555604a08fe9469d55eef84df1
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(client, crypted)
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
- to_decrypted(config['configuration'])
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(client, v)]
48
+ [k, Decryptable.new(v)]
50
49
  end
51
50
  end]
52
51
  end
@@ -1,3 +1,3 @@
1
1
  module Pct
2
- VERSION = "0.4.0"
2
+ VERSION = "0.7.2"
3
3
  end
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.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: 2019-04-18 00:00:00.000000000 Z
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
- rubyforge_project:
111
- rubygems_version: 2.7.6
111
+ rubygems_version: 3.0.3
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: ''