<commit_before>#
# stating point for this was this gist: https://gist.github.com/2771702
#

# Use Octokit 1.3.0 or higher for great justice (and Authorizations)
require 'bundler/setup'
require 'octokit'
require 'yaml'
require 'highline/import'

class GitHubAuth
  # Change NOTE, SCOPES and CREDENTIALS to match your app's needs.
  NOTE = "Pullcrusher!"
  SCOPES = "user, repo"
  CREDENTIALS = File.join("#{ENV['HOME']}", ".config", "pullcrusher.yml")

  def self.client
    new.client
  end

  def client
    @client ||= lambda do
      unless File.exist?(CREDENTIALS)
        authenticate
      end
      Octokit::Client.new(YAML.load_file(CREDENTIALS))
    end.call
  end
<commit_msg>proper use of scope<commit_after>#
# stating point for this was this gist: https://gist.github.com/2771702
#

# Use Octokit 1.3.0 or higher for great justice (and Authorizations)
require 'bundler/setup'
require 'octokit'
require 'yaml'
require 'highline/import'

class GitHubAuth
  # Change NOTE, SCOPES and CREDENTIALS to match your app's needs.
  NOTE = "Pullcrusher!"
  SCOPES = ["user","repo"]
  CREDENTIALS = File.join("#{ENV['HOME']}", ".config", "pullcrusher.yml")

  def self.client
    new.client
  end

  def client
    @client ||= lambda do
      unless File.exist?(CREDENTIALS)
        authenticate
      end
      Octokit::Client.new(YAML.load_file(CREDENTIALS))
    end.call
  end

{'fraction_non_alphanumeric': 0.11875452570601014, 'fraction_numerical': 0.01448225923244026, 'mean_word_length': 3.5913621262458473, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6049849', 'n_tokens_mistral': 501, 'n_tokens_neox': 475, 'n_words': 130}