ykutils 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/main.yml +27 -0
- data/.gitignore +3 -1
- data/.rspec +1 -0
- data/.rubocop.yml +17 -0
- data/.rubocop_todo.yml +332 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +12 -1
- data/Gemfile.lock +71 -0
- data/LICENSE.txt +21 -0
- data/README.md +12 -8
- data/Rakefile +11 -0
- data/bin/console +2 -1
- data/bin/makegrid +23 -0
- data/bin/setup +2 -1
- data/lib/ykutils/datastructop.rb +58 -0
- data/lib/ykutils/debugutils.rb +28 -35
- data/lib/ykutils/erubyx.rb +14 -0
- data/lib/ykutils/fileoputils.rb +401 -0
- data/lib/ykutils/filepermision.rb +8 -9
- data/lib/ykutils/gridlist.rb +67 -0
- data/lib/ykutils/hasharray.rb +13 -22
- data/lib/ykutils/lines.rb +143 -154
- data/lib/ykutils/lsutils.rb +71 -72
- data/lib/ykutils/nkfutil.rb +147 -155
- data/lib/ykutils/nkfutil19.rb +88 -84
- data/lib/ykutils/osutil.rb +16 -19
- data/lib/ykutils/pathop.rb +16 -18
- data/lib/ykutils/retcodex.rb +9 -11
- data/lib/ykutils/specfileop.rb +82 -91
- data/lib/ykutils/stext.rb +425 -462
- data/lib/ykutils/stextx.rb +32 -33
- data/lib/ykutils/stringutils.rb +111 -125
- data/lib/ykutils/treemanager.rb +33 -36
- data/lib/ykutils/treemanagera.rb +21 -26
- data/lib/ykutils/version.rb +3 -1
- data/lib/ykutils/xlines.rb +8 -9
- data/lib/ykutils/yamlop.rb +227 -0
- data/lib/ykutils/yamlxop.rb +35 -34
- data/lib/ykutils.rb +24 -0
- data/sig/ykutils.rbs +4 -0
- data/ykutils.gemspec +43 -27
- metadata +53 -26
- data/.travis.yml +0 -3
- data/lib/ykutils/fileoputils2.rb +0 -443
data/lib/ykutils/yamlxop.rb
CHANGED
@@ -1,34 +1,35 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
#
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
#
|
23
|
-
#
|
24
|
-
@
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
end
|
1
|
+
require "ykutils/debugutils"
|
2
|
+
require "ykutils/stextx"
|
3
|
+
require "ykutils/yamlop"
|
4
|
+
|
5
|
+
module Ykutils
|
6
|
+
class YamlXOp < YamlOp
|
7
|
+
attr_accessor :yaml
|
8
|
+
|
9
|
+
include DebugUtils
|
10
|
+
|
11
|
+
def initialize(_opt, _args, debug)
|
12
|
+
debug_utils_init
|
13
|
+
set_debug(debug)
|
14
|
+
end
|
15
|
+
|
16
|
+
def load(fname)
|
17
|
+
# d_puts "3"
|
18
|
+
# puts_current_method
|
19
|
+
|
20
|
+
# d_puts "fname=#{fname}"
|
21
|
+
@fname = fname
|
22
|
+
# @pstext = StructuredTextForX.new
|
23
|
+
# puts "fname=#{fname}"
|
24
|
+
# @pstext.load_analyze( fname )
|
25
|
+
@yaml = load_yaml_file(fname)
|
26
|
+
end
|
27
|
+
|
28
|
+
def yaml2stext
|
29
|
+
yaml_str = YAML.dump(@yaml)
|
30
|
+
yaml_ary = yaml_str.split("\n")
|
31
|
+
@yamlstext = StructuredTextForAccount.new
|
32
|
+
@yamlstext.analyze(yaml_ary)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/lib/ykutils.rb
CHANGED
@@ -1,5 +1,29 @@
|
|
1
1
|
require "ykutils/version"
|
2
2
|
|
3
|
+
require "ykutils/datastructop"
|
4
|
+
require "ykutils/debugutils"
|
5
|
+
require "ykutils/erubyx"
|
6
|
+
require "ykutils/gridlist"
|
7
|
+
require "ykutils/fileoputils"
|
8
|
+
require "ykutils/filepermision"
|
9
|
+
require "ykutils/hasharray"
|
10
|
+
require "ykutils/lines"
|
11
|
+
require "ykutils/lsutils"
|
12
|
+
require "ykutils/nkfutil"
|
13
|
+
require "ykutils/nkfutil19"
|
14
|
+
require "ykutils/osutil"
|
15
|
+
require "ykutils/pathop"
|
16
|
+
require "ykutils/retcodex"
|
17
|
+
require "ykutils/specfileop"
|
18
|
+
require "ykutils/stext"
|
19
|
+
require "ykutils/stextx"
|
20
|
+
require "ykutils/stringutils"
|
21
|
+
require "ykutils/treemanager"
|
22
|
+
require "ykutils/treemanagera"
|
23
|
+
require "ykutils/xlines"
|
24
|
+
require "ykutils/yamlop"
|
25
|
+
require "ykutils/yamlxop"
|
26
|
+
|
3
27
|
module Ykutils
|
4
28
|
# Your code goes here...
|
5
29
|
end
|
data/sig/ykutils.rbs
ADDED
data/ykutils.gemspec
CHANGED
@@ -1,27 +1,43 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
spec.
|
10
|
-
spec.
|
11
|
-
|
12
|
-
spec.
|
13
|
-
|
14
|
-
spec.
|
15
|
-
|
16
|
-
spec.
|
17
|
-
spec.
|
18
|
-
spec.
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
#
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path("lib", __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
|
6
|
+
require_relative "lib/ykutils/version"
|
7
|
+
|
8
|
+
Gem::Specification.new do |spec|
|
9
|
+
spec.name = "ykutils"
|
10
|
+
spec.version = Ykutils::VERSION
|
11
|
+
spec.authors = ["yasuo kominami"]
|
12
|
+
spec.email = ["ykominami@gmail.com"]
|
13
|
+
|
14
|
+
spec.summary = "utilty function created by yk."
|
15
|
+
spec.description = "utilty function created by yk."
|
16
|
+
spec.homepage = ""
|
17
|
+
spec.license = "MIT"
|
18
|
+
spec.required_ruby_version = ">= 2.6.0"
|
19
|
+
|
20
|
+
#spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
|
21
|
+
|
22
|
+
# spec.metadata["homepage_uri"] = spec.homepage
|
23
|
+
# spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
|
24
|
+
# spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
25
|
+
|
26
|
+
# Specify which files should be added to the gem when it is released.
|
27
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
28
|
+
|
29
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
30
|
+
spec.bindir = "exe"
|
31
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
32
|
+
spec.require_paths = ["lib"]
|
33
|
+
|
34
|
+
# Uncomment to register a new dependency of your gem
|
35
|
+
# spec.add_dependency "example-gem", "~> 1.0"
|
36
|
+
spec.add_dependency "filex"
|
37
|
+
spec.add_development_dependency "rubocop-rake"
|
38
|
+
spec.add_development_dependency "rubocop-rspec"
|
39
|
+
|
40
|
+
# For more information and examples about making a new gem, check out our
|
41
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
42
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
43
|
+
end
|
metadata
CHANGED
@@ -1,43 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ykutils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yasuo kominami
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: filex
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubocop-rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
20
34
|
type: :development
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
|
-
- -
|
38
|
+
- - ">="
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
42
|
+
name: rubocop-rspec
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
|
-
- -
|
45
|
+
- - ">="
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
47
|
+
version: '0'
|
34
48
|
type: :development
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
|
-
- -
|
52
|
+
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
54
|
+
version: '0'
|
41
55
|
description: utilty function created by yk.
|
42
56
|
email:
|
43
57
|
- ykominami@gmail.com
|
@@ -45,18 +59,28 @@ executables: []
|
|
45
59
|
extensions: []
|
46
60
|
extra_rdoc_files: []
|
47
61
|
files:
|
48
|
-
- .
|
49
|
-
- .
|
50
|
-
- .
|
62
|
+
- ".github/workflows/main.yml"
|
63
|
+
- ".gitignore"
|
64
|
+
- ".rspec"
|
65
|
+
- ".rubocop.yml"
|
66
|
+
- ".rubocop_todo.yml"
|
67
|
+
- CHANGELOG.md
|
68
|
+
- CODE_OF_CONDUCT.md
|
51
69
|
- Gemfile
|
70
|
+
- Gemfile.lock
|
71
|
+
- LICENSE.txt
|
52
72
|
- README.md
|
53
73
|
- Rakefile
|
54
74
|
- bin/console
|
75
|
+
- bin/makegrid
|
55
76
|
- bin/setup
|
56
77
|
- lib/ykutils.rb
|
78
|
+
- lib/ykutils/datastructop.rb
|
57
79
|
- lib/ykutils/debugutils.rb
|
58
|
-
- lib/ykutils/
|
80
|
+
- lib/ykutils/erubyx.rb
|
81
|
+
- lib/ykutils/fileoputils.rb
|
59
82
|
- lib/ykutils/filepermision.rb
|
83
|
+
- lib/ykutils/gridlist.rb
|
60
84
|
- lib/ykutils/hasharray.rb
|
61
85
|
- lib/ykutils/lines.rb
|
62
86
|
- lib/ykutils/lsutils.rb
|
@@ -73,29 +97,32 @@ files:
|
|
73
97
|
- lib/ykutils/treemanagera.rb
|
74
98
|
- lib/ykutils/version.rb
|
75
99
|
- lib/ykutils/xlines.rb
|
100
|
+
- lib/ykutils/yamlop.rb
|
76
101
|
- lib/ykutils/yamlxop.rb
|
102
|
+
- sig/ykutils.rbs
|
77
103
|
- ykutils.gemspec
|
78
104
|
homepage: ''
|
79
|
-
licenses:
|
80
|
-
|
81
|
-
|
105
|
+
licenses:
|
106
|
+
- MIT
|
107
|
+
metadata:
|
108
|
+
rubygems_mfa_required: 'true'
|
109
|
+
post_install_message:
|
82
110
|
rdoc_options: []
|
83
111
|
require_paths:
|
84
112
|
- lib
|
85
113
|
required_ruby_version: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
|
-
- -
|
115
|
+
- - ">="
|
88
116
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
117
|
+
version: 2.6.0
|
90
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
119
|
requirements:
|
92
|
-
- -
|
120
|
+
- - ">="
|
93
121
|
- !ruby/object:Gem::Version
|
94
122
|
version: '0'
|
95
123
|
requirements: []
|
96
|
-
|
97
|
-
|
98
|
-
signing_key:
|
124
|
+
rubygems_version: 3.3.7
|
125
|
+
signing_key:
|
99
126
|
specification_version: 4
|
100
127
|
summary: utilty function created by yk.
|
101
128
|
test_files: []
|
data/.travis.yml
DELETED