ykutils 0.1.0 → 0.1.4
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 +5 -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 +20 -1
- data/Gemfile.lock +76 -0
- data/LICENSE.txt +21 -0
- data/README.md +12 -8
- data/Rakefile +11 -0
- data/_config.yml +1 -0
- data/bin/console +2 -1
- data/bin/erubix +17 -0
- data/bin/erubix2 +13 -0
- 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 +41 -0
- data/lib/ykutils/fileoputils.rb +401 -0
- data/lib/ykutils/filepermision.rb +8 -9
- data/lib/ykutils/gridlist.rb +49 -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/nginxconfig.rb +41 -0
- data/lib/ykutils/nginxconfigfiles.rb +31 -0
- 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 +28 -0
- data/sig/ykutils.rbs +4 -0
- data/test_data/4servers.erb +7 -0
- data/test_data/a.bat +5 -0
- data/test_data/a_ncn.bat +12 -0
- data/test_data/top.yml +0 -0
- data/test_data/v103-3-189-127/4servers.erb +0 -0
- data/test_data/v103-3-189-127/a.northern-cross.net/base.yml +28 -0
- data/test_data/v103-3-189-127/a.northern-cross.net/value_host.yml +1 -0
- data/test_data/v103-3-189-127/b.northern-cross.net/base.yml +28 -0
- data/test_data/v103-3-189-127/b.northern-cross.net/value_host.yml +1 -0
- data/test_data/v103-3-189-127/c.northern-cross.net/base.yml +28 -0
- data/test_data/v103-3-189-127/c.northern-cross.net/value_host.yml +1 -0
- data/test_data/v103-3-189-127/d.northern-cross.info/base.yml +28 -0
- data/test_data/v103-3-189-127/d.northern-cross.info/value_host.yml +1 -0
- data/test_data/v103-3-189-127/d.northern-cross.net/base.yml +28 -0
- data/test_data/v103-3-189-127/d.northern-cross.net/value_host.yml +1 -0
- data/test_data/v103-3-189-127/e.northern-cross.info/base.yml +28 -0
- data/test_data/v103-3-189-127/e.northern-cross.info/value_host.yml +1 -0
- data/test_data/v103-3-189-127/e.northern-cross.net/base.yml +28 -0
- data/test_data/v103-3-189-127/e.northern-cross.net/value_host.yml +1 -0
- data/test_data/v103-3-189-127/f.northern-cross.info/base.yml +28 -0
- data/test_data/v103-3-189-127/f.northern-cross.info/value_host.yml +1 -0
- data/test_data/v103-3-189-127/f.northern-cross.net/base.yml +28 -0
- data/test_data/v103-3-189-127/f.northern-cross.net/value_host.yml +1 -0
- data/test_data/v103-3-189-127/t_server_1.erb +7 -0
- data/test_data/v103-3-189-127/template.erb +21 -0
- data/test_data/v103-3-189-127/template_ssl.erb +22 -0
- data/test_data/v103-3-189-127/template_ssl_www.erb +12 -0
- data/test_data/v103-3-189-127/template_www.erb +24 -0
- data/test_data/v103-3-189-127/value.yml +3 -0
- data/test_data/v103-3-189-127/value_ssl.yml +5 -0
- data/ykutils.gemspec +43 -27
- metadata +91 -27
- 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,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
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
|
data/test_data/a_ncn.bat
ADDED
@@ -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,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
|
+
}
|
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 = "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
|