Sha256: 018582606ee9d92fc4ae67ad178e7022a1692f6686911c474991897a0535e902
Contents?: true
Size: 761 Bytes
Versions: 1
Compression:
Stored size: 761 Bytes
Contents
require 'thor' require 'active_support' require 'active_support/core_ext/object' module Mercurd class CLI < Thor desc "zen", "The Zen of Code Reading" def zen puts <<-ZEN The Zen of Code Reading - Good first. - Document first. - When have to. - For writting. ZEN end desc "requirements", "Install Mercurd Deps" def requirements `brew install cloc` end desc "cloc [OPTIONS]", "The wrapper of github.com/AlDanial/cloc" def cloc(src = nil) cmd = `which cloc` puts "cloc not found" and return if cmd.blank? prefix = "Count Lines of Code" dir = src ? src : '.' ret = `cloc #{dir}` puts [prefix, ret].join("\n\n") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mercurd-0.3.0 | lib/mercurd/cli.rb |