database_consistency 1.1.9 → 1.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/database_consistency/configuration.rb +9 -1
- data/lib/database_consistency/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b191ca6be5af749e9c3e7bd634696e5ecc648972f5b882954990bcc9e13dde2
|
4
|
+
data.tar.gz: 460e7edbac351faf21032e9d71c768d0e98b12ddafad792516bc5f4158122525
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b1da4a7207245abc904aa28fcbbf2d8fe7c15683f86ad55557ba10b6d7699103404c42ed33a6fda82a413e4a6ed73681579dfd9512c7480d60a5f3da7d9d335
|
7
|
+
data.tar.gz: a4a13d8527677783f144448bfbe892d282086fffbe6dd04121aa50052d435c2d370eee32ee7c378047a2cf47817fcee4b74b9e7d0f9ed4b652d80431948196cc
|
@@ -11,7 +11,7 @@ module DatabaseConsistency
|
|
11
11
|
@configuration = Array(filepaths).each_with_object({}) do |filepath, result|
|
12
12
|
content =
|
13
13
|
if filepath && File.exist?(filepath)
|
14
|
-
data =
|
14
|
+
data = load_yaml_config_file(filepath)
|
15
15
|
data.is_a?(Hash) ? data : {}
|
16
16
|
else
|
17
17
|
{}
|
@@ -53,6 +53,14 @@ module DatabaseConsistency
|
|
53
53
|
|
54
54
|
attr_reader :configuration
|
55
55
|
|
56
|
+
def load_yaml_config_file(filepath)
|
57
|
+
if YAML.respond_to?(:safe_load_file)
|
58
|
+
YAML.safe_load_file(filepath, aliases: true)
|
59
|
+
else
|
60
|
+
YAML.load_file(filepath)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
56
64
|
def combine_configs!(config, new_config)
|
57
65
|
config.merge!(new_config) do |_key, val, new_val|
|
58
66
|
if val.is_a?(Hash) && new_val.is_a?(Hash)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: database_consistency
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evgeniy Demin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|