Class: TweethoseGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/tweethose/tweethose_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_configuration_fileObject

Creates the TweetHose daemon configuration file



26
27
28
# File 'lib/generators/tweethose/tweethose_generator.rb', line 26

def create_configuration_file
  template 'config', 'config/tweethose.yaml'
end

#create_initializerObject

Creates the TweetHose initializer, ie. the configuration file



33
34
35
# File 'lib/generators/tweethose/tweethose_generator.rb', line 33

def create_initializer
 template 'initializer', 'config/initializers/tweethose.rb'
end

#create_script_fileObject

Creates the TweetHose daemon script



16
17
18
19
20
21
# File 'lib/generators/tweethose/tweethose_generator.rb', line 16

def create_script_file
  template 'control', 'script/tweethose_ctl'
  chmod 'script/tweethose_ctl', 0755
  template 'script', 'script/tweethose'
  chmod 'script/tweethose', 0755
end