Project

ALD

0.0
No commit activity in last 3 years
No release in over 3 years
A gem containing helpers for the ALD API, the ALD package format and ALD package definitions.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
~> 1.17

Runtime

 Project Readme

ALD.rb

Coverage Status Build Status Code Climate Gemnasium Gem Version

About

This is an in-progress attempt at a Ruby library for the ALD protocol, for both client-side and server-side use.

It is organized as a Ruby gem, and is available via RubyGems.

Planned components

Managing ALD packages

  • ALD::Package - read an ALD package file and extract information
  • ALD::Package::Generator - create a new ALD package
  • ALD::Definition - read an ALD package definition and extract information
  • ALD::Definition::Generator - dynamically create a package definition

Accessing the ALD API

  • ALD::API and nested classes - given a root URL, make requests to an ALD server and return the obtained information

Getting started

Install the gem with

gem install ALD

and require it:

require 'ALD'

Open an ALD package

require 'ALD/package'

package = ALD::Package.open('path/to/file.zip')
puts "#{package.definition.name} v#{package.definition.version} (#{package.definition.id}}) is now loaded."

Read a definition file

require 'ALD/definition'

definition = ALD::Definition.new('path/to/definition.xml')
puts "#{definition.name} v#{definition.version}"

puts "Summary: '#{definition.summary}'"

puts "Authors:"
definition.authors.each { |author| puts "\t- #{author['name']}" }

puts "Tagged as:"
definition.tags.each { |tag| puts "\t- #{tag}" }

Create a new definition

TBD (unimplemented)

Create a new package

TBD (unimplemented)

Note:

The ALD::Package and ALD::Definition classes are read-only. To modify a package or definition, open them using the mentioned classes and call ALD::Package::Generator.from_package or ALD::Definition::Generator.from_definition to get a ::Generator instance which you can then modify. Save your changes using ::Generator#generate!.

Dependencies

  • rubyzip to extract information from the ALD packages
  • nokogiri to effectively parse the package definitions

Status

So far, development concentrates on the package management part. It is however far from ready.

Contributions...

... are highly welcomed. I'm happy to accept any helpful pull requests.