Sha256: c7915f2b7c8e35a72f03de77f1813698beb49257f75da7a57e7fcbdff5f5ed5e

Contents?: true

Size: 1.13 KB

Versions: 10

Compression:

Stored size: 1.13 KB

Contents

require 'pathname'

module Capistrano
  module Ops
    module Logrotate
      module Paths
        # local paths
        def logrotate_config_file_template
          Pathname.new fetch(:logrotate_config_file_template)
        end

        def logrotate_schedule_file_template
          Pathname.new fetch(:logrotate_schedule_file_template)
        end

        # remote paths
        def logrotate_basepath
          shared_path.join fetch(:logrotate_basepath)
        end

        def logrotate_config_path
          shared_path.join fetch(:logrotate_config_path)
        end

        def logrotate_config_file_path
          logrotate_basepath.join logrotate_config_filename
        end

        def logrotate_schedule_file_path
          logrotate_basepath.join logrotate_schedule_filename
        end

        def log_file_path
          shared_path.join fetch(:log_file_path)
        end

        def logrotate_schedule_filename
          File.basename(logrotate_schedule_file_template, '.erb')
        end

        def logrotate_config_filename
          File.basename(logrotate_config_file_template, '.erb')
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
capistrano-ops-1.0.9 lib/capistrano/ops/logrotate/paths.rb
capistrano-ops-1.0.8 lib/capistrano/ops/logrotate/paths.rb
capistrano-ops-1.0.7 lib/capistrano/ops/logrotate/paths.rb
capistrano-ops-1.0.6 lib/capistrano/ops/logrotate/paths.rb
capistrano-ops-1.0.5 lib/capistrano/ops/logrotate/paths.rb
capistrano-ops-1.0.4 lib/capistrano/ops/logrotate/paths.rb
capistrano-ops-1.0.3 lib/capistrano/ops/logrotate/paths.rb
capistrano-ops-1.0.2 lib/capistrano/ops/logrotate/paths.rb
capistrano-ops-1.0.1 lib/capistrano/ops/logrotate/paths.rb
capistrano-ops-1.0.0 lib/capistrano/ops/logrotate/paths.rb