class Polisher::Fedora
Constants
- PACKAGE_LIST_API
Public Class Methods
gems_owned_by(user)
click to toggle source
Retrieve list of gems owned/co-maintained by the specified user
@param [String] user Fedora
username to lookup @return [Array<String>] list of gems which the user owns/has access to
# File lib/polisher/targets/fedora.rb, line 17 def self.gems_owned_by(user) user_packages_url = "#{PACKAGE_LIST_API}/packager/package/#{user}" pkg_list = JSON.load(open(user_packages_url)) pkg_owns = pkg_list['point of contact'] .select { |pkg| pkg['name'] =~ /^rubygem-/ } .collect { |pkg| pkg['name'].gsub(/rubygem-/, '') } pkg_has_access = pkg_list['co-maintained'] .select { |pkg| pkg['name'] =~ /^rubygem-/ } .collect { |pkg| pkg['name'].gsub(/rubygem-/, '') } pkg_owns + pkg_has_access # TODO: instantiate Polisher::Gem instances & return end
versions_for(name, &bl)
click to toggle source
Retrieve list of the versions of the specified package in the various Fedora
releases.
@param [String] name name of the package to lookup @param [Callable] bl optional callback to invoke with versions retrieved @return [Array<String>] list of versions in Fedora
# File lib/polisher/targets/fedora.rb, line 40 def self.versions_for(name, &bl) # simply dispatch to bodhi to get latest updates Polisher::Bodhi.versions_for name do |_target, pkg_name, versions| bl.call(:fedora, pkg_name, versions) unless bl.nil? end end