Class: InstallerRunner

Inherits:
Object show all
Defined in:
lib/install.rb

Overview

Installer runner.

Class Method Summary collapse

Class Method Details

.app_makerObject



210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# File 'lib/install.rb', line 210

def self.app_maker
  encoding_style
  flh = ARGV[1]
  ghn = ARGV[2]
  gpp = ARGV[3]
  FileUtils.mkdir_p("./#{flh}")
  FileUtils.cd("./#{flh}")
  if system("git clone git@github.com:#{ghn}/#{gpp}.git .", exception: true)
  else
    system("git clone https://github.com:#{ghn}/#{gpp}.git .")
  end
  FileUtils.rm_rf("./.git")
  FileUtils.rm_rf("./.github")
  puts <<-EOF

Cloned GitHub with user/#{ghn} project/#{gpp}.

  EOF
end

.app_maker_branchObject



230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
# File 'lib/install.rb', line 230

def self.app_maker_branch
  encoding_style
  flh = ARGV[1]
  ghn = ARGV[2]
  gpp = ARGV[3]
  branch = ARGV[4]
  FileUtils.mkdir_p("./#{flh}")
  FileUtils.cd("./#{flh}")
  if system("git clone -b #{branch} git@github.com:#{ghn}/#{gpp}.git .", exception: true)
  else
    system("git clone -b #{branch} https://github.com:#{ghn}/#{gpp}.git .")
  end
  FileUtils.rm_rf("./.git")
  FileUtils.rm_rf("./.github")
  puts <<-EOF

Cloned Folder/#{flh} GitHub with user/#{ghn} project/#{gpp} branch/#{branch}.

  EOF
end

.app_maker_branchesObject



51
52
53
54
# File 'lib/install.rb', line 51

def self.app_maker_branches
  encoding_style
  app_maker_branch
end

.appmakersObject



46
47
48
49
# File 'lib/install.rb', line 46

def self.appmakers
  encoding_style
  app_maker
end

.cookObject



21
22
23
24
# File 'lib/install.rb', line 21

def self.cook
  encoding_style
  nyasocom2_custom_name
end

.createObject



16
17
18
19
# File 'lib/install.rb', line 16

def self.create
  encoding_style
  nyasocom_sun_custom_name
end

.databaseObject



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/install.rb', line 56

def self.database
  encoding_style
  two = ARGV[1]

  pt = /\Apostgresql\z/
  pg = /\A--pg\z/

  if two.nil?
    puts <<-EOF

nyasocom_pg project, clone command.

heat db postgresql

heat db --pg

    EOF
  elsif two.match?(pt)
    postgresql
  elsif two.match?(pg)
    postgresql
  else
    puts 'No such option is found, please refer to the documentation.'
  end
end

.downloadObject



26
27
28
29
# File 'lib/install.rb', line 26

def self.download
  encoding_style
  nyasocom_command
end

.installObject



11
12
13
14
# File 'lib/install.rb', line 11

def self.install
  encoding_style
  nyasocom_custom_name
end

.nyasocom2_commandObject



165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/install.rb', line 165

def self.nyasocom2_command
  if system('git clone git@github.com:takkii/nyasocom2.git', exception: true)
  else
    system('git clone https://github.com:takkii/nyasocom2.git')
  end
  FileUtils.cd("./nyasocom2")
  FileUtils.rm_rf("./.git")
  FileUtils.rm_rf("./.github")
  puts <<-EOF

Cloned nyasocom2 with nyasocom_frame.

  EOF
end

.nyasocom2_custom_nameObject



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/install.rb', line 101

def self.nyasocom2_custom_name
  two = ARGV[1]
  FileUtils.mkdir_p("./#{two}")
  FileUtils.cd("./#{two}")
  if system('git clone git@github.com:takkii/nyasocom2.git .', exception: true)
  else
    system('git clone https://github.com:takkii/nyasocom2.git .')
  end
  FileUtils.rm_rf("./.git")
  FileUtils.rm_rf("./.github")
  puts <<-EOF

Used nyasocom_frame to clone nyasocom2 with any project name.

  EOF
end

.nyasocom2_downloadObject



31
32
33
34
# File 'lib/install.rb', line 31

def self.nyasocom2_download
  encoding_style
  nyasocom2_command
end

.nyasocom3_commandObject



180
181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/install.rb', line 180

def self.nyasocom3_command
  if system('git clone git@github.com:takkii/nyasocom_sun_pg_win.git', exception: true)
  else
    system('git clone https://github.com:takkii/nyasocom_sun_pg_win.git')
  end
  FileUtils.cd("./nyasocom_sun_pg_win")
  FileUtils.rm_rf("./.git")
  FileUtils.rm_rf("./.github")
  puts <<-EOF

Cloned nyasocom_sun_pg_win with nyasocom_frame.

  EOF
end

.nyasocom3_downloadObject



36
37
38
39
# File 'lib/install.rb', line 36

def self.nyasocom3_download
  encoding_style
  nyasocom3_command
end

.nyasocom_app_commandObject



195
196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/install.rb', line 195

def self.nyasocom_app_command
  if system('git clone git@github.com:takkii/nyasocom_sun_app.git', exception: true)
  else
    system('git clone https://github.com:takkii/nyasocom_sun_app.git')
  end
  FileUtils.cd("./nyasocom_sun_app")
  FileUtils.rm_rf("./.git")
  FileUtils.rm_rf("./.github")
  puts <<-EOF

Cloned nyasocom_sun_app with nyasocom_frame.

  EOF
end

.nyasocom_app_downloadObject



41
42
43
44
# File 'lib/install.rb', line 41

def self.nyasocom_app_download
  encoding_style
  nyasocom_app_command
end

.nyasocom_commandObject



135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/install.rb', line 135

def self.nyasocom_command
  if system('git clone git@github.com:takkii/nyasocom_oss.git', exception: true)
  else
    system('git clone https://github.com:takkii/nyasocom_oss.git')
  end
  FileUtils.cd("./nyasocom_oss")
  FileUtils.rm_rf("./.git")
  FileUtils.rm_rf("./.github")
  puts <<-EOF

Cloned nyasocom_oss with nyasocom_frame.

  EOF
end

.nyasocom_custom_nameObject



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/install.rb', line 84

def self.nyasocom_custom_name
  one = ARGV[1]
  FileUtils.mkdir_p("./#{one}")
  FileUtils.cd("./#{one}")
  if system('git clone git@github.com:takkii/nyasocom_oss.git .', exception: true)
  else
    system('git clone https://github.com:takkii/nyasocom_oss.git .')
  end
  FileUtils.rm_rf("./.git")
  FileUtils.rm_rf("./.github")
  puts <<-EOF

Used nyasocom_frame to clone nyasocom_oss with any project name.

  EOF
end

.nyasocom_sun_custom_nameObject



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/install.rb', line 118

def self.nyasocom_sun_custom_name
  sun = ARGV[1]
  FileUtils.mkdir_p("./#{sun}")
  FileUtils.cd("./#{sun}")
  if system('git clone git@github.com:takkii/nyasocom_sun_pg_win.git .', exception: true)
  else
    system('git clone https://github.com:takkii/nyasocom_sun_pg_win.git .')
  end
  FileUtils.rm_rf("./.git")
  FileUtils.rm_rf("./.github")
  puts <<-EOF

Used nyasocom_frame to clone nyasocom_sun_pg_win with any project name.

  EOF
end

.postgresqlObject



150
151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/install.rb', line 150

def self.postgresql
  if system('git clone git@github.com:takkii/nyasocom_pg.git', exception: true)
  else
    system('git clone https://github.com:takkii/nyasocom_pg.git')
  end
  FileUtils.cd("./nyasocom_pg")
  FileUtils.rm_rf("./.git")
  FileUtils.rm_rf("./.github")
  puts <<-EOF

Cloned nyasocom_pg with nyasocom_frame.

  EOF
end