ykutils 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,34 +1,35 @@
1
- require 'debugutils'
2
- require 'stextx'
3
- require 'yamlop'
4
-
5
- class YamlXOp < YamlOp
6
- attr_accessor :yaml
7
-
8
- include DebugUtils
9
-
10
- def initialize( opt , args , debug )
11
- debug_utils_init
12
- set_debug( debug )
13
- end
14
-
15
- def load( fname )
16
- # d_puts "3"
17
- # puts_current_method
18
-
19
- # d_puts "fname=#{fname}"
20
- @fname = fname
21
- # @pstext = StructuredTextForX.new
22
- # puts "fname=#{fname}"
23
- # @pstext.load_analyze( fname )
24
- @yaml = load_yaml_file( fname )
25
- end
26
-
27
- def yaml2stext
28
- yaml_str = YAML.dump( @yaml )
29
- yaml_ary = yaml_str.split("\n")
30
- @yamlstext = StructuredTextForAccount.new
31
- @yamlstext.analyze( yaml_ary )
32
- end
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
@@ -0,0 +1,4 @@
1
+ module Ykutils
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
data/ykutils.gemspec CHANGED
@@ -1,27 +1,43 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'ykutils/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "ykutils"
8
- spec.version = Ykutils::VERSION
9
- spec.authors = ["yasuo kominami"]
10
- spec.email = ["ykominami@gmail.com"]
11
-
12
- spec.summary = %q{utilty function created by yk.}
13
- spec.description = %q{utilty function created by yk.}
14
- spec.homepage = ""
15
-
16
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
- spec.bindir = "exe"
18
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
- spec.require_paths = ["lib"]
20
-
21
- if spec.respond_to?(:metadata)
22
- # spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com' to prevent pushes to rubygems.org, or delete to allow pushes to any server."
23
- end
24
-
25
- spec.add_development_dependency "bundler", "~> 1.9"
26
- spec.add_development_dependency "rake", "~> 10.0"
27
- end
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.0
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: 2015-06-29 00:00:00.000000000 Z
11
+ date: 2022-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
14
+ name: filex
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.9'
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: '1.9'
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
- name: rake
42
+ name: rubocop-rspec
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
- - - ~>
45
+ - - ">="
32
46
  - !ruby/object:Gem::Version
33
- version: '10.0'
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: '10.0'
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
- - .gitignore
49
- - .rspec
50
- - .travis.yml
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/fileoputils2.rb
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
- metadata: {}
81
- post_install_message:
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: '0'
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
- rubyforge_project:
97
- rubygems_version: 2.4.1
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
@@ -1,3 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.0.0