From 02a848e38fbea811b11cd120481c0aa6b3adc0c2 Mon Sep 17 00:00:00 2001 From: magicmilo Date: Mon, 15 Nov 2021 13:34:10 +0000 Subject: [PATCH] rubocop and remove dbg --- lib/tasks/form_definition.rake | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/tasks/form_definition.rake b/lib/tasks/form_definition.rake index d3ed40a2a..8155f76e1 100644 --- a/lib/tasks/form_definition.rake +++ b/lib/tasks/form_definition.rake @@ -12,7 +12,7 @@ def get_all_form_paths(directories) end namespace :form_definition do - desc "Validate JSON against Generic Form Schema" + desc "Validate all JSON against Generic Form Schema" task validate_all: :environment do directories = ["config/forms", "spec/fixtures/forms"] @@ -24,9 +24,9 @@ namespace :form_definition do end end - task :validate, %i[path] => :environment do |_task, args| - puts args + desc "Validate Single JSON against Generic Form Schema" + task :validate, %i[path] => :environment do |_task, args| path = Rails.root.join("config/forms/schema/generic.json") file = File.open(path) schema = JSON.parse(file.read) @@ -34,8 +34,6 @@ namespace :form_definition do puts path - binding.pry - if JSON::Validator.validate(meta_schema, schema) puts "Schema Definition is Valid" else