<commit_before>module Spree
  module Core
    module CalculatedAdjustments
      module ClassMethods
        def calculated_adjustments
          has_one   :calculator, :as => :calculable, :dependent => :destroy
          accepts_nested_attributes_for :calculator
          validates :calculator, :presence => true if options[:require]

          def self.calculators
            Rails.application.config.spree.calculators.send(self.to_s.tableize.gsub('/', '_').sub('spree_', ''))
          end

          def self.register(*args)
            ActiveSupport::Deprecation.warn("Calculator registration has changed, add your calculator to the relevant Rails.application.config.spree.calculators collection.", caller)
          end

          include InstanceMethods
        end<commit_msg>Remove deprecated register method<commit_after>module Spree
  module Core
    module CalculatedAdjustments
      module ClassMethods
        def calculated_adjustments
          has_one   :calculator, :as => :calculable, :dependent => :destroy
          accepts_nested_attributes_for :calculator
          validates :calculator, :presence => true if options[:require]

          def self.calculators
            Rails.application.config.spree.calculators.send(self.to_s.tableize.gsub('/', '_').sub('spree_', ''))
          end

          include InstanceMethods
        end
{'fraction_non_alphanumeric': 0.08682855040470934, 'fraction_numerical': 0.0, 'mean_word_length': 2.7777777777777777, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4143699', 'n_tokens_mistral': 366, 'n_tokens_neox': 352, 'n_words': 82}