RelatonOmg is a Ruby gem that searches and fetches standards from The Object Management Group (OMG).
The standards are scraped from https://www.omg.org/spec
Installation
Add this line to your application’s Gemfile:
gem 'relaton-omg'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install relaton-omg
Usage
Search document
Reference format is OMG + {ACRONYM} + {VERSION}
-
ACRONYMis an acronym from the list of specs https://www.omg.org/spec/#all -
VERSION(optional) if omitted then the latest version is fetched
require 'relaton/omg'
=> true
item = Relaton::Omg::Bibliography.get 'OMG AMI4CCM 1.0'
[relaton-omg] INFO: (OMG AMI4CCM 1.0) Fetching from www.omg.org ...
[relaton-omg] INFO: (OMG AMI4CCM 1.0) Found: `OMG AMI4CCM 1.0`
=> #<Relaton::Bib::ItemData:0x0000000128bf7650
...
# Return nil if the document doesn't exist.
Relaton::Omg::Bibliography.get 'OMG 1111'
[relaton-omg] INFO: (OMG 1111) Fetching from www.omg.org ...
[relaton-omg] INFO: (OMG 1111) Not found.
=> nil
Serialization
item.to_xml
=> "<bibitem id="OMGAMI4CCM10" schema-version="v1.4.1">
<fetched>2026-02-27</fetched>
<title language="en" script="Latn" type="main">Asynchronous Method Invocation for CCM</title>
<uri type="src">https://www.omg.org/spec/AMI4CCM/1.0/About-AMI4CCM</uri>
<uri type="pdf">https://www.omg.org/spec/AMI4CCM/1.0/PDF</uri>
<docidentifier type="OMG" primary="true">OMG AMI4CCM 1.0</docidentifier>
...
</bibitem>"
item.to_xml bibdata: true
=> "<bibdata schema-version="v1.4.1">
<fetched>2026-02-27</fetched>
<title language="en" script="Latn" type="main">Asynchronous Method Invocation for CCM</title>
<uri type="src">https://www.omg.org/spec/AMI4CCM/1.0/About-AMI4CCM</uri>
<uri type="pdf">https://www.omg.org/spec/AMI4CCM/1.0/PDF</uri>
<docidentifier type="OMG" primary="true">OMG AMI4CCM 1.0</docidentifier>
...
</bibdata>"
Typed links
OMG documents may have src and pdf link source types.
item.source[0].type
=> "src"
item.source[0].content
=> "https://www.omg.org/spec/AMI4CCM/1.0/About-AMI4CCM"
Create bibliographic item from XML
xml = File.read 'spec/fixtures/omg_ami4ccm_1_0.xml', encoding: 'UTF-8'
item = Relaton::Omg::Bibitem.from_xml xml
=> #<Relaton::Bib::ItemData:0x00000001248f8c00
...
Create bibliographic item from YAML
yaml = File.read 'spec/fixtures/omg_ami4ccm_1_0.yaml', encoding: 'UTF-8'
item = Relaton::Omg::Item.from_yaml yaml
=> #<Relaton::Bib::ItemData:0x000000012813b180
...
Logging
RelatonOmg uses the relaton-logger gem for logging. By default, it logs to STDOUT. To change the log levels and add other loggers, read the relaton-logger documentation.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/relaton/relaton-omg.
License
The gem is available as open source under the terms of the MIT License.