Class: Cany::Recipes::Thin
- Inherits:
-
WebServer
- Object
- Cany::Recipe
- WebServer
- Cany::Recipes::Thin
- Defined in:
- lib/cany/recipes/thin.rb
Overview
Note:
The receives relies that the ‘thin’ gem is included in your Gemfile and therefore installed via bundler (and the bundler recipe).
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.
Instance Attribute Summary
Attributes inherited from WebServer
Attributes inherited from Cany::Recipe
Instance Method Summary collapse
Methods inherited from WebServer
Methods inherited from Cany::Recipe
#build, #clean, #configure, #create, #depend, #exec, from_name, #hook, hook, #initialize, #install, #install_content, #install_dir, #install_link, #install_service, option, #option, #prepare, #recipe, register_as, #rmtree, #ruby_bin, #run_hook
Methods included from Mixins::DependMixin
Constructor Details
This class inherits a constructor from Cany::Recipes::WebServer
Instance Method Details
#binary ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/cany/recipes/thin.rb', line 21 def binary = { 'environment' => 'production', 'socket' => "/var/run/#{spec.name}/sock", 'pid' => "/var/run/#{spec.name}/thin.pid" } install_content "/etc/#{spec.name}/thin.yml", .to_yaml super end |
#launch_command ⇒ Object
17 18 19 |
# File 'lib/cany/recipes/thin.rb', line 17 def launch_command %W(thin start --config /etc/#{spec.name}/thin.yml) end |