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.
ALD::Package
- read an ALD package file and extract informationALD::Package::Generator
- create a new ALD packageALD::Definition
- read an ALD package definition and extract informationALD::Definition::Generator
- dynamically create a package definition
ALD::API
and nested classes - given a root URL, make requests to an ALD server and return the obtained information
Install the gem with
gem install ALD
and require it:
require 'ALD'
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."
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}" }
TBD (unimplemented)
TBD (unimplemented)
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!
.
- rubyzip to extract information from the ALD packages
- nokogiri to effectively parse the package definitions
So far, development concentrates on the package management part. It is however far from ready.
... are highly welcomed. I'm happy to accept any helpful pull requests.