Class: RailsZero::PackagesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- RailsZero::PackagesController
- Defined in:
- app/controllers/rails_zero/packages_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
5 6 7 8 9 10 |
# File 'app/controllers/rails_zero/packages_controller.rb', line 5 def index FileUtils.mkdir_p(File.dirname(archive_path)) command = "tar -cf '#{archive_path}' '#{public_path}/'" stdout_str, stderr_str, status = Open3.capture3(command) send_file archive_path end |
#new ⇒ Object
12 13 14 15 |
# File 'app/controllers/rails_zero/packages_controller.rb', line 12 def new CleanSiteJob.new.run head :ok end |