ssm_config 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ssm_config/ssm_storage/db.rb +5 -1
- data/lib/ssm_config.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: 3b9a92069cf837609d5f479a28f031b4cca28c739d7971c08a84968800edfcc8
|
4
|
+
data.tar.gz: a102877accb35fc3658f12ddc08754af1ecd71b3d890fdaaa91eac79e5de7700
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbe8774054356dc71cc65cd3647504644cabceb94f30610bb3672bb41ff65872cecd716ecc6fae180baca9b4805d993b7249523f0e1fb670075c117b0a3e7399
|
7
|
+
data.tar.gz: 7a271d5eeccc19a4c8e9fc85a82d509efa3bf7a8a42b38cec94f649528ec60736724244d4b18a7062c52828a1de877f45aaba470874456c3cff07882edcbf277
|
@@ -9,12 +9,16 @@ module SsmConfig
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def table_exists?
|
12
|
-
return active_record_model_exists? if active_record_exists? && constant_exists?
|
12
|
+
return active_record_model_exists? if db_connected? && active_record_exists? && constant_exists?
|
13
13
|
false
|
14
14
|
rescue ActiveRecord::NoDatabaseError, Mysql2::Error::ConnectionError
|
15
15
|
return false
|
16
16
|
end
|
17
17
|
|
18
|
+
def db_connected?
|
19
|
+
ActiveRecord::Base.connected?
|
20
|
+
end
|
21
|
+
|
18
22
|
def hash
|
19
23
|
match_file = ACTIVE_RECORD_MODEL.constantize.where(:file => @file_name.to_s).order(:accessor_keys)
|
20
24
|
hashes = match_file.each_with_object({}) { |row, hash| hash[row.accessor_keys] = transform_class(row.value, row.datatype); }
|
data/lib/ssm_config.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ssm_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Santiago Herrera
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07
|
11
|
+
date: 2023-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|