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/user.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, User
Class Method Summary
collapse
Class Method Details
.blacklist ⇒ Object
17
18
19
|
# File 'lib/debci.rb', line 17
def blacklist
@blacklist ||= Debci::Blacklist.new
end
|
.config ⇒ Object
13
14
15
|
# File 'lib/debci.rb', line 13
def config
@config ||= Debci::Config.new
end
|
.config!(data) ⇒ Object
21
22
23
24
25
26
27
|
# File 'lib/debci.rb', line 21
def config!(data)
data.each do |k, v|
ENV["debci_#{k}"] = v
end
@config = nil
@blacklist = nil
end
|
.log(*str) ⇒ Object
29
30
31
32
33
34
|
# File 'lib/debci.rb', line 29
def log(*str)
return if config.quiet
puts(*str)
$stdout.flush
end
|
.run(*argv) ⇒ Object
40
41
42
43
44
45
46
|
# File 'lib/debci.rb', line 40
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
36
37
38
|
# File 'lib/debci.rb', line 36
def warn(*str)
$stderr.puts(*str)
end
|