Sha256: 2205e49da682dcd5651bbc1feb7d9829bb501ea94b753a80830f79dc1695143e
Contents?: true
Size: 1.2 KB
Versions: 2
Compression:
Stored size: 1.2 KB
Contents
module Capucine class Commands require 'tools.rb' require 'watch.rb' def initialize args first_arg = args[0] second_arg = args[1] cap = Capucine.new if first_arg == 'help' or first_arg == 'h' Capucine::Commands.help elsif first_arg == 'new' or first_arg == 'n' Capucine::Tools.new_project second_arg elsif first_arg == 'init' or first_arg == 'i' Capucine::Tools.init second_arg elsif first_arg == 'compile' or first_arg == 'c' Capucine::Watchr.compile second_arg elsif first_arg == 'watch' or first_arg == 'w' Capucine::Watchr.watch second_arg elsif first_arg == 'clean' Capucine::Tools.clean elsif first_arg == 'list' Capucine::Incloudr.list elsif first_arg == 'update' or first_arg == 'u' system('gem install capucine') else Capucine::Commands.help end end def self.help file_name = File.join Capucine.settings.gem_content_dir, 'templates', 'cmd_help.erb' version = File.read(File.join(Capucine.settings.gem_dir, 'VERSION')) render = Capucine::Tools.render_template file_name, version puts render exit end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
capucine-0.1.7 | lib/commands.rb |
capucine-0.1.6 | lib/commands.rb |