<commit_before># encoding: utf-8

require "rango/exceptions"
require "rango/loggers/logger"
require "rango/rack/middlewares/basic"
require "rango/project"
require "rango/utils"

module Rango
  # all the helpers are in Rango::Helpers
  # so if you want to register your own, just
  # Rango::Helpers.send(:include, Pupu::Helpers)
  Helpers ||= Module.new

  class << self
    # @since 0.0.1
    # @return [String] Returns current environment name. Possibilities are +development+ or +production+.
    attribute :environment, "development"

    # @since 0.0.2
    # @example
    #   Rango.path
    #   # => /usr/lib/ruby/lib/ruby/site_ruby/1.8/rango
    # @return [Path] Rango root path
    def path
      @path ||= MediaPath.new(self.root)
    end

    # @since 0.0.1
    # @example
    #   Rango.root
    #   # => /usr/lib/ruby/lib/ruby/site_ruby/1.8/rango
    # @return [Rango::Logger] Logger for logging framework-related stuff. For logging project-relating stuff please use Project.logger.
    # @see Project::logger
    def logger
      @logger ||= Rango::Logger.new
    end

    # @since 0.0.1
    # @example
    #   Rango.boot # require init.rb
    #   Rango.boot { require_relative "config/init.rb" } # custom boot
    # @param [Hash] options You can specify flat: true for sinatra-like flat application.
    # @return [Boolean] Returns true if boot succeed or false if not. If ARGV includes "-i", IRB interactive session will start.
    def boot(options = Hash.new, &block)
      self.environment = options[:environment] unless options[:environment]
      require "rango/boot"
      block.call if block_given?
      self.bootloaders.each do |name, bootloader|
        logger.debug "Calling bootloader #{name}"
        bootloader.call
      end
    end

    # @since 0.0.2
    def reboot(options = Hash.new)
      self.boot(options.merge(force: true))<commit_msg>Fixed setting environment in Rango.boot(environment: whatever)<commit_after># encoding: utf-8

require "rango/exceptions"
require "rango/loggers/logger"
require "rango/rack/middlewares/basic"
require "rango/project"
require "rango/utils"

module Rango
  # all the helpers are in Rango::Helpers
  # so if you want to register your own, just
  # Rango::Helpers.send(:include, Pupu::Helpers)
  Helpers ||= Module.new

  class << self
    # @since 0.0.1
    # @return [String] Returns current environment name. Possibilities are +development+ or +production+.
    attribute :environment, "development"

    # @since 0.0.2
    # @example
    #   Rango.path
    #   # => /usr/lib/ruby/lib/ruby/site_ruby/1.8/rango
    # @return [Path] Rango root path
    def path
      @path ||= MediaPath.new(self.root)
    end

    # @since 0.0.1
    # @example
    #   Rango.root
    #   # => /usr/lib/ruby/lib/ruby/site_ruby/1.8/rango
    # @return [Rango::Logger] Logger for logging framework-related stuff. For logging project-relating stuff please use Project.logger.
    # @see Project::logger
    def logger
      @logger ||= Rango::Logger.new
    end

    # @since 0.0.1
    # @example
    #   Rango.boot # require init.rb
    #   Rango.boot { require_relative "config/init.rb" } # custom boot
    # @param [Hash] options You can specify flat: true for sinatra-like flat application.
    # @return [Boolean] Returns true if boot succeed or false if not. If ARGV includes "-i", IRB interactive session will start.
    def boot(options = Hash.new, &block)
      self.environment = options[:environment] if options[:environment]
      require "rango/boot"
      block.call if block_given?
      self.bootloaders.each do |name, bootloader|
        logger.debug "Calling bootloader #{name}"
        bootloader.call
      end
    end

    # @since 0.0.2
    def reboot(options = Hash.new)
      self.boot(options.merge(force: true))
{'fraction_non_alphanumeric': 0.11789584985461274, 'fraction_numerical': 0.010573618821041502, 'mean_word_length': 2.9050567595459236, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1731951', 'n_tokens_mistral': 1245, 'n_tokens_neox': 1203, 'n_words': 338}