Sha256: a169ff4018cb00922c4abfc208c752b007405cc035c707da22d938138c19dae8

Contents?: true

Size: 958 Bytes

Versions: 12

Compression:

Stored size: 958 Bytes

Contents

require 'yaml'

module Cany::Recipes
  # This recipes install the thin ruby web server. It is registered
  # and started as service.
  #
  # A simple thin configuration file (/etc/<application name>/thin.yml) is
  # created and can be adjusted to the user needs.
  #
  # @see http://code.macournoyer.com/thin/ The project website for more
  #   information about the project
  # @note The receives relies that the 'thin' gem is included in your Gemfile
  #   and therefore installed via bundler (and the bundler recipe).
  class Thin < WebServer
    register_as :thin

    def launch_command
      %W(thin start --config /etc/#{spec.name}/thin.yml)
    end

    def binary
      default_options = {
          'environment' => 'production',
          'socket' => "/var/run/#{spec.name}/sock",
          'pid' => "/var/run/#{spec.name}/thin.pid"
      }
      install_content "/etc/#{spec.name}/thin.yml", default_options.to_yaml
      super
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cany-0.5.7 lib/cany/recipes/thin.rb
cany-0.5.6 lib/cany/recipes/thin.rb
cany-0.5.5 lib/cany/recipes/thin.rb
cany-0.5.4 lib/cany/recipes/thin.rb
cany-0.5.3 lib/cany/recipes/thin.rb
cany-0.5.2 lib/cany/recipes/thin.rb
cany-0.5.1 lib/cany/recipes/thin.rb
cany-0.5.0 lib/cany/recipes/thin.rb
cany-0.4.0 lib/cany/recipes/thin.rb
cany-0.3.0 lib/cany/recipes/thin.rb
cany-0.2.1 lib/cany/recipes/thin.rb
cany-0.2.0 lib/cany/recipes/thin.rb