Experimental loaders for the enorb library
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
spec
.rspec
CHANGELOG.md
Gemfile
Gemfile.lock
LICENSE
README.md
enorb-exploaders.gemspec

README.md

enorb-exploaders

Experimental loaders for the enorb library

Installation

Bundler

Add enorb-exploaders to your Gemfile:

gem 'enorb-exploaders'

Then let bundler install it for you:

bundle

Manually

Alternatively you can also install it manually:

gem install enorb-exploaders

Currently available loaders

These loaders are currently available in the experimental track:

  • Eno::Exploaders::Ipv4 (accepts 0.0.0.0 to 255.255.255.255, returns unaltered string or raises an error for invalid values)

Example

You can use the loaders with enorb as demonstrated in this example.

require 'enorb'
require 'enorb-exploaders'

input = <<~DOC
  good-ipv4: 127.0.0.1
  bad-ipv4: localhost
DOC

document = Eno.parse(input)

document.field('good-ipv4', Eno::Exploaders::Ipv4)
  #=> '127.0.0.1'
  
document.field('bad-ipv4', Eno::Exploaders::Ipv4)
  # raises an error "'bad-ipv4' must be an ipv4 address, for instance '192.168.0.1'.

Purpose

Trying out new, innovative, cool and stupid loader ideas and seeing how they fit into real life usecases. Based on the findings they might be repackaged, integrated into the enorb core, or something else entirely.

Questions to explored

Translations

There could be a considerable amount of useful loaders, which all will require one or multiple error messages each - how can the translations for this be managed, versioned, updated, etc.?

From the insights gained with the core eno libraries it is safe to say that if there is to be some form of a shared translation repository, it should probably be shared by all (exp)loaders packages across different programming languages.

Categorization

How should the loaders be categorized? Types (numbers, strings, ...)? Fields (IT, Communication, Geography)? Countries (International, country specific)?

Concise API

How are the non-core loaders imported, accessed and used in applications? Should they be directly bootstrapped and usable like core loaders or should they remain more separate?

Scope

What kinds of loaders are actually sensible and useful to bundle for everyone, and where do we reach the limit of including too much bloat?