Class: Dotstrap::Cli
- Inherits:
-
Thor
- Object
- Thor
- Dotstrap::Cli
- Defined in:
- bin/dotstrap
Instance Method Summary collapse
- #__print_version ⇒ Object
- #install(repo, *args) ⇒ Object
- #list(*args) ⇒ Object
- #uninstall(repo, *args) ⇒ Object
Instance Method Details
#__print_version ⇒ Object
48 49 50 51 |
# File 'bin/dotstrap', line 48 def __print_version puts "#{Dotstrap::NAME.colorize(:blue)} #{Dotstrap::VERSION}" exit end |
#install(repo, *args) ⇒ Object
76 77 78 79 80 81 82 83 |
# File 'bin/dotstrap', line 76 def install(repo, *args) args << repo # so thor will not complain when you call `install` with no args repos = __determine_repos(args) __set_log_level $LOG.debug { "REPO ARGS:#{repos}" } ds = Dotstrap::Configuration.new(repos) [:fetch] ? ds.install : ds.configure end |
#list(*args) ⇒ Object
109 110 111 112 113 114 115 116 117 118 |
# File 'bin/dotstrap', line 109 def list(*args) if args.empty? Dotstrap::Configuration.new(Dotstrap.installed_repos).list return end repos = __determine_repos(args) __set_log_level $LOG.debug { "REPO ARGS:#{repos}" } Dotstrap::Configuration.new(repos).list end |
#uninstall(repo, *args) ⇒ Object
92 93 94 95 96 97 98 |
# File 'bin/dotstrap', line 92 def uninstall(repo, *args) args << repo # so thor will complain when you call `uninstall` with no args repos = __determine_repos(args) __set_log_level $LOG.debug { "REPO ARGS:#{repos}" } Dotstrap::Configuration.new(repos).remove end |