guac 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +97 -0
- data/.rubocop_todo.yml +263 -0
- data/.travis.yml +6 -0
- data/Gemfile +0 -4
- data/Gemfile.lock +26 -118
- data/README.md +8 -1
- data/assets/demo.gif +0 -0
- data/guac.gemspec +23 -34
- data/lib/guac/cli.rb +3 -1
- data/lib/guac/colors.rb +4 -2
- data/lib/guac/commands/config.rb +8 -8
- data/lib/guac/commands/status.rb +10 -9
- data/lib/guac/commands/up.rb +22 -17
- data/lib/guac/version.rb +1 -1
- metadata +34 -241
- data/lib/guac/command.rb +0 -121
data/lib/guac/command.rb
DELETED
@@ -1,121 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'forwardable'
|
4
|
-
|
5
|
-
module Guac
|
6
|
-
class Command
|
7
|
-
extend Forwardable
|
8
|
-
|
9
|
-
def_delegators :command, :run
|
10
|
-
|
11
|
-
# Execute this command
|
12
|
-
#
|
13
|
-
# @api public
|
14
|
-
def execute(*)
|
15
|
-
raise(
|
16
|
-
NotImplementedError,
|
17
|
-
"#{self.class}##{__method__} must be implemented"
|
18
|
-
)
|
19
|
-
end
|
20
|
-
|
21
|
-
# The external commands runner
|
22
|
-
#
|
23
|
-
# @see http://www.rubydoc.info/gems/tty-command
|
24
|
-
#
|
25
|
-
# @api public
|
26
|
-
def command(**options)
|
27
|
-
require 'tty-command'
|
28
|
-
TTY::Command.new(options)
|
29
|
-
end
|
30
|
-
|
31
|
-
# The cursor movement
|
32
|
-
#
|
33
|
-
# @see http://www.rubydoc.info/gems/tty-cursor
|
34
|
-
#
|
35
|
-
# @api public
|
36
|
-
def cursor
|
37
|
-
require 'tty-cursor'
|
38
|
-
TTY::Cursor
|
39
|
-
end
|
40
|
-
|
41
|
-
# Open a file or text in the user's preferred editor
|
42
|
-
#
|
43
|
-
# @see http://www.rubydoc.info/gems/tty-editor
|
44
|
-
#
|
45
|
-
# @api public
|
46
|
-
def editor
|
47
|
-
require 'tty-editor'
|
48
|
-
TTY::Editor
|
49
|
-
end
|
50
|
-
|
51
|
-
# File manipulation utility methods
|
52
|
-
#
|
53
|
-
# @see http://www.rubydoc.info/gems/tty-file
|
54
|
-
#
|
55
|
-
# @api public
|
56
|
-
def generator
|
57
|
-
require 'tty-file'
|
58
|
-
TTY::File
|
59
|
-
end
|
60
|
-
|
61
|
-
# Terminal output paging
|
62
|
-
#
|
63
|
-
# @see http://www.rubydoc.info/gems/tty-pager
|
64
|
-
#
|
65
|
-
# @api public
|
66
|
-
def pager(**options)
|
67
|
-
require 'tty-pager'
|
68
|
-
TTY::Pager.new(options)
|
69
|
-
end
|
70
|
-
|
71
|
-
# Terminal platform and OS properties
|
72
|
-
#
|
73
|
-
# @see http://www.rubydoc.info/gems/tty-pager
|
74
|
-
#
|
75
|
-
# @api public
|
76
|
-
def platform
|
77
|
-
require 'tty-platform'
|
78
|
-
TTY::Platform.new
|
79
|
-
end
|
80
|
-
|
81
|
-
# The interactive prompt
|
82
|
-
#
|
83
|
-
# @see http://www.rubydoc.info/gems/tty-prompt
|
84
|
-
#
|
85
|
-
# @api public
|
86
|
-
def prompt(**options)
|
87
|
-
require 'tty-prompt'
|
88
|
-
TTY::Prompt.new(options)
|
89
|
-
end
|
90
|
-
|
91
|
-
# Get terminal screen properties
|
92
|
-
#
|
93
|
-
# @see http://www.rubydoc.info/gems/tty-screen
|
94
|
-
#
|
95
|
-
# @api public
|
96
|
-
def screen
|
97
|
-
require 'tty-screen'
|
98
|
-
TTY::Screen
|
99
|
-
end
|
100
|
-
|
101
|
-
# The unix which utility
|
102
|
-
#
|
103
|
-
# @see http://www.rubydoc.info/gems/tty-which
|
104
|
-
#
|
105
|
-
# @api public
|
106
|
-
def which(*args)
|
107
|
-
require 'tty-which'
|
108
|
-
TTY::Which.which(*args)
|
109
|
-
end
|
110
|
-
|
111
|
-
# Check if executable exists
|
112
|
-
#
|
113
|
-
# @see http://www.rubydoc.info/gems/tty-which
|
114
|
-
#
|
115
|
-
# @api public
|
116
|
-
def exec_exist?(*args)
|
117
|
-
require 'tty-which'
|
118
|
-
TTY::Which.exist?(*args)
|
119
|
-
end
|
120
|
-
end
|
121
|
-
end
|