From 658f0f0df411c2a44aa20d82e8bf80004a37ef18 Mon Sep 17 00:00:00 2001 From: Matt Taylor <3680737+matt-taylor@users.noreply.github.com> Date: Mon, 14 Mar 2022 07:34:43 -0700 Subject: [PATCH] Patch empty value and Introspection change (#9) * Introspection change * let empty value be a child of the generator to get standard functions --- Gemfile.lock | 2 +- lib/json_schematize.rb | 1 + lib/json_schematize/empty_value.rb | 5 ++++- lib/json_schematize/generator.rb | 1 - lib/json_schematize/version.rb | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e147a3f..e2c305c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - json_schematize (0.5.0) + json_schematize (0.5.2) GEM remote: https://rubygems.org/ diff --git a/lib/json_schematize.rb b/lib/json_schematize.rb index b1836c3..41528f8 100644 --- a/lib/json_schematize.rb +++ b/lib/json_schematize.rb @@ -3,6 +3,7 @@ require "json_schematize/base" require "json_schematize/boolean" require "json_schematize/generator" +require "json_schematize/empty_value" require "json_schematize/version" module JsonSchematize diff --git a/lib/json_schematize/empty_value.rb b/lib/json_schematize/empty_value.rb index 19ec238..e1ccc3d 100644 --- a/lib/json_schematize/empty_value.rb +++ b/lib/json_schematize/empty_value.rb @@ -1,6 +1,9 @@ # frozen_string_literal: true -class JsonSchematize::EmptyValue +require "json_schematize/generator" + +class JsonSchematize::EmptyValue < ::JsonSchematize::Generator def initialize(*) + super end end diff --git a/lib/json_schematize/generator.rb b/lib/json_schematize/generator.rb index ebbd57b..63ebd68 100644 --- a/lib/json_schematize/generator.rb +++ b/lib/json_schematize/generator.rb @@ -1,6 +1,5 @@ # frozen_string_literal: true -require "json_schematize/empty_value" require "json_schematize/field" require "json_schematize/introspect" diff --git a/lib/json_schematize/version.rb b/lib/json_schematize/version.rb index d36b38b..2ffcf77 100644 --- a/lib/json_schematize/version.rb +++ b/lib/json_schematize/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module JsonSchematize - VERSION = "0.5.1" + VERSION = "0.5.2" end