= RelatonEcma image:https://img.shields.io/gem/v/relaton-ecma.svg["Gem Version", link="https://rubygems.org/gems/relaton-ecma"] image:https://github.com/relaton/relaton-ecma/workflows/macos/badge.svg["Build Status (macOS)", link="https://github.com/relaton/relaton-ecma/actions?workflow=macos"] image:https://github.com/relaton/relaton-ecma/workflows/windows/badge.svg["Build Status (Windows)", link="https://github.com/relaton/relaton-ecma/actions?workflow=windows"] image:https://github.com/relaton/relaton-ecma/workflows/ubuntu/badge.svg["Build Status (Ubuntu)", link="https://github.com/relaton/relaton-ecma/actions?workflow=ubuntu"] image:https://codeclimate.com/github/relaton/relaton-ecma/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/relaton/relaton-ecma"] image:https://img.shields.io/github/issues-pr-raw/relaton/relaton-ecma.svg["Pull Requests", link="https://github.com/relaton/relaton-ecma/pulls"] image:https://img.shields.io/github/commits-since/relaton/relaton-ecma/latest.svg["Commits since latest",link="https://github.com/relaton/relaton-ecma/releases"] RelatonIetf is a Ruby gem that search and fetch standards from the https://www.ecma-international.org[European Computer Manufacturers Association]. == Installation Add this line to your application's Gemfile: [source,ruby] ---- gem 'relaton_ecma' ---- And then execute: $ bundle install Or install it yourself as: $ gem install relaton_ecma == Usage === Search document [source,ruby] ---- require 'relaton_ecma' item = RelatonEcma::EcmaBibliography.get 'ECMA-6' [relaton-ecma] ("ECMA-6") fetching... [relaton-ecma] ("ECMA-6") found ECMA-6 => # nil ---- === Serialization [source,ruby] ---- item.to_xml " 7-bit Coded Character Set https://www.ecma-international.org/publications/standards/Ecma-006.htm http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-006.pdf ECMA-6 1991-12 6 ... " ---- With `bibdata: true` option XML output wrapped with `bibdata` element and `ext` element added. [source,ruby] ---- item.to_xml bibdata: true " 7-bit Coded Character Set https://www.ecma-international.org/publications/standards/Ecma-006.htm http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-006.pdf ECMA-6 1991-12 6 ... document " ---- === Parse a file locally [source,ruby] ---- item = RelatonBib::XMLParser.from_xml File.read("spec/fixtures/bibdata.xml") => # 7-bit Coded Character Set https://www.ecma-international.org/publications/standards/Ecma-006.htm http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-006.pdf ECMA-6 ... " ---- == Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). == Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/relaton/relaton_ecma. == License The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).