Class: Kamal::Cli::App::ErrorPages

Inherits:
Object
  • Object
show all
Defined in:
lib/kamal/cli/app/error_pages.rb

Constant Summary collapse

ERROR_PAGES_GLOB =
"{4??.html,5??.html}"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host, sshkit) ⇒ ErrorPages

Returns a new instance of ErrorPages.



7
8
9
10
# File 'lib/kamal/cli/app/error_pages.rb', line 7

def initialize(host, sshkit)
  @host = host
  @sshkit = sshkit
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



4
5
6
# File 'lib/kamal/cli/app/error_pages.rb', line 4

def host
  @host
end

#sshkitObject (readonly)

Returns the value of attribute sshkit.



4
5
6
# File 'lib/kamal/cli/app/error_pages.rb', line 4

def sshkit
  @sshkit
end

Instance Method Details

#runObject



12
13
14
15
16
17
18
19
# File 'lib/kamal/cli/app/error_pages.rb', line 12

def run
  if KAMAL.config.error_pages_path
    with_error_pages_tmpdir do |local_error_pages_dir|
      execute *KAMAL.app.create_error_pages_directory
      upload! local_error_pages_dir, KAMAL.config.proxy_boot.error_pages_directory, mode: "0700", recursive: true
    end
  end
end