Library to access FATE
Note: The API is still a draft. Be careful.
Simple queries by actor, roles.
For SUSE's FATE server, you can use the web url and it will use the right keeper server and take your .oscrc credentials.
More will be coming, the focus is on providing an easy API. You can always get anything else by just doing xpath queries.
client = Feta::Client.new("https://user:email@example.com") query = Feta::Query.new.only_actor("firstname.lastname@example.org").only_product("openSUSE-11.4") features = client.search(query) query = Feta::Query.new.with_id("1234") features = client.search(query)
Feta.client = Feta::Client.new("https://user:email@example.com") Feta::Feature.query.only_actor("firstname.lastname@example.org").only_product("openSUSE-11.4").each do |feature| # .. do something with feature end
Feta will look in the following places for plugins:
lib/feta/plugins in the gem path
A plugin is a class under Feta::Plugins, only one hook is available for now:
class Feta::Plugins::MyPlugin def to_s self.class.to_s end def order # load always last (1.0/0) end def initialize_hook(url, logger, headers) # modify the url, add headers or configure the logger end end
One plugin is included which takes the credentials from .oscrc if using the SUSE internal keeper server.
Change query methods to make them more similar to the Bicho library
Add more data to the Feature class
Allow to search by an arbitrary xpath expression
Duncan Mac-Vicar P. <email@example.com>
Copyright © 2011 SUSE LINUX Products GmbH.
Feta is licensed under the MIT license. See MIT-LICENSE for details.