class Options

Public Class Methods

new(args) click to toggle source
# File bin/uniq-ci-report, line 9
def initialize(args)
  @args = args
end

Public Instance Methods

hipchat_room() click to toggle source
# File bin/uniq-ci-report, line 21
def hipchat_room
  ci_config["hipchat_room"]
end
hipchat_token() click to toggle source
# File bin/uniq-ci-report, line 17
def hipchat_token
  ci_config["hipchat_token"]
end
matchers() click to toggle source
# File bin/uniq-ci-report, line 25
def matchers
  ci_config["matchers"]
end
url_prefix() click to toggle source
# File bin/uniq-ci-report, line 29
def url_prefix
  ci_config["url_prefix"]
end
valid?() click to toggle source
# File bin/uniq-ci-report, line 33
def valid?
  [ "fail", "success" ].include?(verb) && !ci_config.nil? &&
  hipchat_token && hipchat_room && matchers
end
verb() click to toggle source
# File bin/uniq-ci-report, line 13
def verb
  @args[0]
end

Private Instance Methods

ci_config() click to toggle source
# File bin/uniq-ci-report, line 40
def ci_config
  config_file_name = "./ci/config.yml"
  if File.exists?(config_file_name)
    @ci_config ||= YAML.load_file("./ci/config.yml")
  else
    nil
  end
end