Class: Services::LatestBuildLogs

Inherits:
Object
  • Object
show all
Defined in:
lib/busbar_cli/services/latest_build_logs.rb

Class Method Summary collapse

Class Method Details

.call(environment) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/busbar_cli/services/latest_build_logs.rb', line 3

def self.call(environment)
  loop do
    build = BuildsRepository.latest(environment)

    system('clear')
    print build.log

    break if %w(ready broken).include?(build.state)
    sleep(3)
  end
end