<commit_before>module Bosh::Cli::Command
  class Job < Base

    def generate(name)
      check_if_release_dir

      if !name.bosh_valid_id?
        err "`#{name}' is not a vaild Bosh id"
      end

      job_dir = File.join("jobs", name)

      if File.exists?(job_dir)
        err "Job `#{name}' already exists, please pick another name"
      end

      say "create\t#{job_dir}"
      FileUtils.mkdir_p(job_dir)

      config_dir = File.join(job_dir, "config")
      say "create\t#{config_dir}"
      FileUtils.mkdir_p(config_dir)

      spec_file = File.join(job_dir, "spec")
      say "create\t#{spec_file}"
      FileUtils.touch(spec_file)

      monit_file = File.join(job_dir, "monit")
      say "create\t#{monit_file}"
      FileUtils.touch(monit_file)

      File.open(spec_file, "w") do |f|
        f.write("---\nname: #{name}\ntemplates:\n\npackages:\n")<commit_msg>Renamed 'config' to 'templates' in job generator<commit_after>module Bosh::Cli::Command
  class Job < Base

    def generate(name)
      check_if_release_dir

      if !name.bosh_valid_id?
        err "`#{name}' is not a vaild Bosh id"
      end

      job_dir = File.join("jobs", name)

      if File.exists?(job_dir)
        err "Job `#{name}' already exists, please pick another name"
      end

      say "create\t#{job_dir}"
      FileUtils.mkdir_p(job_dir)

      templates_dir = File.join(job_dir, "templates")
      say "create\t#{templates_dir}"
      FileUtils.mkdir_p(templates_dir)

      spec_file = File.join(job_dir, "spec")
      say "create\t#{spec_file}"
      FileUtils.touch(spec_file)

      monit_file = File.join(job_dir, "monit")
      say "create\t#{monit_file}"
      FileUtils.touch(monit_file)

      File.open(spec_file, "w") do |f|
        f.write("---\nname: #{name}\ntemplates:\n\npackages:\n")
{'fraction_non_alphanumeric': 0.13850415512465375, 'fraction_numerical': 0.0, 'mean_word_length': 2.77035490605428, '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': '4198001', 'n_tokens_mistral': 655, 'n_tokens_neox': 641, 'n_words': 127}