Class: Daemonz::Generators::DaemonGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Daemonz::Generators::DaemonGenerator
- Defined in:
- lib/daemonz/generators/daemon/daemon_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
7 8 9 |
# File 'lib/daemonz/generators/daemon/daemon_generator.rb', line 7 def self.source_root @source_root ||= File. 'templates', File.dirname(__FILE__) end |
Instance Method Details
#create_harness ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/daemonz/generators/daemon/daemon_generator.rb', line 11 def create_harness empty_directory 'config/daemonz' template "config.yml", "config/daemonz/#{file_name}.yml" empty_directory 'script/background' template 'daemon.rb.erb', "script/background/#{file_name}.rb" empty_directory 'test/integration' template 'integration_test.rb.erb', "test/integration/#{file_name}_test.rb" end |