wbconfigurator 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c6a0a05711b29eb8bd8c4eefaa2d45d9fab0813a8a8db1cb6dec7083f6a3475
4
- data.tar.gz: e456a5d8e1efff923292fa2e48f2f140d5dc51febd8dce95afdae4c97594d792
3
+ metadata.gz: 7221ce9fe344bbdd5bb0bf0727973bc941dbdc891b02e6fb87cfaedb86cde835
4
+ data.tar.gz: a722289ad9338c5dddce25b0fdf2bf872d98429b37fcae1b1576a6c48464f0af
5
5
  SHA512:
6
- metadata.gz: 30b89d75958aeb943d2b79d2e7cf315cda716368d3269d6b13e5925deda36e995fd171fa1be5eda8553cf241cd1222f9136cff81957be44971c0209fe96f54ab
7
- data.tar.gz: 41913c7f625b270c6510edb91b32ff8abcb4833d16a837ee5281c7f7192be202cc506d79e4f46ba60dc091361a88db906a2e9c4d411b18296ecc6a09d8757f95
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/wildbit/configurator/wiki) for detailed instructions about how to use the tool.
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', 'igor@wildbit.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/wildbit/configurator'
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
- SecureYaml.load(yaml_file)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Configurator
4
- VERSION = '0.3.1'
4
+ VERSION = '0.3.2'
5
5
  end
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.1
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-03-02 00:00:00.000000000 Z
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
- - igor@wildbit.com
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/wildbit/configurator
48
+ homepage: https://github.com/ActiveCampaign/qa-configurator
49
49
  licenses:
50
50
  - MIT
51
51
  metadata: {}