ykutils 0.1.0 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/main.yml +27 -0
  3. data/.gitignore +5 -1
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +17 -0
  6. data/.rubocop_todo.yml +332 -0
  7. data/CHANGELOG.md +5 -0
  8. data/CODE_OF_CONDUCT.md +84 -0
  9. data/Gemfile +20 -1
  10. data/Gemfile.lock +76 -0
  11. data/LICENSE.txt +21 -0
  12. data/README.md +12 -8
  13. data/Rakefile +11 -0
  14. data/_config.yml +1 -0
  15. data/bin/console +2 -1
  16. data/bin/erubix +17 -0
  17. data/bin/erubix2 +13 -0
  18. data/bin/makegrid +23 -0
  19. data/bin/setup +2 -1
  20. data/lib/ykutils/datastructop.rb +58 -0
  21. data/lib/ykutils/debugutils.rb +28 -35
  22. data/lib/ykutils/erubyx.rb +41 -0
  23. data/lib/ykutils/fileoputils.rb +401 -0
  24. data/lib/ykutils/filepermision.rb +8 -9
  25. data/lib/ykutils/gridlist.rb +49 -0
  26. data/lib/ykutils/hasharray.rb +13 -22
  27. data/lib/ykutils/lines.rb +143 -154
  28. data/lib/ykutils/lsutils.rb +71 -72
  29. data/lib/ykutils/nginxconfig.rb +41 -0
  30. data/lib/ykutils/nginxconfigfiles.rb +31 -0
  31. data/lib/ykutils/nkfutil.rb +147 -155
  32. data/lib/ykutils/nkfutil19.rb +88 -84
  33. data/lib/ykutils/osutil.rb +16 -19
  34. data/lib/ykutils/pathop.rb +16 -18
  35. data/lib/ykutils/retcodex.rb +9 -11
  36. data/lib/ykutils/specfileop.rb +82 -91
  37. data/lib/ykutils/stext.rb +425 -462
  38. data/lib/ykutils/stextx.rb +32 -33
  39. data/lib/ykutils/stringutils.rb +111 -125
  40. data/lib/ykutils/treemanager.rb +33 -36
  41. data/lib/ykutils/treemanagera.rb +21 -26
  42. data/lib/ykutils/version.rb +3 -1
  43. data/lib/ykutils/xlines.rb +8 -9
  44. data/lib/ykutils/yamlop.rb +227 -0
  45. data/lib/ykutils/yamlxop.rb +35 -34
  46. data/lib/ykutils.rb +28 -0
  47. data/sig/ykutils.rbs +4 -0
  48. data/test_data/4servers.erb +7 -0
  49. data/test_data/a.bat +5 -0
  50. data/test_data/a_ncn.bat +12 -0
  51. data/test_data/top.yml +0 -0
  52. data/test_data/v103-3-189-127/4servers.erb +0 -0
  53. data/test_data/v103-3-189-127/a.northern-cross.net/base.yml +28 -0
  54. data/test_data/v103-3-189-127/a.northern-cross.net/value_host.yml +1 -0
  55. data/test_data/v103-3-189-127/b.northern-cross.net/base.yml +28 -0
  56. data/test_data/v103-3-189-127/b.northern-cross.net/value_host.yml +1 -0
  57. data/test_data/v103-3-189-127/c.northern-cross.net/base.yml +28 -0
  58. data/test_data/v103-3-189-127/c.northern-cross.net/value_host.yml +1 -0
  59. data/test_data/v103-3-189-127/d.northern-cross.info/base.yml +28 -0
  60. data/test_data/v103-3-189-127/d.northern-cross.info/value_host.yml +1 -0
  61. data/test_data/v103-3-189-127/d.northern-cross.net/base.yml +28 -0
  62. data/test_data/v103-3-189-127/d.northern-cross.net/value_host.yml +1 -0
  63. data/test_data/v103-3-189-127/e.northern-cross.info/base.yml +28 -0
  64. data/test_data/v103-3-189-127/e.northern-cross.info/value_host.yml +1 -0
  65. data/test_data/v103-3-189-127/e.northern-cross.net/base.yml +28 -0
  66. data/test_data/v103-3-189-127/e.northern-cross.net/value_host.yml +1 -0
  67. data/test_data/v103-3-189-127/f.northern-cross.info/base.yml +28 -0
  68. data/test_data/v103-3-189-127/f.northern-cross.info/value_host.yml +1 -0
  69. data/test_data/v103-3-189-127/f.northern-cross.net/base.yml +28 -0
  70. data/test_data/v103-3-189-127/f.northern-cross.net/value_host.yml +1 -0
  71. data/test_data/v103-3-189-127/t_server_1.erb +7 -0
  72. data/test_data/v103-3-189-127/template.erb +21 -0
  73. data/test_data/v103-3-189-127/template_ssl.erb +22 -0
  74. data/test_data/v103-3-189-127/template_ssl_www.erb +12 -0
  75. data/test_data/v103-3-189-127/template_www.erb +24 -0
  76. data/test_data/v103-3-189-127/value.yml +3 -0
  77. data/test_data/v103-3-189-127/value_ssl.yml +5 -0
  78. data/ykutils.gemspec +43 -27
  79. metadata +91 -27
  80. data/.travis.yml +0 -3
  81. data/lib/ykutils/fileoputils2.rb +0 -443
@@ -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,33 @@
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/nginxconfig"
13
+ require "ykutils/nginxconfigfiles"
14
+ require "ykutils/nkfutil"
15
+ require "ykutils/nkfutil19"
16
+ require "ykutils/osutil"
17
+ require "ykutils/pathop"
18
+ require "ykutils/retcodex"
19
+ require "ykutils/specfileop"
20
+ require "ykutils/stext"
21
+ require "ykutils/stextx"
22
+ require "ykutils/stringutils"
23
+ require "ykutils/treemanager"
24
+ require "ykutils/treemanagera"
25
+ require "ykutils/xlines"
26
+ require "ykutils/yamlop"
27
+ require "ykutils/yamlxop"
28
+
29
+ require 'pathname'
3
30
  module Ykutils
31
+ TEST_DATA_DIR = Pathname.new(__dir__).parent + "test_data"
4
32
  # Your code goes here...
5
33
  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
@@ -0,0 +1,7 @@
1
+ <%= server1 %>
2
+
3
+ <%= server2 %>
4
+
5
+ <%= server3 %>
6
+
7
+ <%= server4 %>
data/test_data/a.bat ADDED
@@ -0,0 +1,5 @@
1
+ set TOP_DIR=C:\Users\ykomi\cur\ruby\ykutils
2
+ set TD_DIR=%TOP_DIR%\test_data
3
+ set V103_DIR=%TD_DIR%\v103-3-189-127
4
+ set A_DIR=%V103_dir%\a.northern-cross.net
5
+ bundle exec ruby %TOP_DIR%\bin\erubix %V103_DIR%\template_ssl.erb %A_DIR%\value_host.yml %V103_DIR%\value_ssl.yml
@@ -0,0 +1,12 @@
1
+ @echo off
2
+ set TOP_DIR=C:\Users\ykomi\cur\ruby\ykutils
3
+ set TD_DIR=%TOP_DIR%\test_data
4
+ set V103_DIR=%TD_DIR%\v103-3-189-127
5
+ set A_DIR=%V103_dir%\a.northern-cross.net
6
+ REM bundle exec ruby %TOP_DIR%\bin\erubix %V103_DIR%\template_ssl.erb %A_DIR%\value_host.yml %V103_DIR%\value_ssl.yml
7
+
8
+ REM bundle exec ruby %TOP_DIR%\bin\erubix %V103_DIR%\template_ssl_www.erb %A_DIR%\value_host.yml %V103_DIR%\value_ssl.yml
9
+ REM bundle exec ruby %TOP_DIR%\bin\erubix %V103_DIR%\template.erb %A_DIR%\value_host.yml %V103_DIR%\value.yml
10
+ REM bundle exec ruby %TOP_DIR%\bin\erubix %V103_DIR%\template_www.erb %A_DIR%\value_host.yml %V103_DIR%\value.yml
11
+ REM bundle exec ruby %TOP_DIR%\bin\erubix2 %A_DIR%\base.yml
12
+ bundle exec ruby %TOP_DIR%\bin\erubix2 %1
data/test_data/top.yml ADDED
File without changes
File without changes
@@ -0,0 +1,28 @@
1
+ _root:
2
+ template: 4servers.erb
3
+ server1:
4
+ protocol: ssl
5
+ template: template_ssl.erb
6
+ value:
7
+ - value_host.yml
8
+ - ../value_ssl.yml
9
+ server2:
10
+ protocol: ssl
11
+ domain: www
12
+ template: template_ssl_www.erb
13
+ value:
14
+ - value_host.yml
15
+ - ../value_ssl.yml
16
+ server3:
17
+ protocol:
18
+ template: template.erb
19
+ value:
20
+ - value_host.yml
21
+ - ../value.yml
22
+ server4:
23
+ protocol:
24
+ domain: www
25
+ template: template_www.erb
26
+ value:
27
+ - value_host.yml
28
+ - ../value.yml
@@ -0,0 +1 @@
1
+ host: a.northern-cross.net
@@ -0,0 +1,28 @@
1
+ _root:
2
+ template: 4servers.erb
3
+ server1:
4
+ protocol: ssl
5
+ template: template_ssl.erb
6
+ value:
7
+ - value_host.yml
8
+ - ../value_ssl.yml
9
+ server2:
10
+ protocol: ssl
11
+ domain: www
12
+ template: template_ssl_www.erb
13
+ value:
14
+ - value_host.yml
15
+ - ../value_ssl.yml
16
+ server3:
17
+ protocol:
18
+ template: template.erb
19
+ value:
20
+ - value_host.yml
21
+ - ../value.yml
22
+ server4:
23
+ protocol:
24
+ domain: www
25
+ template: template_www.erb
26
+ value:
27
+ - value_host.yml
28
+ - ../value.yml
@@ -0,0 +1 @@
1
+ host: b.northern-cross.net
@@ -0,0 +1,28 @@
1
+ _root:
2
+ template: 4servers.erb
3
+ server1:
4
+ protocol: ssl
5
+ template: template_ssl.erb
6
+ value:
7
+ - value_host.yml
8
+ - ../value_ssl.yml
9
+ server2:
10
+ protocol: ssl
11
+ domain: www
12
+ template: template_ssl_www.erb
13
+ value:
14
+ - value_host.yml
15
+ - ../value_ssl.yml
16
+ server3:
17
+ protocol:
18
+ template: template.erb
19
+ value:
20
+ - value_host.yml
21
+ - ../value.yml
22
+ server4:
23
+ protocol:
24
+ domain: www
25
+ template: template_www.erb
26
+ value:
27
+ - value_host.yml
28
+ - ../value.yml
@@ -0,0 +1 @@
1
+ host: c.northern-cross.net
@@ -0,0 +1,28 @@
1
+ _root:
2
+ template: 4servers.erb
3
+ server1:
4
+ protocol: ssl
5
+ template: template_ssl.erb
6
+ value:
7
+ - value_host.yml
8
+ - ../value_ssl.yml
9
+ server2:
10
+ protocol: ssl
11
+ domain: www
12
+ template: template_ssl_www.erb
13
+ value:
14
+ - value_host.yml
15
+ - ../value_ssl.yml
16
+ server3:
17
+ protocol:
18
+ template: template.erb
19
+ value:
20
+ - value_host.yml
21
+ - ../value.yml
22
+ server4:
23
+ protocol:
24
+ domain: www
25
+ template: template_www.erb
26
+ value:
27
+ - value_host.yml
28
+ - ../value.yml
@@ -0,0 +1 @@
1
+ host: d.northern-cross.info
@@ -0,0 +1,28 @@
1
+ _root:
2
+ template: 4servers.erb
3
+ server1:
4
+ protocol: ssl
5
+ template: template_ssl.erb
6
+ value:
7
+ - value_host.yml
8
+ - ../value_ssl.yml
9
+ server2:
10
+ protocol: ssl
11
+ domain: www
12
+ template: template_ssl_www.erb
13
+ value:
14
+ - value_host.yml
15
+ - ../value_ssl.yml
16
+ server3:
17
+ protocol:
18
+ template: template.erb
19
+ value:
20
+ - value_host.yml
21
+ - ../value.yml
22
+ server4:
23
+ protocol:
24
+ domain: www
25
+ template: template_www.erb
26
+ value:
27
+ - value_host.yml
28
+ - ../value.yml
@@ -0,0 +1 @@
1
+ host: d.northern-cross.net
@@ -0,0 +1,28 @@
1
+ _root:
2
+ template: 4servers.erb
3
+ server1:
4
+ protocol: ssl
5
+ template: template_ssl.erb
6
+ value:
7
+ - value_host.yml
8
+ - ../value_ssl.yml
9
+ server2:
10
+ protocol: ssl
11
+ domain: www
12
+ template: template_ssl_www.erb
13
+ value:
14
+ - value_host.yml
15
+ - ../value_ssl.yml
16
+ server3:
17
+ protocol:
18
+ template: template.erb
19
+ value:
20
+ - value_host.yml
21
+ - ../value.yml
22
+ server4:
23
+ protocol:
24
+ domain: www
25
+ template: template_www.erb
26
+ value:
27
+ - value_host.yml
28
+ - ../value.yml
@@ -0,0 +1 @@
1
+ host: e.northern-cross.info
@@ -0,0 +1,28 @@
1
+ _root:
2
+ template: 4servers.erb
3
+ server1:
4
+ protocol: ssl
5
+ template: template_ssl.erb
6
+ value:
7
+ - value_host.yml
8
+ - ../value_ssl.yml
9
+ server2:
10
+ protocol: ssl
11
+ domain: www
12
+ template: template_ssl_www.erb
13
+ value:
14
+ - value_host.yml
15
+ - ../value_ssl.yml
16
+ server3:
17
+ protocol:
18
+ template: template.erb
19
+ value:
20
+ - value_host.yml
21
+ - ../value.yml
22
+ server4:
23
+ protocol:
24
+ domain: www
25
+ template: template_www.erb
26
+ value:
27
+ - value_host.yml
28
+ - ../value.yml
@@ -0,0 +1 @@
1
+ host: e.northern-cross.net
@@ -0,0 +1,28 @@
1
+ _root:
2
+ template: 4servers.erb
3
+ server1:
4
+ protocol: ssl
5
+ template: template_ssl.erb
6
+ value:
7
+ - value_host.yml
8
+ - ../value_ssl.yml
9
+ server2:
10
+ protocol: ssl
11
+ domain: www
12
+ template: template_ssl_www.erb
13
+ value:
14
+ - value_host.yml
15
+ - ../value_ssl.yml
16
+ server3:
17
+ protocol:
18
+ template: template.erb
19
+ value:
20
+ - value_host.yml
21
+ - ../value.yml
22
+ server4:
23
+ protocol:
24
+ domain: www
25
+ template: template_www.erb
26
+ value:
27
+ - value_host.yml
28
+ - ../value.yml
@@ -0,0 +1 @@
1
+ host: f.northern-cross.info
@@ -0,0 +1,28 @@
1
+ _root:
2
+ template: 4servers.erb
3
+ server1:
4
+ protocol: ssl
5
+ template: template_ssl.erb
6
+ value:
7
+ - value_host.yml
8
+ - ../value_ssl.yml
9
+ server2:
10
+ protocol: ssl
11
+ domain: www
12
+ template: template_ssl_www.erb
13
+ value:
14
+ - value_host.yml
15
+ - ../value_ssl.yml
16
+ server3:
17
+ protocol:
18
+ template: template.erb
19
+ value:
20
+ - value_host.yml
21
+ - ../value.yml
22
+ server4:
23
+ protocol:
24
+ domain: www
25
+ template: template_www.erb
26
+ value:
27
+ - value_host.yml
28
+ - ../value.yml
@@ -0,0 +1 @@
1
+ host: f.northern-cross.net
@@ -0,0 +1,7 @@
1
+ <%= server_ssl %>
2
+
3
+ <%= server_ssl_www %>
4
+
5
+ <%= server %>
6
+
7
+ <%= server_www %>
@@ -0,0 +1,21 @@
1
+ server {
2
+ if ($host = <%= host %>) {
3
+ return 301 https://$host$request_uri;
4
+ }
5
+
6
+ listen 80;
7
+ server_name <%= host %>;
8
+
9
+ error_log /var/www/vhosts/<%= host %>/statistics/logs/<%= error_log %>;
10
+ access_log /var/www/vhosts/<%= host %>/statistics/logs/<%= access_log %>;
11
+
12
+ root /var/www/vhosts/<%= host %>/httpdocs;
13
+ location / {
14
+ index index.html;
15
+ }
16
+ error_page 500 502 503 504 /50x.html;
17
+ location = /50x.html {
18
+ root /usr/share/nginx/html/;
19
+ index 50x.html;
20
+ }
21
+ }
@@ -0,0 +1,22 @@
1
+ server {
2
+ listen <%= ssl_port %>;
3
+ ssl_certificate <%= ssl_certificate %>;
4
+ ssl_certificate_key <%= ssl_certificate_key %>;
5
+ server_name <%= host %>;
6
+
7
+ error_log /var/www/vhosts/<%= host %>/statistics/logs/<%= error_log %>;
8
+ access_log /var/www/vhosts/<%= host %>/statistics/logs/<%= access_log %>;
9
+
10
+ # rewrite_log on;
11
+
12
+ root /var/www/vhosts/<%= host %>/httpdocs;
13
+ location / {
14
+ index index.html;
15
+ }
16
+ error_page 500 502 503 504 /50x.html;
17
+ #error_page 500 /50x.html;
18
+ location = /50x.html {
19
+ root /usr/share/nginx/html/;
20
+ index 50x.html;
21
+ }
22
+ }
@@ -0,0 +1,12 @@
1
+ server {
2
+ listen <%= ssl_port %>;
3
+ server_name www.<%= host %>;
4
+ #
5
+ return 301 https://<%= host %>;
6
+
7
+ ssl_certificate <%= ssl_certificate %>;
8
+ ssl_certificate_key <%= ssl_certificate_key %>;
9
+ include /etc/letsencrypt/options-ssl-nginx.conf;
10
+ ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
11
+
12
+ }
@@ -0,0 +1,24 @@
1
+ server {
2
+ if ($host = northern-cross.net) {
3
+ return 301 https://$host$request_uri;
4
+ }
5
+
6
+
7
+ listen <%= port %>;
8
+ server_name <%= host %>;
9
+
10
+ error_log /var/www/vhosts/<%= host %>/statistics/logs/<%= error_log %>;
11
+ access_log /var/www/vhosts/<%= host %>/statistics/logs/<%= access_log %>;
12
+
13
+ rewrite_log on;
14
+
15
+ root /var/www/vhosts/<%= host %>/httpdocs;
16
+ location / {
17
+ index index.html;
18
+ }
19
+ error_page 500 502 503 504 /50x.html;
20
+ location = /50x.html {
21
+ root /usr/share/nginx/html/;
22
+ index 50x.html;
23
+ }
24
+ }
@@ -0,0 +1,3 @@
1
+ error_log: error_log
2
+ access_log: access_log
3
+ port: 80
@@ -0,0 +1,5 @@
1
+ error_log: ssl_error_log
2
+ access_log: ssl_access_log
3
+ ssl_port: 443 ssl
4
+ ssl_certificate: /etc/letsencrypt/live/v103-3-189-127.myvps.jp/fullchain.pem
5
+ ssl_certificate_key: /etc/letsencrypt/live/v103-3-189-127.myvps.jp/privkey.pem
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 = "https://ykominami.github.io/ykutils/"
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"] = "https://github.com/ykominami/ykutils"
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