Class: Legion::Extensions::Exec::Client
- Inherits:
-
Object
- Object
- Legion::Extensions::Exec::Client
- Defined in:
- lib/legion/extensions/exec/client.rb
Instance Method Summary collapse
- #add(path: @base_path) ⇒ Object
- #audit ⇒ Object
- #branch(path: @base_path) ⇒ Object
- #cat(path:) ⇒ Object
- #commit(path: @base_path) ⇒ Object
- #cp(source:, destination:) ⇒ Object
- #create_repo ⇒ Object
- #diff(path: @base_path) ⇒ Object
- #exec_rspec(path: @base_path) ⇒ Object
- #exec_rubocop(path: @base_path) ⇒ Object
-
#execute(command:, cwd: @base_path) ⇒ Object
Shell delegation.
- #head(path:) ⇒ Object
-
#init(path: @base_path) ⇒ Object
Git delegation.
-
#initialize(base_path: Dir.pwd) ⇒ Client
constructor
A new instance of Client.
-
#install(path: @base_path) ⇒ Object
Bundler delegation.
- #log(path: @base_path) ⇒ Object
- #ls(path: @base_path) ⇒ Object
- #mkdir(path:) ⇒ Object
- #mv(source:, destination:) ⇒ Object
- #push(path: @base_path) ⇒ Object
-
#pwd(path: @base_path) ⇒ Object
Filesystem delegation.
- #rm(path:) ⇒ Object
- #show(path: @base_path) ⇒ Object
- #status(path: @base_path) ⇒ Object
- #tail(path:) ⇒ Object
- #touch(path:) ⇒ Object
- #wc(path:) ⇒ Object
Constructor Details
#initialize(base_path: Dir.pwd) ⇒ Client
Returns a new instance of Client.
7 8 9 |
# File 'lib/legion/extensions/exec/client.rb', line 7 def initialize(base_path: Dir.pwd) @base_path = base_path end |
Instance Method Details
#add(path: @base_path) ⇒ Object
25 26 27 |
# File 'lib/legion/extensions/exec/client.rb', line 25 def add(path: @base_path, **) Runners::Git.add(path: path, **) end |
#audit ⇒ Object
16 17 18 |
# File 'lib/legion/extensions/exec/client.rb', line 16 def audit(**) Runners::Shell.audit(**) end |
#branch(path: @base_path) ⇒ Object
45 46 47 |
# File 'lib/legion/extensions/exec/client.rb', line 45 def branch(path: @base_path, **) Runners::Git.branch(path: path, **) end |
#cat(path:) ⇒ Object
78 79 80 |
# File 'lib/legion/extensions/exec/client.rb', line 78 def cat(path:, **) Runners::Filesystem.cat(path: path, **) end |
#commit(path: @base_path) ⇒ Object
29 30 31 |
# File 'lib/legion/extensions/exec/client.rb', line 29 def commit(path: @base_path, **) Runners::Git.commit(path: path, **) end |
#cp(source:, destination:) ⇒ Object
94 95 96 |
# File 'lib/legion/extensions/exec/client.rb', line 94 def cp(source:, destination:, **) Runners::Filesystem.cp(source: source, destination: destination, **) end |
#create_repo ⇒ Object
57 58 59 |
# File 'lib/legion/extensions/exec/client.rb', line 57 def create_repo(**) Runners::Git.create_repo(**) end |
#diff(path: @base_path) ⇒ Object
41 42 43 |
# File 'lib/legion/extensions/exec/client.rb', line 41 def diff(path: @base_path, **) Runners::Git.diff(path: path, **) end |
#exec_rspec(path: @base_path) ⇒ Object
111 112 113 |
# File 'lib/legion/extensions/exec/client.rb', line 111 def exec_rspec(path: @base_path, **) Runners::Bundler.exec_rspec(path: path, **) end |
#exec_rubocop(path: @base_path) ⇒ Object
115 116 117 |
# File 'lib/legion/extensions/exec/client.rb', line 115 def exec_rubocop(path: @base_path, **) Runners::Bundler.exec_rubocop(path: path, **) end |
#execute(command:, cwd: @base_path) ⇒ Object
Shell delegation
12 13 14 |
# File 'lib/legion/extensions/exec/client.rb', line 12 def execute(command:, cwd: @base_path, **) Runners::Shell.execute(command: command, cwd: cwd, **) end |
#head(path:) ⇒ Object
82 83 84 |
# File 'lib/legion/extensions/exec/client.rb', line 82 def head(path:, **) Runners::Filesystem.head(path: path, **) end |
#init(path: @base_path) ⇒ Object
Git delegation
21 22 23 |
# File 'lib/legion/extensions/exec/client.rb', line 21 def init(path: @base_path, **) Runners::Git.init(path: path) end |
#install(path: @base_path) ⇒ Object
Bundler delegation
107 108 109 |
# File 'lib/legion/extensions/exec/client.rb', line 107 def install(path: @base_path, **) Runners::Bundler.install(path: path) end |
#log(path: @base_path) ⇒ Object
49 50 51 |
# File 'lib/legion/extensions/exec/client.rb', line 49 def log(path: @base_path, **) Runners::Git.log(path: path, **) end |
#ls(path: @base_path) ⇒ Object
66 67 68 |
# File 'lib/legion/extensions/exec/client.rb', line 66 def ls(path: @base_path, **) Runners::Filesystem.ls(path: path, **) end |
#mkdir(path:) ⇒ Object
70 71 72 |
# File 'lib/legion/extensions/exec/client.rb', line 70 def mkdir(path:, **) Runners::Filesystem.mkdir(path: path, **) end |
#mv(source:, destination:) ⇒ Object
98 99 100 |
# File 'lib/legion/extensions/exec/client.rb', line 98 def mv(source:, destination:, **) Runners::Filesystem.mv(source: source, destination: destination, **) end |
#push(path: @base_path) ⇒ Object
33 34 35 |
# File 'lib/legion/extensions/exec/client.rb', line 33 def push(path: @base_path, **) Runners::Git.push(path: path, **) end |
#pwd(path: @base_path) ⇒ Object
Filesystem delegation
62 63 64 |
# File 'lib/legion/extensions/exec/client.rb', line 62 def pwd(path: @base_path, **) Runners::Filesystem.pwd(path: path, **) end |
#rm(path:) ⇒ Object
102 103 104 |
# File 'lib/legion/extensions/exec/client.rb', line 102 def rm(path:, **) Runners::Filesystem.rm(path: path, **) end |
#show(path: @base_path) ⇒ Object
53 54 55 |
# File 'lib/legion/extensions/exec/client.rb', line 53 def show(path: @base_path, **) Runners::Git.show(path: path, **) end |
#status(path: @base_path) ⇒ Object
37 38 39 |
# File 'lib/legion/extensions/exec/client.rb', line 37 def status(path: @base_path, **) Runners::Git.status(path: path) end |
#tail(path:) ⇒ Object
86 87 88 |
# File 'lib/legion/extensions/exec/client.rb', line 86 def tail(path:, **) Runners::Filesystem.tail(path: path, **) end |
#touch(path:) ⇒ Object
74 75 76 |
# File 'lib/legion/extensions/exec/client.rb', line 74 def touch(path:, **) Runners::Filesystem.touch(path: path, **) end |
#wc(path:) ⇒ Object
90 91 92 |
# File 'lib/legion/extensions/exec/client.rb', line 90 def wc(path:, **) Runners::Filesystem.wc(path: path, **) end |