Class: Legion::Extensions::Exec::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/legion/extensions/exec/client.rb

Instance Method Summary collapse

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

#auditObject



16
17
18
# File 'lib/legion/extensions/exec/client.rb', line 16

def audit(**)
  Runners::Shell.audit(**)
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

#create_repoObject



41
42
43
# File 'lib/legion/extensions/exec/client.rb', line 41

def create_repo(**)
  Runners::Git.create_repo(**)
end

#exec_rspec(path: @base_path) ⇒ Object



50
51
52
# File 'lib/legion/extensions/exec/client.rb', line 50

def exec_rspec(path: @base_path, **)
  Runners::Bundler.exec_rspec(path: path, **)
end

#exec_rubocop(path: @base_path) ⇒ Object



54
55
56
# File 'lib/legion/extensions/exec/client.rb', line 54

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

#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



46
47
48
# File 'lib/legion/extensions/exec/client.rb', line 46

def install(path: @base_path, **)
  Runners::Bundler.install(path: path)
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

#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