Class: CI::Queue::File

Inherits:
Static
  • Object
show all
Defined in:
lib/ci/queue/file.rb

Instance Attribute Summary

Attributes inherited from Static

#progress, #total

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Static

#acknowledge, #build, #exhausted?, #flaky?, #poll, #populate, #populated?, #requeue, #retry_queue, #size, #supervisor, #to_a

Constructor Details

#initialize(path, *args) ⇒ File

Returns a new instance of File.



12
13
14
15
# File 'lib/ci/queue/file.rb', line 12

def initialize(path, *args)
  io = path == '-' ? STDIN : ::File.open(path)
  super(io.each_line.map(&:strip).reject(&:empty?), *args)
end

Class Method Details

.from_uri(uri, config) ⇒ Object



7
8
9
# File 'lib/ci/queue/file.rb', line 7

def from_uri(uri, config)
  new(uri.path, config)
end