From 443ac5ac4500118645e0f00b745d065366c1869d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=9B=D0=B5=D0=BE?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2?= <71232234+leonovk@users.noreply.github.com> Date: Mon, 29 Jul 2024 13:32:49 +0300 Subject: [PATCH] Fixed the logic of importing gems into the validator (#40) --- app/clients_validator.rb | 2 -- config/config.rb | 1 + spec/spec_helper.rb | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/clients_validator.rb b/app/clients_validator.rb index 679c32f..fe90f3d 100644 --- a/app/clients_validator.rb +++ b/app/clients_validator.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'json-schema' - # class for validating input data from the user class ClientsValidator attr_accessor :params diff --git a/config/config.rb b/config/config.rb index 5042547..225aeed 100644 --- a/config/config.rb +++ b/config/config.rb @@ -8,6 +8,7 @@ require 'ipaddr' require 'fileutils' require 'ruby_units/namespaced' +require 'json-schema' env = ENV.fetch('ENVIRONMENT', 'development') Config.load_and_set_settings("config/settings/#{env}.yaml") diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 406045c..c4a5c59 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -9,6 +9,7 @@ require 'fileutils' require 'ruby_units/namespaced' require 'byebug' +require 'json-schema' Config.load_and_set_settings('config/settings/test.yaml')