<commit_before># -*- encoding : utf-8 -*-

class Application

  class << self
  
    def tmp_dir
      @tmp_dir ||= File.join(root, %w{tmp})
    end
    
    def logger_dir
      @logger_dir ||= File.join(root, %w{log})
    end

    def env
      @env ||= begin
        env = ENV['APP_ENV'] || ENV['RAILS_ENV']
        
        # if not specify env, try find file with env config/environment.current
        # which created this file by a capistrano, by example
        unless env
          path = File.join(root, %w{ config environment.current })
          if File.exists?(path)
            env = File.read(path)
            env.strip
          end
        end       
        
        env = 'development' unless env
        
        env
      end
    end
    
    alias :environment :env

    def logger
      @logger ||= begin
        file = (env == 'test') ? File.open(File.join(logger_dir, 'ruby-app.log'), "a") : STDERR
        LocalLogger.new(file).tap do |l|
          l.level = App.config.log_level
        end
      end
    end

    def config
      CommonConfig
    end
    
    def identifier
      "ruby-app"
    end
    
    def rake_paths
      @rake_paths ||= []
    end
    
    def initializer_paths
      @initializer_paths ||= []
    end
    
    def bundler_group
    end
    
  end
end

App = Application unless defined?(App)
<commit_msg># fix<commit_after># -*- encoding : utf-8 -*-

class Application

  class << self
  
    def tmp_dir
      @tmp_dir ||= File.join(root, %w{tmp})
    end
    
    def logger_dir
      @logger_dir ||= File.join(root, %w{log})
    end

    def env
      @env ||= begin
        env = ENV['APP_ENV'] || ENV['RAILS_ENV']
        
        # if not specify env, try find file with env config/environment.current
        # which created this file by a capistrano, by example
        unless env
          path = File.join(root, %w{ config environment.current })
          if File.exists?(path)
            env = File.read(path)
            env.strip!
          end
        end       
        
        env = 'development' unless env
        
        env
      end
    end
    
    alias :environment :env

    def logger
      @logger ||= begin
        file = (env == 'test') ? File.open(File.join(logger_dir, 'ruby-app.log'), "a") : STDERR
        LocalLogger.new(file).tap do |l|
          l.level = App.config.log_level
        end
      end
    end

    def config
      CommonConfig
    end
    
    def identifier
      "ruby-app"
    end
    
    def rake_paths
      @rake_paths ||= []
    end
    
    def initializer_paths
      @initializer_paths ||= []
    end
    
    def bundler_group
    end
    
  end
end

App = Application unless defined?(App)

{'fraction_non_alphanumeric': 0.10106971597196607, 'fraction_numerical': 0.0007377351530800443, 'mean_word_length': 1.5779467680608366, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '4368013', 'n_tokens_mistral': 859, 'n_tokens_neox': 846, 'n_words': 227}