<commit_before>require "thor"
require "rails/generators"
require "rails/generators/actions"
require "rails/generators/active_record"
require "rails/generators/active_record/migration/migration_generator"

module DaimonSkycrawlers
  module Generator
    class New < Thor::Group
      include Thor::Actions

      argument :name

      def self.source_root
        File.join(__dir__, "templates", "new")
      end

      def create_files
        [
          "README.md",
          "config/database.yml",
        ].each do |path|
          template("#{path}.erb", "#{name}/#{path}")
        end
        invoke(MigrationGenerator, [
                 "CreatePage",
                 "url:string",
                 "headers:text",
                 "body:binary",
                 "last_modified_at:datetime",
                 "etag:string",
                 "timestamps"
               ],
          { destination_root: File.join(destination_root, name) })
      end

      def copy_files
        [
          "Gemfile",
          "Rakefile",
          "app/crawlers/sample_crawler.rb",
          "app/processors/sample_processor.rb",
          "config/init.rb",
        ].each do |path|
          copy_file(path, "#{name}/#{path}", mode: :preserve)
        end
      end
    end

    class MigrationGenerator < ActiveRecord::Generators::MigrationGenerator
      def self.source_root
        ActiveRecord::Generators::MigrationGenerator.source_root
      end

      def create_migration_file
        set_local_assigns!
        validate_file_name!
        dest = options[:destination_root]
        migration_template @migration_template, "#{dest}/db/migrate/#{file_name}.rb"
      end
    end
  end
end<commit_msg>Add missing paren<commit_after>require "thor"
require "rails/generators"
require "rails/generators/actions"
require "rails/generators/active_record"
require "rails/generators/active_record/migration/migration_generator"

module DaimonSkycrawlers
  module Generator
    class New < Thor::Group
      include Thor::Actions

      argument :name

      def self.source_root
        File.join(__dir__, "templates", "new")
      end

      def create_files
        [
          "README.md",
          "config/database.yml",
        ].each do |path|
          template("#{path}.erb", "#{name}/#{path}")
        end
        invoke(MigrationGenerator, [
                 "CreatePage",
                 "url:string",
                 "headers:text",
                 "body:binary",
                 "last_modified_at:datetime",
                 "etag:string",
                 "timestamps"
               ],
          { destination_root: File.join(destination_root, name) })
      end

      def copy_files
        [
          "Gemfile",
          "Rakefile",
          "app/crawlers/sample_crawler.rb",
          "app/processors/sample_processor.rb",
          "config/init.rb",
        ].each do |path|
          copy_file(path, "#{name}/#{path}", mode: :preserve)
        end
      end
    end

    class MigrationGenerator < ActiveRecord::Generators::MigrationGenerator
      def self.source_root
        ActiveRecord::Generators::MigrationGenerator.source_root
      end

      def create_migration_file
        set_local_assigns!
        validate_file_name!
        dest = options[:destination_root]
        migration_template(@migration_template, "#{dest}/db/migrate/#{file_name}.rb")
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.1072370348666862, 'fraction_numerical': 0.0, 'mean_word_length': 2.0159010600706715, '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': '5202833', 'n_tokens_mistral': 980, 'n_tokens_neox': 965, 'n_words': 172}