Skip to content

Commit 7f312b1

Browse files
authored
Merge pull request #46 from takkii/develop
Update.
2 parents dca8222 + a25aef1 commit 7f312b1

File tree

5 files changed

+55
-46
lines changed

5 files changed

+55
-46
lines changed

lib/database.rb

+21-21
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,6 @@
55

66
# Installer runner.
77
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-
298
def self.run
309
encoding_style
3110
two = ARGV[1]
@@ -51,6 +30,27 @@ def self.run
5130
puts 'No such option is found, please refer to the documentation.'
5231
end
5332
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
5454
end
5555

5656
begin

lib/download.rb

+15-6
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,30 @@
55

66
# Installer runner.
77
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-
148
def self.run
159
encoding_style
10+
nyasocom_command
11+
end
12+
13+
private
14+
def self.nyasocom_command
1615
if system('git clone git@github.com:takkii/nyasocom_oss.git', exception: true)
1716
else
1817
system('git clone https://github.com:takkii/nyasocom_oss.git')
1918
end
2019
FileUtils.cd("./nyasocom_oss")
2120
FileUtils.rm_rf("./.git")
2221
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'
2332
end
2433
end
2534

lib/frame.rb

+4-14
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,10 @@ def version
1717

1818
def installer
1919
require 'install'
20-
puts <<-EOF
21-
22-
Used nyasocom_frame to clone nyasocom_oss with any project name.
23-
24-
EOF
2520
end
2621

27-
def download
22+
def downloader
2823
require 'download'
29-
puts <<-EOF
30-
31-
Cloned nyasocom_oss with nyasocom_frame.
32-
33-
EOF
3424
end
3525

3626
def databases
@@ -42,7 +32,7 @@ def default
4232
puts str
4333
end
4434

45-
def document
35+
def documents
4636
puts text = <<-EOS
4737
# Nyasocom Framework information
4838
heat
@@ -80,9 +70,9 @@ def document
8070
if one.nil?
8171
default
8272
elsif one.match?(h)
83-
document
73+
documents
8474
elsif one.match?(i)
85-
download
75+
downloader
8676
elsif one.match?(n)
8777
installer
8878
elsif one.match?(v)

lib/frame/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
begin
66
# nyasocom_frame version = x.x.x-xxxx.xx.xx
77
module Frame
8-
frame_version = '1.0.9'
8+
frame_version = '1.0.10'
99
t = Date.today
1010
build_day = t.strftime('%Y.%m.%d')
1111
VERSION = "#{frame_version}-#{build_day}".freeze

lib/install.rb

+14-4
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,19 @@
55

66
# Installer runner.
77
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
915
def self.encoding_style
1016
Encoding.default_internal = 'UTF-8'
1117
Encoding.default_external = 'UTF-8'
1218
end
13-
14-
def self.run
15-
encoding_style
19+
20+
def self.nyasocom_custom_name
1621
one = ARGV[1]
1722
FileUtils.mkdir_p("./#{one}")
1823
FileUtils.cd("./#{one}")
@@ -22,6 +27,11 @@ def self.run
2227
end
2328
FileUtils.rm_rf("./.git")
2429
FileUtils.rm_rf("./.github")
30+
puts <<-EOF
31+
32+
Used nyasocom_frame to clone nyasocom_oss with any project name.
33+
34+
EOF
2535
end
2636
end
2737

0 commit comments

Comments
 (0)