lib/quby/compiler/services/definition_validator.rb in quby-compiler-0.5.0 vs lib/quby/compiler/services/definition_validator.rb in quby-compiler-0.5.1
- old
+ new
@@ -1,7 +1,7 @@
# frozen_string_literal: true
-require 'nokogumbo'
+require 'nokogiri'
require 'active_model'
require 'quby/compiler/entities/questionnaire'
module Quby
module Compiler
@@ -25,12 +25,12 @@
validate_outcome_tables(questionnaire)
validate_markdown_fields(questionnaire) if questionnaire.validate_html
validate_raw_content_items(questionnaire) if questionnaire.validate_html
# Some compilation errors are Exceptions (pure syntax errors) and some StandardErrors (NameErrors)
rescue Exception => exception # rubocop:disable Lint/RescueException
- definition.errors.add(:sourcecode, {message: "Questionnaire error: #{definition.key}\n" \
- "#{exception.message}",
- backtrace: exception.backtrace[0..20]})
+ definition.errors.add(:sourcecode, message: "Questionnaire error: #{definition.key}\n" \
+ "#{exception.message}",
+ backtrace: exception.backtrace[0..20])
end
def validate_metadata(questionnaire)
if questionnaire.title.blank?
fail "Questionnaire title is missing."