class Bugzilla::Bugzilla

rdoc

Bugzilla::Bugzilla

Bugzilla::Bugzilla class is to access the Bugzilla::WebService::Bugzilla API that provides functions tell you about Bugzilla in general.

Public Instance Methods

check_version(version_) click to toggle source

rdoc

Bugzilla::Bugzilla#check_version(version_)

Returns Array contains the result of the version check and Bugzilla version that is running on.

# File lib/bugzilla/bugzilla.rb, line 41
def check_version(version_)
  v = version
  f = false
  if v.is_a?(Hash) && v.include?('version') &&
     Gem::Version.new(v['version']) >= Gem::Version.new(version_.to_s)
    f = true
  end

  [f, v['version']]
end
requires_version(cmd, version_) click to toggle source

rdoc

Bugzilla::Bugzilla#requires_version(cmd, version_)

Raise an exception if the Bugzilla doesn't satisfy the requirement of the version.

# File lib/bugzilla/bugzilla.rb, line 60
def requires_version(cmd, version_)
  v = check_version(version_)
  raise NoMethodError, format('%s is not supported in Bugzilla %s', cmd, v[1]) unless v[0]
end

Protected Instance Methods

__last_audit_time(cmd, *_args) click to toggle source
# File lib/bugzilla/bugzilla.rb, line 143
def __last_audit_time(cmd, *_args)
  requires_version(cmd, 4.4)

  # FIXME
end
_extensions(cmd, *_args) click to toggle source
# File lib/bugzilla/bugzilla.rb, line 121
def _extensions(cmd, *_args)
  requires_version(cmd, 3.2)

  @iface.call(cmd)
end
_parameters(cmd, *_args) click to toggle source
# File lib/bugzilla/bugzilla.rb, line 137
def _parameters(cmd, *_args)
  requires_version(cmd, 4.4)

  @iface.call(cmd)
end
_time(cmd, *_args) click to toggle source
# File lib/bugzilla/bugzilla.rb, line 131
def _time(cmd, *_args)
  requires_version(cmd, 3.4)

  @iface.call(cmd)
end
_timezone(cmd, *_args) click to toggle source
# File lib/bugzilla/bugzilla.rb, line 127
def _timezone(cmd, *_args)
  @iface.call(cmd)
end
_version(cmd, *_args) click to toggle source

rdoc

Bugzilla::Bugzilla#parameters

Raw Bugzilla API to obtain parameter values currently used in Bugzilla.

See www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Bugzilla.html

# File lib/bugzilla/bugzilla.rb, line 117
def _version(cmd, *_args)
  @iface.call(cmd)
end