Project

hummel

0.0
No release in over 3 years
HUML (Human Markup Language) is a data serialization format designed for human readability. This gem provides a complete Ruby implementation including a parser for decoding HUML documents and an encoder for converting Ruby objects to HUML format.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Hummel

An HUML parser implementation in ruby.

Installation

Add this line to your application's Gemfile:

gem 'hummel'

And then execute:

bundle install

Or install it yourself as:

gem install hummel

Usage

Parsing HUML

require 'hummel'

huml_string = <<~HUML
  name: "John Doe"
  age: 30
  email: "john@example.com"
HUML

data = Hummel::Decode.parse(huml_string)
# => {"name"=>"John Doe", "age"=>30, "email"=>"john@example.com"}

Encoding to HUML

require 'hummel'

data = {
  name: "John Doe",
  age: 30,
  hobbies: ["reading", "coding", "hiking"]
}

huml_string = Hummel::Encode.stringify(data)
puts huml_string
# Output:
# age: 30
# hobbies::
#   - reading
#   - coding
#   - hiking
# name: John Doe

Options

You can include the HUML version header when encoding:

Hummel::Encode.stringify(data, include_version: true)
# Output:
# %HUML v0.1.0
#
# age: 30
# ...

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 bin/rake install.

To release a new version:

  1. Run tests and linters: bin/rake and address any issues in separate commits.

  2. Update the version number in lib/hummel/version.rb.

  3. Update the CHANGELOG.md to include this version and brief summaries of changes.

  4. Commit changes:

     git add lib/hummel/version.rb CHANGELOG.md
     git commit -m "Bump version to 0.2.0"
    
  5. Run bin/rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

  6. Create a GitHub Release from the tag with the CHANGELOG.md notes.

Note: In follow up commits to this release please re-add the [Unreleased] section to CHANGELOG.md for future work.

Note: Make sure you're authed with rubygems.org via gem signin before running the release command.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/djbender/hummel. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Hummel project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

Name

This gem is named hummel because huml was already taken on rubygems.org.