[ANN] RCAP 0.2

F

Farrel Lifson

I'm pleased to announce the release of RCAP 0.2. RCAP is a Ruby
implementation of the Common Alerting Protocol(CAP). This release is
release is aimred at developers and =A0adds YAML generation and parsing
support as well as functionality allowing RCAP objects to be displayed
easily in the IRb command console.

=3D What's New 0.2

=3D=3D YAML Support

RCAP now supports the generation of YAML documents to represent each alert.

This YAML message can then be parsed back into it's constituent RCAP
objects using the Alert.from_yaml method.

=3D=3D IRb Console Formatting

All RCAP classes now have custom inspect methods which enables them to
be displayed in a helpful and clear manner to end users in an IRb
console.

For more detailed release notes see
http://www.aimred.com/news/developers/2009/11/20/rcap_0_2_released or
view the RCAP project page at http://www.aimred.com/projects/rcap

Farrel
--
Aimred - Ruby Development and Consulting
http://www.aimred.com



--=20
Aimred - Ruby Development and Consulting
http://www.aimred.com
 
I

Intransition

I'm pleased to announce the release of RCAP 0.2. RCAP is a Ruby
implementation of the Common Alerting Protocol(CAP). This release is
release is aimred at developers and =A0adds YAML generation and parsing
support as well as functionality allowing RCAP objects to be displayed
easily in the IRb command console.

=3D What's New 0.2

=3D=3D YAML Support

RCAP now supports the generation of YAML documents to represent each aler= t.

This YAML message can then be parsed back into it's constituent RCAP
objects using the Alert.from_yaml method.

=3D=3D IRb Console Formatting

All RCAP classes now have custom inspect methods which enables them to
be displayed in a helpful and clear manner to end users in an IRb
console.

For more detailed release notes seehttp://www.aimred.com/news/developers/= 2009/11/20/rcap_0_2_releasedor
view the RCAP project page athttp://www.aimred.com/projects/rcap

Hi Farrel

I'm curious. What does CAP get used for / who is using CAP?

Also, if I might offer a suggestion or two...

You might allow symbols in place of constants, eg.

alert =3D Alert.new( :sender =3D>
'(e-mail address removed)',
:status =3D> :STATUS_ACTUAL, # instead of
Alert::STATUS_ACTUAL
:msg_type =3D> :MSG_TYPE_ALERT,
:scope =3D> :SCOPE_PUBLIC,
:infos =3D> Info.new( :event =3D> 'Liquid
Petroleoum Tanker Fire',
:language =3D> 'en-ZA',
:categories =3D>
[ :CATEGORY_TRANSPORT, :CATEGORY_FIRE ],
:urgency
=3D> :URGENCY_IMMEDIATE,
:severity
=3D> :SEVERITY_SEVERE,
:certainty
=3D> :CERTAINTY_OBSERVED,
:headline =3D> 'LIQUID
PETROLEOUM TANKER FIRE ON N2 INCOMING FREEWAY',
:description =3D> 'A liquid
petroleoum tanker has caught fire on the N2 incoming freeway 1km
after the
R300 interchange. Municipal fire fighting crews have been dispatched.
Traffic
control officers are on the scene and have diverted traffic onto
alternate
routes.' ))


Internally the symbols can be translated into the constants.

Also, considering how it used, it seems like the perfect candidate for
a simple DSL.

alert =3D Alert do
sender
'(e-mail address removed)'
status :STATUS_ACTUAL
msg_type :MSG_TYPE_ALERT
scope :SCOPE_PUBLIC
info do
event 'Liquid Petroleoum Tanker Fire'
language 'en-ZA'
categories
[ :CATEGORY_TRANSPORT, :CATEGORY_FIRE ]
urgency :URGENCY_IMMEDIATE
severity :SEVERITY_SEVERE
certainty :CERTAINTY_OBSERVED
headline 'LIQUID PETROLEOUM TANKER FIRE ON N2
INCOMING FREEWAY'
description 'A liquid petroleoum tanker has
caught fire on the N2 incoming freeway 1km
after the R300 interchange.
Municipal fire fighting crews have been dispatched.
Traffic control officers are
on the scene and have diverted traffic onto
alternate routes.'
end
end
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top