Class: InstallerRunner
Overview
Installer runner.
Class Method Summary collapse
- .app_maker ⇒ Object
- .app_maker_branch ⇒ Object
- .app_maker_branches ⇒ Object
- .appmakers ⇒ Object
- .cook ⇒ Object
- .create ⇒ Object
- .database ⇒ Object
- .download ⇒ Object
- .install ⇒ Object
- .nyasocom2_command ⇒ Object
- .nyasocom2_custom_name ⇒ Object
- .nyasocom2_download ⇒ Object
- .nyasocom3_command ⇒ Object
- .nyasocom3_download ⇒ Object
- .nyasocom_app_command ⇒ Object
- .nyasocom_app_download ⇒ Object
- .nyasocom_command ⇒ Object
- .nyasocom_custom_name ⇒ Object
- .nyasocom_sun_custom_name ⇒ Object
- .postgresql ⇒ Object
Class Method Details
.app_maker ⇒ Object
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_branch ⇒ Object
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_branches ⇒ Object
51 52 53 54 |
# File 'lib/install.rb', line 51 def self.app_maker_branches encoding_style app_maker_branch end |
.appmakers ⇒ Object
46 47 48 49 |
# File 'lib/install.rb', line 46 def self.appmakers encoding_style app_maker end |
.cook ⇒ Object
21 22 23 24 |
# File 'lib/install.rb', line 21 def self.cook encoding_style nyasocom2_custom_name end |
.create ⇒ Object
16 17 18 19 |
# File 'lib/install.rb', line 16 def self.create encoding_style nyasocom_sun_custom_name end |
.database ⇒ Object
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 |
.download ⇒ Object
26 27 28 29 |
# File 'lib/install.rb', line 26 def self.download encoding_style nyasocom_command end |
.install ⇒ Object
11 12 13 14 |
# File 'lib/install.rb', line 11 def self.install encoding_style nyasocom_custom_name end |
.nyasocom2_command ⇒ Object
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_name ⇒ Object
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_download ⇒ Object
31 32 33 34 |
# File 'lib/install.rb', line 31 def self.nyasocom2_download encoding_style nyasocom2_command end |
.nyasocom3_command ⇒ Object
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_download ⇒ Object
36 37 38 39 |
# File 'lib/install.rb', line 36 def self.nyasocom3_download encoding_style nyasocom3_command end |
.nyasocom_app_command ⇒ Object
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_download ⇒ Object
41 42 43 44 |
# File 'lib/install.rb', line 41 def self.nyasocom_app_download encoding_style nyasocom_app_command end |
.nyasocom_command ⇒ Object
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_name ⇒ Object
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_name ⇒ Object
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 |
.postgresql ⇒ Object
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 |