Module: Routinized
- Defined in:
- lib/routinized.rb,
lib/commands/rss.rb,
lib/routinized/version.rb
Defined Under Namespace
Modules: Commands
Constant Summary collapse
- ROOT =
File.join(Dir.home,'.routinized')
- VERSION =
"0.0.3"
Class Method Summary collapse
Class Method Details
.bootstrap ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/routinized.rb', line 16 def self.bootstrap Dir.mkdir(ROOT,0755) unless File.exists?(ROOT) Routinized.upgrade ['master.rb.template','config.json.template'].each do |file| dest_file = file.split(".template").first FileUtils.cp File.join(File.dirname(__FILE__) + "/templates/#{file}"), File.join(ROOT,dest_file) end end |
.command(name, args) ⇒ Object
25 26 27 |
# File 'lib/routinized.rb', line 25 def self.command(name,args) Routinized::Commands.send(name.to_sym,args) end |
.config ⇒ Object
8 9 10 |
# File 'lib/routinized.rb', line 8 def self.config JSON.load(File.open(File.join(ROOT, 'config.json'))) end |
.upgrade ⇒ Object
12 13 14 |
# File 'lib/routinized.rb', line 12 def self.upgrade _distribute_files('wrappers') + _distribute_files('commands') end |