[Unreleased]

Total refactor and so quite some breaking changes.

Breaking Changes

  • Nero.load / Nero.load_file removed — replaced by Nero.parse and Nero.parse_file. These return values directly (or raise Nero::ParseError).
  • Nero.configure / Nero.configuration removed — custom tags are now registered via a block passed to parse/parse_file/config_for: ```ruby # Before Nero.configure { |c| c.add_tag("rot/13", klass: RotTag[n: 13]) } Nero.load("secret: !rot/13 uryyb")

# After Nero.parse("secret: !rot/13 uryyb") { |c| c.add_tag("rot/13", RotTag.new(n: 13)) }

  - `Nero::Config` removed — results are plain Hashes (string keys) instead of a Config subclass with DigExt/dig!.
  - `Nero::BaseTag` API changed — tags now implement resolve(args, context:) instead of accessing coder/ctx. Tag options are passed via initialize instead of init_options.
  - !ref syntax changed — from sequence-based !ref [base, url] to dot-notation !ref base.url.
  - root: option replaces root:/env: and uses string keys (e.g. root: :development matches the string key "development").
  - Keys are strings — previously keys were symbolized; now they stay as strings.
  - !uri and !path tags removed — !uri is gone entirely; !path is no longer a built-in.
  - `Nero::PathRootTag` renamed to `Nero::RootPathTag` with a new constructor API.
  - !str/format changed — now also available as !format; the map form (fmt: key) is replaced by a sequence with named-parameter hashes: !format ["http://%<host>s", host: !ref host].
  - load_config removed (was already deprecated).
  - Nero::Util removed — deep_symbolize_keys and deep_transform_values are no longer needed.
  - NERO_ENV_ALL_OPTIONAL env var no longer supported.

## [0.6.0] - 2025-04-10

### deprecations

- `Nero.load_config` - use `Nero.load_file` or `Nero.config_for`.

### other

- API docs live at https://eval.github.io/nero/
- Config for Rails  
  The `config.config_dir` is automatically setup, so `Nero.config_for` (formerly `Nero.load_config`) just works.
- `Nero::Config.dig!` ⛏️💥  
  Any (Hash-)result from `Nero.load/load_file/config_for` is now an instance of `Nero::Config`.  
  This class contains `dig!`, a fail-hard variant of `dig`:
  ```ruby
  Nero.load(<<~Y).dig!(:smtp_settings, :hose) # 💥 typo
    smtp_settings:
      host: 127.0.0.1
      port: 1025
  Y
  #=> 'Nero::DigExt#dig!': path not found [:smtp_settings, :hose] (ArgumentError)

[0.5.0] - 2025-03-20

  • tag-classes
    Added Nero::BaseTag that is the basis of all existing tags.
    This means that building upon existing tags is easier and custom tags can be more powerful.

Create new tags can be done in 3 ways:
By block (as before, but slightly changed interface):

  Nero.configure do |nero|
    nero.add_tag("foo") do |tag|
      # tag of type Nero::BaseTag
    end
  end

By re-using existing tags via options:

  nero.add_tag("env/upcase", klass: Nero::EnvTag[coerce: :upcase])

Finally, by subclassing Nero::BaseTag. See the section "custom tags" from the README.

  • !env/float and !env/float?
  • !env/git_root and !env/rails_root
    Construct a path relative to some root-path: yaml asset_path: !path/rails_root [ public/assets ] Easy to use for your own tags: ruby config.add_tag("path/project_root", klass: Nero::PathRootTag[containing: '.git']) do |path| # possible post-processing end
  • #2 Add irb to gemfile (@dlibanori)
  • #3 Fix missing require (@dlibanori)

[0.4.0] - 2025-02-15

  • Add !ref-tag: ruby Nero.load(<<~YAML) min_threads: !env [MIN_THREADS, !ref [max_threads]] max_threads: 5 end # => {min_threads: 5, max_threads: 5}
  • Support Psych v3
    ...so it can used with Rails v6

[0.3.0] - 2025-02-02

  • Add configuration
    For custom tags: ruby Nero.configure do |nero| nero.add_tag("duration") do |coder| num, duration = coder.seq mult = case duration when /^seconds?/ then 1 when /^minutes?$/ then 60 when /^hours?$/ then 60 *60 when /^days?$/ then 24 * 60 * 60 else raise ArgumentError, "Unknown duration #{coder.seq.inspect}" end num * mult end end ...and config_dir: ruby Nero.configure {|nero| nero.config_dir = Rails.root / "config" }
  • Allow for a Rails.application.config_for like experience ```ruby Nero.configure {|nero| nero.config_dir = Rails.root / "config" }

Nero.load_config(:stripe, root: Rails.env) # Returns content of Rails.root / "config/stripe.yml"

- Add `Nero.load` like `YAML.load`
  ```ruby
  Nero.load(<<~YAML)
    cache_ttl: !duration [1, day]
  end
  # => {cache_ttl: 86400}

[0.1.0] - 2025-01-24

  • Initial release