<commit_before>class Specinfra::Helper::DetectOs::Coreos < Specinfra::Helper::DetectOs
  def detect
    if run_command('ls /etc/coreos/update.conf').success?
      distro  = nil
      release = nil
      lsb_release = run_command("cat /etc/lsb-release")
      if lsb_release.success?
        lsb_release.stdout.each_line do |line|
          distro  = line.split('=').last.strip if line =~ /^DISTRIB_ID=/
          release = line.split('=').last.strip if line =~ /^DISTRIB_RELEASE=/
        end
      end
      distro ||= 'coreos'
      release ||= nil<commit_msg>Detect os name coreos correctly<commit_after>class Specinfra::Helper::DetectOs::Coreos < Specinfra::Helper::DetectOs
  def detect
    if run_command('ls /etc/coreos/update.conf').success?
      distro  = nil
      release = nil
      lsb_release = run_command("cat /etc/lsb-release")
      if lsb_release.success?
        lsb_release.stdout.each_line do |line|
          distro  = 'coreos' if line.include? "CoreOS"
          release = line.split('=').last.strip if line =~ /^DISTRIB_RELEASE=/
        end
      end
      distro ||= 'coreos'
      release ||= nil
{'fraction_non_alphanumeric': 0.13143872113676733, 'fraction_numerical': 0.0, 'mean_word_length': 2.7072368421052633, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2636590', 'n_tokens_mistral': 378, 'n_tokens_neox': 363, 'n_words': 75}