Sha256: 46d223d2e14f5023e0f5e353b33fa5885baef2747f4955305765a84399f259c4

Contents?: true

Size: 1.19 KB

Versions: 4

Compression:

Stored size: 1.19 KB

Contents

module Capistrano
  module Cookbook
    class SetupConfigValues
      def symlinks
        fetch(:symlinks) || symlinks_defaults
      end

      def executable_config_files
        fetch(:executable_config_files) || executable_config_files_defaults
      end

      def config_files
        fetch(:config_files) || config_files_defaults
      end

      private

      def symlinks_defaults
        [
          {
            source: "nginx.conf",
            link: "/etc/nginx/sites-enabled/{{full_app_name}}"
          },
          {
            source: "unicorn_init.sh",
            link: "/etc/init.d/unicorn_{{full_app_name}}"
          },
          {
            source: "log_rotation",
           link: "/etc/logrotate.d/{{full_app_name}}"
          },
          {
            source: "monit",
            link: "/etc/monit/conf.d/{{full_app_name}}.conf"
          }
        ]
      end

      def executable_config_files_defaults
        %w(
          unicorn_init.sh
        )
      end

      def config_files_defaults
        %w(
          nginx.conf
          database.example.yml
          log_rotation
          monit
          unicorn.rb
          unicorn_init.sh
        )
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
capistrano-cookbook-0.0.5 lib/capistrano/cookbook/helpers/setup_config_values.rb
capistrano-cookbook-0.0.4 lib/capistrano/cookbook/helpers/setup_config_values.rb
capistrano-cookbook-0.0.3 lib/capistrano/cookbook/helpers/setup_config_values.rb
capistrano-cookbook-0.0.2 lib/capistrano/cookbook/helpers/setup_config_values.rb