Module: Debci
- Defined in:
- lib/debci.rb,
lib/debci/db.rb,
lib/debci/api.rb,
lib/debci/app.rb,
lib/debci/job.rb,
lib/debci/key.rb,
lib/debci/amqp.rb,
lib/debci/data.rb,
lib/debci/feed.rb,
lib/debci/html.rb,
lib/debci/graph.rb,
lib/debci/config.rb,
lib/debci/package.rb,
lib/debci/html_cli.rb,
lib/debci/blacklist.rb,
lib/debci/collector.rb,
lib/debci/expiration.rb,
lib/debci/test/paths.rb,
lib/debci/html_helpers.rb,
lib/debci/self_service.rb,
lib/debci/test/expired.rb,
lib/debci/test_handler.rb,
lib/debci/test/duration.rb,
lib/debci/package_status.rb
Defined Under Namespace
Modules: AMQP, DB, Data, HTMLHelpers, Test, TestHandler
Classes: API, App, Blacklist, Collector, CommandFailed, Config, Expiration, Feed, Graph, HTML, Job, Key, Package, PackageStatus, SelfService
Class Method Summary
collapse
Class Method Details
.blacklist ⇒ Object
15
16
17
|
# File 'lib/debci.rb', line 15
def blacklist
@blacklist ||= Debci::Blacklist.new
end
|
.config ⇒ Object
11
12
13
|
# File 'lib/debci.rb', line 11
def config
@config ||= Debci::Config.new
end
|
.config!(data) ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/debci.rb', line 19
def config!(data)
data.each do |k, v|
ENV["debci_#{k}"] = v
end
@config = nil
@blacklist = nil
end
|
.log(*str) ⇒ Object
27
28
29
|
# File 'lib/debci.rb', line 27
def log(*str)
puts(*str) unless config.quiet
end
|
.run(*argv) ⇒ Object
35
36
37
38
39
40
41
|
# File 'lib/debci.rb', line 35
def run(*argv)
system(*argv)
return if $?.exitstatus == 0
cmdline = argv.map { |s| Shellwords.shellescape(s) }.join(' ')
raise Debci::CommandFailed.new(cmdline)
end
|
.warn(*str) ⇒ Object
31
32
33
|
# File 'lib/debci.rb', line 31
def warn(*str)
$stderr.puts(*str)
end
|