Project

feta

0.0
No commit activity in last 3 years
No release in over 3 years
Feta is a library to access FATE using the keeper API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.4.1
~> 1.5
 Project Readme

Feta¶ ↑

Introduction¶ ↑

Library to access FATE

Note: The API is still a draft. Be careful.

Features¶ ↑

  • 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.

Example (API)¶ ↑

Client API¶ ↑

client = Feta::Client.new("https://user:password@keeper.host.com")
query = Feta::Query.new.only_actor("me@mail.com").only_product("openSUSE-11.4")
features = client.search(query)

query = Feta::Query.new.with_id("1234")
features = client.search(query)

ActiveRecord-like API¶ ↑

Feta.client = Feta::Client.new("https://user:password@keeper.host.com")
Feta::Feature.query.only_actor("me@mail.com").only_product("openSUSE-11.4").each do |feature|
   # .. do something with feature
end

Extending Feta¶ ↑

Feta will look in the following places for plugins:

  • lib/feta/plugins in the gem path

  • $HOME/.local/share/feta/plugins

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

SUSE plugin¶ ↑

One plugin is included which takes the credentials from .oscrc if using the SUSE internal keeper server.

Roadmap¶ ↑

  • 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

Authors¶ ↑

  • Duncan Mac-Vicar P. <dmacvicar@suse.de>

License¶ ↑

Copyright © 2011 SUSE LINUX Products GmbH.

Feta is licensed under the MIT license. See MIT-LICENSE for details.