Giter Club home page Giter Club logo

dm-keeper-adapter's Introduction

dm-keeper-adapter

A DataMapper adapter for features.opensuse.org

Usage

This adapter allows easy access to the openSUSE feature database using DataMapper. It supports features, relationtrees, productlines, and products.

features.opensuse.org is the web frontend, the database server provides an xquery API at keeper.novell.com/sxkeeper, which is used by this adapter - hence the name.

Install

Install it with

gem install dm-keeper-adapter

Code

require 'rubygems'
require 'dm-core'
require 'dm-keeper-adapter'

DataMapper::Logger.new($stdout, :debug)

# Retrieves credentials from ~/.oscrc if exists
# Otherwise add user:pass@ before keeper.novell.com
keeper = DataMapper.setup(:default, :adapter => 'keeper', :url  => 'https://keeper.novell.com/sxkeeper')

require 'keeper/feature'
DataMapper.finalize

# Get feature by ID
f = Feature.get(311545)

# Finding features (see http://datamapper.org/docs/find.html)

# Get feature by title (assuming there's only one)
f = Feature.first(:title => "Feature title")

# Get all features matching a title string
features = Feature.all(:title.like => "foobar")

TODO

Real DataMapper queries mapped to XPath

License

MIT

Author

Klaus Kämpf <[email protected]>

dm-keeper-adapter's People

Contributors

kkaempf avatar

Watchers

Spencer Tom Tafadzwa Chirume avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.