File tree 5 files changed +55
-46
lines changed
5 files changed +55
-46
lines changed Original file line number Diff line number Diff line change 5
5
6
6
# Installer runner.
7
7
class InstallerRunner
8
- # default encoding utf-8, change encode here.
9
- def self . encoding_style
10
- Encoding . default_internal = 'UTF-8'
11
- Encoding . default_external = 'UTF-8'
12
- end
13
-
14
- def self . postgresql
15
- if system ( 'git clone git@github.com:takkii/nyasocom_pg.git' , exception : true )
16
- else
17
- system ( 'git clone https://github.com:takkii/nyasocom_pg.git' )
18
- end
19
- FileUtils . cd ( "./nyasocom_pg" )
20
- FileUtils . rm_rf ( "./.git" )
21
- FileUtils . rm_rf ( "./.github" )
22
- puts <<-EOF
23
-
24
- Cloned nyasocom_pg with nyasocom_frame.
25
-
26
- EOF
27
- end
28
-
29
8
def self . run
30
9
encoding_style
31
10
two = ARGV [ 1 ]
@@ -51,6 +30,27 @@ def self.run
51
30
puts 'No such option is found, please refer to the documentation.'
52
31
end
53
32
end
33
+
34
+ private
35
+ def self . encoding_style
36
+ Encoding . default_internal = 'UTF-8'
37
+ Encoding . default_external = 'UTF-8'
38
+ end
39
+
40
+ def self . postgresql
41
+ if system ( 'git clone git@github.com:takkii/nyasocom_pg.git' , exception : true )
42
+ else
43
+ system ( 'git clone https://github.com:takkii/nyasocom_pg.git' )
44
+ end
45
+ FileUtils . cd ( "./nyasocom_pg" )
46
+ FileUtils . rm_rf ( "./.git" )
47
+ FileUtils . rm_rf ( "./.github" )
48
+ puts <<-EOF
49
+
50
+ Cloned nyasocom_pg with nyasocom_frame.
51
+
52
+ EOF
53
+ end
54
54
end
55
55
56
56
begin
Original file line number Diff line number Diff line change 5
5
6
6
# Installer runner.
7
7
class InstallerRunner
8
- # default encoding utf-8, change encode here.
9
- def self . encoding_style
10
- Encoding . default_internal = 'UTF-8'
11
- Encoding . default_external = 'UTF-8'
12
- end
13
-
14
8
def self . run
15
9
encoding_style
10
+ nyasocom_command
11
+ end
12
+
13
+ private
14
+ def self . nyasocom_command
16
15
if system ( 'git clone git@github.com:takkii/nyasocom_oss.git' , exception : true )
17
16
else
18
17
system ( 'git clone https://github.com:takkii/nyasocom_oss.git' )
19
18
end
20
19
FileUtils . cd ( "./nyasocom_oss" )
21
20
FileUtils . rm_rf ( "./.git" )
22
21
FileUtils . rm_rf ( "./.github" )
22
+ puts <<-EOF
23
+
24
+ Cloned nyasocom_oss with nyasocom_frame.
25
+
26
+ EOF
27
+ end
28
+
29
+ def self . encoding_style
30
+ Encoding . default_internal = 'UTF-8'
31
+ Encoding . default_external = 'UTF-8'
23
32
end
24
33
end
25
34
Original file line number Diff line number Diff line change @@ -17,20 +17,10 @@ def version
17
17
18
18
def installer
19
19
require 'install'
20
- puts <<-EOF
21
-
22
- Used nyasocom_frame to clone nyasocom_oss with any project name.
23
-
24
- EOF
25
20
end
26
21
27
- def download
22
+ def downloader
28
23
require 'download'
29
- puts <<-EOF
30
-
31
- Cloned nyasocom_oss with nyasocom_frame.
32
-
33
- EOF
34
24
end
35
25
36
26
def databases
@@ -42,7 +32,7 @@ def default
42
32
puts str
43
33
end
44
34
45
- def document
35
+ def documents
46
36
puts text = <<-EOS
47
37
# Nyasocom Framework information
48
38
heat
@@ -80,9 +70,9 @@ def document
80
70
if one . nil?
81
71
default
82
72
elsif one . match? ( h )
83
- document
73
+ documents
84
74
elsif one . match? ( i )
85
- download
75
+ downloader
86
76
elsif one . match? ( n )
87
77
installer
88
78
elsif one . match? ( v )
Original file line number Diff line number Diff line change 5
5
begin
6
6
# nyasocom_frame version = x.x.x-xxxx.xx.xx
7
7
module Frame
8
- frame_version = '1.0.9 '
8
+ frame_version = '1.0.10 '
9
9
t = Date . today
10
10
build_day = t . strftime ( '%Y.%m.%d' )
11
11
VERSION = "#{ frame_version } -#{ build_day } " . freeze
Original file line number Diff line number Diff line change 5
5
6
6
# Installer runner.
7
7
class InstallerRunner
8
- # default encoding utf-8, change encode here.
8
+
9
+ def self . run
10
+ encoding_style
11
+ nyasocom_custom_name
12
+ end
13
+
14
+ private
9
15
def self . encoding_style
10
16
Encoding . default_internal = 'UTF-8'
11
17
Encoding . default_external = 'UTF-8'
12
18
end
13
-
14
- def self . run
15
- encoding_style
19
+
20
+ def self . nyasocom_custom_name
16
21
one = ARGV [ 1 ]
17
22
FileUtils . mkdir_p ( "./#{ one } " )
18
23
FileUtils . cd ( "./#{ one } " )
@@ -22,6 +27,11 @@ def self.run
22
27
end
23
28
FileUtils . rm_rf ( "./.git" )
24
29
FileUtils . rm_rf ( "./.github" )
30
+ puts <<-EOF
31
+
32
+ Used nyasocom_frame to clone nyasocom_oss with any project name.
33
+
34
+ EOF
25
35
end
26
36
end
27
37
You can’t perform that action at this time.
0 commit comments