lib/convenient_service/dependencies.rb in convenient_service-0.2.1 vs lib/convenient_service/dependencies.rb in convenient_service-0.3.0

- old
+ new

@@ -42,12 +42,25 @@ require_relative "common/plugins/has_attributes/using_active_model_attributes" end ## # @return [Boolean] + # @api private + # + def support_has_result_params_validations_using_active_model_validations? + return false unless active_model.loaded? + return false if ruby.version >= 3.0 && active_model.version < 6.0 + + true + end + + ## + # @return [Boolean] # @note Expected to be called from app entry points like `initializers` in Rails. # + # @see https://marian13.github.io/convenient_service_docs/troubleshooting/i18n_translate_wrong_number_of_arguments + # def require_has_result_params_validations_using_active_model_validations require "active_model" require_relative "service/plugins/has_result_params_validations/using_active_model_validations" end @@ -126,9 +139,33 @@ # def require_dry_examples require "progressbar" require_relative "examples/dry/gemfile" + end + + ## + # @return [ConvenientService::Support::Ruby] + # @api private + # + def ruby + Support::Ruby + end + + ## + # @return [ConvenientService::Support::RSpec] + # @api private + # + def rspec + Support::Gems::RSpec + end + + ## + # @return [ConvenientService::Support::Gems::ActiveModel] + # @api private + # + def active_model + Support::Gems::ActiveModel end end end end