Sha256: 2e54caed050b7eb48a0097e4ff5e811776f183599bb7760d73f381078b5496f3

Contents?: true

Size: 710 Bytes

Versions: 16

Compression:

Stored size: 710 Bytes

Contents

#!/usr/bin/env ruby
require 'iniparse'

settings_file = "#{ABIQUO_BASE_DIR}/config/abiquo.properties"

if File.exist? settings_file
  
  begin
    ini = IniParse.parse File.read(settings_file)
    raise Exception.new('Missing [remote-services] section') if ini['remote-services'].nil?
    
    puts "\nAbiquo Remote Services Configuration"
    puts "-------------------------------------\n\n"

    File.read(settings_file).each_line do |l|
      next if l =~ /\[.*?\]/
      puts l
    end
  rescue Exception => e
    puts "Invalid properties file. Missing [remote-services] section?"
    puts "DEBUG: #{e.message}"
  end
else
  $stderr.puts "abiquo.properties file not found. Cannot retrieve properties."
end

Version data entries

16 entries across 9 versions & 1 rubygems

Version Path
abiquo-etk-0.6.4 lib/abicli/commands/remote-services-settings18.ext
abiquo-etk-0.6.4 lib/abicli/commands/remote-services-settings17.ext
abiquo-etk-0.6.3 lib/abicli/commands/remote-services-settings18.ext
abiquo-etk-0.6.3 lib/abicli/commands/remote-services-settings17.ext
abiquo-etk-0.6.2 lib/abicli/commands/remote-services-settings17.ext
abiquo-etk-0.6.2 lib/abicli/commands/remote-services-settings18.ext
abiquo-etk-0.6.1 lib/abicli/commands/remote-services-settings17.ext
abiquo-etk-0.6.1 lib/abicli/commands/remote-services-settings18.ext
abiquo-etk-0.6.0 lib/abicli/commands/remote-services-settings17.ext
abiquo-etk-0.6.0 lib/abicli/commands/remote-services-settings18.ext
abiquo-etk-0.5.9 lib/abicli/commands/remote-services-settings17.ext
abiquo-etk-0.5.9 lib/abicli/commands/remote-services-settings18.ext
abiquo-etk-0.5.8 lib/abicli/commands/remote-services-settings18.ext
abiquo-etk-0.5.8 lib/abicli/commands/remote-services-settings17.ext
abiquo-etk-0.5.3 lib/abicli/commands/remote-services-settings17.ext
abiquo-etk-0.4.42 lib/abicli/commands/remote-services-settings17.ext