<commit_before>require 'spree_essentials'

module SpreeEssentialCms

  def self.tab
    { :label => "Pages", :route => :admin_pages }
  end
  
  def self.sub_tab
    [ :pages, { :match_path => '/pages' }]
  end
  
  class Engine < Rails::Engine
    
    config.autoload_paths += %W(#{config.root}/lib)    
    
    config.to_prepare do
      #loads application's model / class decorators
      Dir.glob File.expand_path("../../app/**/*_decorator*.rb") do |c|
        Rails.configuration.cache_classes ? require(c) : load(c)
      end

      #loads application's deface view overrides
      Dir.glob File.expand_path("../../app/overrides/*.rb", __FILE__) do |c|
        Rails.application.config.cache_classes ? require(c) : load(c)
      end
    end
    
  end
  
end

SpreeEssentials.register :cms, SpreeEssentialCms<commit_msg>fix decorator load path in main lib<commit_after>require 'spree_essentials'

module SpreeEssentialCms

  def self.tab
    { :label => "Pages", :route => :admin_pages }
  end
  
  def self.sub_tab
    [ :pages, { :match_path => '/pages' }]
  end
  
  class Engine < Rails::Engine
    
    config.autoload_paths += %W(#{config.root}/lib)    
    
    config.to_prepare do
      #loads application's model / class decorators
      Dir.glob File.expand_path("../../app/**/*_decorator.rb", __FILE__) do |c|
        Rails.configuration.cache_classes ? require(c) : load(c)
      end

      #loads application's deface view overrides
      Dir.glob File.expand_path("../../app/overrides/*.rb", __FILE__) do |c|
        Rails.application.config.cache_classes ? require(c) : load(c)
      end
    end
    
  end
  
end

SpreeEssentials.register :cms, SpreeEssentialCms
{'fraction_non_alphanumeric': 0.13159454653230587, 'fraction_numerical': 0.0, 'mean_word_length': 2.7180616740088106, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7558195', 'n_tokens_mistral': 579, 'n_tokens_neox': 566, 'n_words': 120}