wbconfigurator 0.3.1 → 0.3.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 +4 -4
- data/README.md +2 -6
- data/configurator.gemspec +2 -2
- data/lib/config/app.rb +11 -4
- data/lib/config/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: 7221ce9fe344bbdd5bb0bf0727973bc941dbdc891b02e6fb87cfaedb86cde835
|
|
4
|
+
data.tar.gz: a722289ad9338c5dddce25b0fdf2bf872d98429b37fcae1b1576a6c48464f0af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 172b64c6360add9f5d015afd09c6a47c48e5d3bd8d0d5b979e7cab8d088f0308524203010246ff3ca58d4f522ae4796d5e6a2ca24cb1ac540af2d71dfd3c7d59
|
|
7
|
+
data.tar.gz: 27c4288ace9c6f2979d26b3a8de36fa8285fe4c2168f8ecea9300d6f51409f167720f2dfd33791de27dbe82be430668f3fb6f51f052715b8c9fcbd9ffe140ed9
|
data/README.md
CHANGED
|
@@ -5,7 +5,7 @@ It allows easy management of specific environment settings with YAML config file
|
|
|
5
5
|
|
|
6
6
|
## Usage
|
|
7
7
|
|
|
8
|
-
Please see the [wiki](https://github.com/
|
|
8
|
+
Please see the [wiki](https://github.com/ActiveCampaign/qa-configurator/wiki) for detailed instructions about how to use the tool.
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
@@ -24,8 +24,4 @@ Please leave all comments, bugs, requests and issues on the Issues page.
|
|
|
24
24
|
|
|
25
25
|
## License
|
|
26
26
|
|
|
27
|
-
Configurator library is released under the [MIT](http://www.opensource.org/licenses/mit-license.php) license.
|
|
28
|
-
|
|
29
|
-
## Copyright
|
|
30
|
-
|
|
31
|
-
Copyright © 2020 Wildbit LLC.
|
|
27
|
+
Configurator library is released under the [MIT](http://www.opensource.org/licenses/mit-license.php) license.
|
data/configurator.gemspec
CHANGED
|
@@ -11,14 +11,14 @@ Gem::Specification.new do |s|
|
|
|
11
11
|
s.license = 'MIT'
|
|
12
12
|
|
|
13
13
|
s.authors = ['Igor Balos']
|
|
14
|
-
s.email = ['ibalosh@gmail.com', '
|
|
14
|
+
s.email = ['ibalosh@gmail.com', 'ibalos@activecampaign.com']
|
|
15
15
|
|
|
16
16
|
s.summary = 'Config tool.'
|
|
17
17
|
s.description = 'Configuration tool for simple management with yaml files.'
|
|
18
18
|
|
|
19
19
|
s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
|
20
20
|
s.test_files = `git ls-files -- {spec}/*`.split("\n")
|
|
21
|
-
s.homepage = 'https://github.com/
|
|
21
|
+
s.homepage = 'https://github.com/ActiveCampaign/qa-configurator'
|
|
22
22
|
s.require_paths = ['lib']
|
|
23
23
|
s.required_rubygems_version = '>= 1.9.3'
|
|
24
24
|
s.add_dependency 'secure_yaml', '~> 2.0'
|
data/lib/config/app.rb
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'yaml'
|
|
4
|
-
require 'secure_yaml'
|
|
5
|
-
require_relative 'patch/secure_yaml/cipher'
|
|
6
4
|
require 'singleton'
|
|
7
5
|
require 'ostruct'
|
|
8
6
|
require 'erb'
|
|
@@ -55,10 +53,12 @@ module App
|
|
|
55
53
|
FILES_EXTENSION = 'yaml'
|
|
56
54
|
DEFAULT_ENVIRONMENT = 'production'
|
|
57
55
|
attr_accessor :environment,
|
|
58
|
-
:files_path
|
|
56
|
+
:files_path,
|
|
57
|
+
:use_secure_yaml
|
|
59
58
|
|
|
60
59
|
def initialize
|
|
61
60
|
@environment = DEFAULT_ENVIRONMENT
|
|
61
|
+
@use_secure_yaml = false
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
def load_all!
|
|
@@ -129,7 +129,14 @@ module App
|
|
|
129
129
|
|
|
130
130
|
def load_from_yaml(filename)
|
|
131
131
|
yaml_file = ERB.new(File.read(file_full_path(filename))).result
|
|
132
|
-
|
|
132
|
+
|
|
133
|
+
if use_secure_yaml
|
|
134
|
+
require 'secure_yaml'
|
|
135
|
+
require_relative 'patch/secure_yaml/cipher'
|
|
136
|
+
SecureYaml.load(yaml_file)
|
|
137
|
+
else
|
|
138
|
+
YAML::load(yaml_file)
|
|
139
|
+
end
|
|
133
140
|
end
|
|
134
141
|
|
|
135
142
|
# generate accessors for loaded data
|
data/lib/config/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wbconfigurator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Igor Balos
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-07-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: secure_yaml
|
|
@@ -27,7 +27,7 @@ dependencies:
|
|
|
27
27
|
description: Configuration tool for simple management with yaml files.
|
|
28
28
|
email:
|
|
29
29
|
- ibalosh@gmail.com
|
|
30
|
-
-
|
|
30
|
+
- ibalos@activecampaign.com
|
|
31
31
|
executables: []
|
|
32
32
|
extensions: []
|
|
33
33
|
extra_rdoc_files: []
|
|
@@ -45,7 +45,7 @@ files:
|
|
|
45
45
|
- spec/data/test.yaml
|
|
46
46
|
- spec/spec_helper.rb
|
|
47
47
|
- spec/unit/app_spec.rb
|
|
48
|
-
homepage: https://github.com/
|
|
48
|
+
homepage: https://github.com/ActiveCampaign/qa-configurator
|
|
49
49
|
licenses:
|
|
50
50
|
- MIT
|
|
51
51
|
metadata: {}
|