Module: OmnibusSoftware
- Defined in:
- lib/omnibus-software.rb,
lib/omnibus-software/version.rb
Constant Summary collapse
- VERSION =
File.read(File.join(__dir__, "../../VERSION")).strip.freeze
Class Method Summary collapse
- .fetch(name, path) ⇒ Object
- .fetch_all(path) ⇒ Object
- .fetch_software(software, path) ⇒ Object
- .list ⇒ Object
-
.root ⇒ Pathname
The root where Omnibus Software lives.
-
.verify! ⇒ void
Verify the given software definitions, iterating over each software and loading it.
Class Method Details
.fetch(name, path) ⇒ Object
45 46 47 |
# File 'lib/omnibus-software.rb', line 45 def fetch(name, path) fetch_software(load_software(name), path) end |
.fetch_all(path) ⇒ Object
49 50 51 52 53 54 55 56 |
# File 'lib/omnibus-software.rb', line 49 def fetch_all(path) for_each_software do |software| # only fetch net_fetcher sources for now next if software.source.nil? || software.source[:url].nil? fetch_software(software, path) end end |
.fetch_software(software, path) ⇒ Object
58 59 60 61 62 63 64 |
# File 'lib/omnibus-software.rb', line 58 def fetch_software(software, path) Omnibus::Config.cache_dir File.(path) Omnibus::Config.use_s3_caching false Omnibus.logger.level = :debug puts "Fetching #{software.name}" software.fetcher.fetch end |
.list ⇒ Object
66 67 68 69 70 71 72 73 74 |
# File 'lib/omnibus-software.rb', line 66 def list Omnibus.logger.level = :fatal h = HighLine.new for_output = ["Name", "Default Version", "Source"] for_each_software do |software| for_output += [software.name, software.default_version, maybe_source(software.source)] end puts h.list(for_output, :uneven_columns_across, 3) end |
.root ⇒ Pathname
The root where Omnibus Software lives.
28 29 30 |
# File 'lib/omnibus-software.rb', line 28 def root @root ||= Pathname.new(File.("..", __dir__)) end |
.verify! ⇒ void
This method returns an undefined value.
Verify the given software definitions, iterating over each software and loading it. This is probably the most primitive test ever - just load the DSL files - but it is the best thing we have for CI in omnibus-software.
39 40 41 42 43 |
# File 'lib/omnibus-software.rb', line 39 def verify! for_each_software do |_software| $stdout.print "." end end |