Browse Source

rubocop and remove dbg

pull/91/head
magicmilo 3 years ago
parent
commit
02a848e38f
  1. 8
      lib/tasks/form_definition.rake

8
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

Loading…
Cancel
Save