yaml_vault 1.3.1 → 1.3.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/rspec.yml +27 -0
- data/README.md +1 -1
- data/lib/yaml_vault/version.rb +1 -1
- data/lib/yaml_vault/yaml_compat.rb +21 -0
- data/lib/yaml_vault.rb +2 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e89611f7bd2e7ca8692e1b689c0087babeec416a2350d1513e35b05d3c1e6758
|
4
|
+
data.tar.gz: 0b10d6e6dca3dfd371cb6dc19b1131ffd046d32b8718d02acea57f058559ee4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 735ba23c5e3c063da8f3fb98ad73486bb0bff7ee99d83fdc7a26875dbd9b53ff4666f0cf6cb2d8ecb7687f690b960c877e1dd2ceb10ef319b91dce07a003170c
|
7
|
+
data.tar.gz: 422238e47e86038790fe12aa481d20b832e7f6a8eb66996db8c3df304d493835202003cfd3a4ecd330265ef27425cf8d4a3e7c7964148de723f8c3974b060cc5
|
@@ -0,0 +1,27 @@
|
|
1
|
+
name: RSpec
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
test:
|
10
|
+
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby-version: ['2.7', '3.0', '3.1']
|
15
|
+
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v2
|
18
|
+
- name: Set up Ruby
|
19
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
20
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
21
|
+
# uses: ruby/setup-ruby@v1
|
22
|
+
uses: ruby/setup-ruby@v1.110.0
|
23
|
+
with:
|
24
|
+
ruby-version: ${{ matrix.ruby-version }}
|
25
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
26
|
+
- name: Run tests
|
27
|
+
run: bundle exec rake
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# YamlVault
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/yaml_vault.svg)](https://badge.fury.io/rb/yaml_vault)
|
3
|
-
[![
|
3
|
+
[![RSpec](https://github.com/joker1007/yaml_vault/actions/workflows/rspec.yml/badge.svg)](https://github.com/joker1007/yaml_vault/actions/workflows/rspec.yml)
|
4
4
|
|
5
5
|
Yaml file encryption/decryption helper.
|
6
6
|
|
data/lib/yaml_vault/version.rb
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
module YamlVault
|
2
|
+
module YAMLCompat
|
3
|
+
refine YAML.singleton_class do
|
4
|
+
def load(yaml, **kw)
|
5
|
+
if YAML.respond_to?(:unsafe_load)
|
6
|
+
YAML.unsafe_load(yaml, **kw)
|
7
|
+
else
|
8
|
+
super(yaml, **kw)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def load_file(filename, **kw)
|
13
|
+
if YAML.respond_to?(:unsafe_load_file)
|
14
|
+
YAML.unsafe_load_file(filename, **kw)
|
15
|
+
else
|
16
|
+
super(filename, **kw)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/yaml_vault.rb
CHANGED
@@ -7,8 +7,10 @@ require 'pp'
|
|
7
7
|
|
8
8
|
require 'yaml_vault/key_parser'
|
9
9
|
require 'yaml_vault/yaml_tree_builder'
|
10
|
+
require 'yaml_vault/yaml_compat'
|
10
11
|
|
11
12
|
module YamlVault
|
13
|
+
using YamlVault::YAMLCompat
|
12
14
|
class Main
|
13
15
|
class << self
|
14
16
|
def from_file(filename, keys, cryptor_name = nil, prefix = nil, suffix = nil, **options)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaml_vault
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- joker1007
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -89,6 +89,7 @@ extensions: []
|
|
89
89
|
extra_rdoc_files: []
|
90
90
|
files:
|
91
91
|
- ".dockerignore"
|
92
|
+
- ".github/workflows/rspec.yml"
|
92
93
|
- ".gitignore"
|
93
94
|
- ".rspec"
|
94
95
|
- ".travis.yml"
|
@@ -104,6 +105,7 @@ files:
|
|
104
105
|
- lib/yaml_vault/key_parser.rb
|
105
106
|
- lib/yaml_vault/rails.rb
|
106
107
|
- lib/yaml_vault/version.rb
|
108
|
+
- lib/yaml_vault/yaml_compat.rb
|
107
109
|
- lib/yaml_vault/yaml_tree_builder.rb
|
108
110
|
- yaml_vault.gemspec
|
109
111
|
homepage: https://github.com/joker1007/yaml_vault
|
@@ -125,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
127
|
- !ruby/object:Gem::Version
|
126
128
|
version: '0'
|
127
129
|
requirements: []
|
128
|
-
rubygems_version: 3.
|
130
|
+
rubygems_version: 3.3.3
|
129
131
|
signing_key:
|
130
132
|
specification_version: 4
|
131
133
|
summary: yaml encryption/decryption helper.
|