<commit_before>class Git::Semaphore::Project

  attr_writer :owner
  attr_writer :name

  attr_writer :branch_name
  attr_writer :commit_sha
  attr_writer :build_number

  def initialize git_repo, config = ENV
    @auth_token = Git::Semaphore.auth_token
    @git_repo   = git_repo

    if full_name            = config['SEMAPHORE_PROJECT_NAME']
      self.owner, self.name = full_name.split('/')
    end

    self.branch_name        = config['SEMAPHORE_BRANCH_NAME']
    self.commit_sha         = config['SEMAPHORE_COMMIT_SHA']
    self.build_number       = config['SEMAPHORE_BUILD_NUMBER']
  end

  def settings
    {
      auth_token:   <PASSWORD>,
      project_name: full_name,
      branch_name:  branch_name,
      commit_sha:   commit_sha,
      build_number: build_number,
    }
  end<commit_msg>Factor out awkward attribute writers<commit_after>class Git::Semaphore::Project

  def initialize git_repo, config = ENV
    @auth_token = Git::Semaphore.auth_token
    @git_repo   = git_repo

    if full_name = config['SEMAPHORE_PROJECT_NAME']
      @owner, @name = full_name.split('/')
    end

    @branch_name  = config['SEMAPHORE_BRANCH_NAME']
    @commit_sha   = config['SEMAPHORE_COMMIT_SHA']
    @build_number = config['SEMAPHORE_BUILD_NUMBER']
  end

  def settings
    {
      auth_token:   @<PASSWORD>,
      project_name: full_name,
      branch_name:  branch_name,
      commit_sha:   commit_sha,
      build_number: build_number,
    }
  end
{'fraction_non_alphanumeric': 0.09047292666209733, 'fraction_numerical': 0.0, 'mean_word_length': 3.183381088825215, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2240156', 'n_tokens_mistral': 504, 'n_tokens_neox': 493, 'n_words': 89}