ykxutils 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ykxutils/version.rb +1 -1
- data/lib/ykxutils/yamlx.rb +20 -0
- 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: 02c51d3cabb50f00f970145af2064b5025b968a83d8445c26324937789b5da48
|
4
|
+
data.tar.gz: 6ba0e9151522cbbcbb80ef4e253af57c0afe72afc14e9aab037e6cd14bb58565
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e020eaa65d97e12aad7525332c62322cc294e312721446425919a42558cca7dd6b4bdfb19993d82800a3d5239b393725cb92edc9782f486fe5a0df4cc998fa7
|
7
|
+
data.tar.gz: c7855e5d9a442fb151f801407f36c29dbe66904f167b5a5f87ae1737e26dd90b7d48155ebe132802b75635d221b982bc1c9be808d002189d4255ac3ced3e0605
|
data/Gemfile.lock
CHANGED
data/lib/ykxutils/version.rb
CHANGED
data/lib/ykxutils/yamlx.rb
CHANGED
@@ -45,4 +45,24 @@ module Ykxutils
|
|
45
45
|
end
|
46
46
|
setting
|
47
47
|
end
|
48
|
+
|
49
|
+
def yaml_load_compati(content)
|
50
|
+
setting = {}
|
51
|
+
valid = false
|
52
|
+
begin
|
53
|
+
setting = YAML.load(content, aliases: true)
|
54
|
+
valid = true
|
55
|
+
rescue ArgumentError
|
56
|
+
rescue StandardError
|
57
|
+
end
|
58
|
+
|
59
|
+
if valid != true
|
60
|
+
begin
|
61
|
+
setting = YAML.load(content)
|
62
|
+
rescue ArgumentError
|
63
|
+
rescue StandardError
|
64
|
+
end
|
65
|
+
end
|
66
|
+
setting
|
67
|
+
end
|
48
68
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ykxutils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ykominami
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|