class Bugzilla::Bugzilla
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
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 45 def check_version(version_) v = version f = false if v.kind_of?(Hash) && v.include?("version") && Gem::Version.new(v['version']) >= Gem::Version.new("#{version_}") then f = true end [f, v['version']] end
requires_version(cmd, version_)
click to toggle source
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 65 def requires_version(cmd, version_) v = check_version(version_) raise NoMethodError, sprintf("%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 153 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 131 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 147 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 141 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 137 def _timezone(cmd, *args) @iface.call(cmd) end
_version(cmd, *args)
click to toggle source
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 127 def _version(cmd, *args) @iface.call(cmd) end