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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a605f435a082619d142a5640b1652656afa839d8229d66a5c4fa56ca9eed9670
4
- data.tar.gz: e84dd667abfd14872203fbecfb2e26bb9241b1ab63ef5eceaa55ea13d37c2f73
3
+ metadata.gz: 02c51d3cabb50f00f970145af2064b5025b968a83d8445c26324937789b5da48
4
+ data.tar.gz: 6ba0e9151522cbbcbb80ef4e253af57c0afe72afc14e9aab037e6cd14bb58565
5
5
  SHA512:
6
- metadata.gz: cef69aebdfdeeef0dbb4197a8acef30ff28ed833e323f7666ec4cf66efc18ff4d48c9aa274ab31cd39d3d5b53edc41a25407e97c8b1e8bd7daeef6c79a8c2622
7
- data.tar.gz: 69efe970810d2fba038322e72b941cb232c672e8cfdd0a570b637b87f1a204702798fc8be34a606d8ec4840e4b8bd0fb0ccf3f89929c7be4726951e84a89f1d0
6
+ metadata.gz: 3e020eaa65d97e12aad7525332c62322cc294e312721446425919a42558cca7dd6b4bdfb19993d82800a3d5239b393725cb92edc9782f486fe5a0df4cc998fa7
7
+ data.tar.gz: c7855e5d9a442fb151f801407f36c29dbe66904f167b5a5f87ae1737e26dd90b7d48155ebe132802b75635d221b982bc1c9be808d002189d4255ac3ced3e0605
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ykxutils (0.1.6)
4
+ ykxutils (0.1.7)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ykxutils
4
- VERSION = "0.1.6"
4
+ VERSION = "0.1.7"
5
5
  end
@@ -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.6
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-16 00:00:00.000000000 Z
11
+ date: 2022-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler