Sha256: b2c2c993762eda9e7ccc9dc173036b7e148ca5f13db329718aae55408462e3e3

Contents?: true

Size: 840 Bytes

Versions: 3

Compression:

Stored size: 840 Bytes

Contents

module Capistrano
  class Puma::Jungle < Capistrano::Plugin
    include PumaCommon
    
    def set_defaults
      set_if_empty :puma_jungle_conf, '/etc/puma.conf'
      set_if_empty :puma_run_path, '/usr/local/bin/run-puma'
    end

    def define_tasks
      eval_rakefile File.expand_path('../../tasks/jungle.rake', __FILE__)
    end

    private

    def debian_install
      template_puma 'puma-deb', "#{fetch(:tmp_dir)}/puma", @role
      execute "chmod +x #{fetch(:tmp_dir)}/puma"
      sudo "mv #{fetch(:tmp_dir)}/puma /etc/init.d/puma"
      sudo 'update-rc.d -f puma defaults'
    end

    def rhel_install
      template_puma 'puma-rpm', "#{fetch(:tmp_dir)}/puma", @role
      execute "chmod +x #{fetch(:tmp_dir)}/puma"
      sudo "mv #{fetch(:tmp_dir)}/puma /etc/init.d/puma"
      sudo 'chkconfig --add puma'
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
capistrano3-puma-3.0.2 lib/capistrano/puma/jungle.rb
capistrano3-puma-3.0.1 lib/capistrano/puma/jungle.rb
capistrano3-puma-3.0.0 lib/capistrano/puma/jungle.rb