Class: Krb::Download::Base
- Inherits:
-
ApplicationService
- Object
- ApplicationService
- Krb::Download::Base
- Defined in:
- lib/krb/download/base.rb
Overview
Download methods
Instance Method Summary collapse
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #process ⇒ Object
Methods inherited from ApplicationService
process, #prompt, #setup_file_name, #setup_file_path, #verify_admin, #verify_production, #verify_setup
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
9 10 11 12 13 14 |
# File 'lib/krb/download/base.rb', line 9 def initialize super verify_setup verify_production @cmd = ::TTY::Command.new end |
Instance Method Details
#process ⇒ Object
16 17 18 19 20 21 |
# File 'lib/krb/download/base.rb', line 16 def process @cmd.run('rm -rf ./content') @cmd.run("wget -q https://#{setup.dig('production_namespace')}.ngx.host/download -O ./content.zip") @cmd.run("unzip -q ./content.zip -d ./content") @cmd.run("rm -rf ./content/lost+found content.zip") end |