<commit_before>#
# omnibus project dsl reader
#
module Omnibus
  class Project
    include Rake::DSL

    attr_reader :name
    attr_reader :description
    attr_reader :dependencies

    def self.load(filename)
      new(IO.read(filename), filename)
    end

    def initialize(io, filename)
      @exclusions = Array.new
      instance_eval(io)
      render_tasks
    end

    def name(val)
      @name = val
    end

    def description(val)
      @description = val
    end

    def dependencies(val)
      @dependencies = val
    end

    def exclude(pattern)
      @exclusions << pattern
    end

    def platform_family
      OHAI.platform_family
    end

    def config
      Omnibus.config
    end

    def build_version
      Omnibus::BuildVersion.full
    end

    def package_scripts_path
      "#{Omnibus.gem_root}/package-scripts"
    end
<commit_msg>allow reading of the project name and desc<commit_after>#
# omnibus project dsl reader
#
module Omnibus
  class Project
    include Rake::DSL

    NULL_ARG = Object.new

    attr_reader :dependencies

    def self.load(filename)
      new(IO.read(filename), filename)
    end

    def initialize(io, filename)
      @exclusions = Array.new
      instance_eval(io)
      render_tasks
    end

    def name(val=NULL_ARG)
      @name = val unless val.equal?(NULL_ARG)
      @name
    end

    def description(val=NULL_ARG)
      @description = val unless val.equal?(NULL_ARG)
      @description
    end

    def dependencies(val)
      @dependencies = val
    end

    def exclude(pattern)
      @exclusions << pattern
    end

    def platform_family
      OHAI.platform_family
    end

    def config
      Omnibus.config
    end

    def build_version
      Omnibus::BuildVersion.full
    end

    def package_scripts_path
      "#{Omnibus.root}/package-scripts/#{name}"
    end

{'fraction_non_alphanumeric': 0.07158351409978309, 'fraction_numerical': 0.0, 'mean_word_length': 2.342391304347826, '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': '79182', 'n_tokens_mistral': 599, 'n_tokens_neox': 557, 'n_words': 143}