lib/avro/builder/rake/avro_generate_task.rb in avro-builder-0.16.1 vs lib/avro/builder/rake/avro_generate_task.rb in avro-builder-0.16.2

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'rake/tasklib' require 'avro/builder' module Avro module Builder @@ -29,9 +31,10 @@ def define namespace task_namespace do desc task_desc task(name.to_sym => dependencies) do raise '"root" must be specified for Avro DSL files' unless root + Avro::Builder.add_load_path(*[root, load_paths].flatten) Dir["#{root}/**/*.rb"].each do |dsl_file| puts "Generating Avro schema from #{dsl_file}" output_file = dsl_file.sub('/dsl/', '/schema/').sub(/\.rb$/, ".#{filetype}") dsl = Avro::Builder.build_dsl(filename: dsl_file)