<commit_before>require 'ruby-debug'
Debugger.start
if Debugger.respond_to?(:settings)
  Debugger.settings[:autoeval] = true
  Debugger.settings[:autolist] = 1
end


module Itkin
  class ScaffoldGenerator < Rails::Generators::NamedBase
    desc "Itkin custom ajax scaffold"

    include Rails::Generators::ResourceHelpers
    include Rails::Generators::Migration

    source_root File.expand_path('../templates', __FILE__)

    argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
    class_option :orm, :type => :boolean, :default => true
    class_option :javascript, :type => :boolean, :default => false
    class_option :stylesheet, :type => :boolean, :default => false
    class_option :migration,  :type => :boolean, :default => true
    class_option :timestamps, :type => :boolean
    class_option :parent,     :type => :string, :desc => "The parent class for the generated model"

    def create_migration_file
      return if not options[:orm] or not options[:migration] or options[:parent]
      migration_template "migration.rb", "db/migrate/create_#{table_name}.rb"
    end

    def create_model_file
      return unless options[:orm]
      template 'model.rb', File.join('app/models',  "#{file_name}.rb")
    end

    def create_fixtures_file
      return unless options[:orm]
      template 'test/fixtures.yml', File.join('test/fixtures', "#{file_name.pluralize}.yml")
    end

    def create_unit_test_file
      return unless options[:orm]
      template 'test/unit.rb', File.join('test/unit', "#{file_name}_test.rb")
    end<commit_msg>options<commit_after>require 'ruby-debug'
Debugger.start
if Debugger.respond_to?(:settings)
  Debugger.settings[:autoeval] = true
  Debugger.settings[:autolist] = 1
end


module Itkin
  class ScaffoldGenerator < Rails::Generators::NamedBase
    desc "Itkin custom ajax scaffold"

    include Rails::Generators::ResourceHelpers
    include Rails::Generators::Migration

    source_root File.expand_path('../templates', __FILE__)

    argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
    class_option :model, :type => :boolean, :default => true
    class_option :javascript, :type => :boolean, :default => false
    class_option :stylesheet, :type => :boolean, :default => false
    class_option :migration,  :type => :boolean, :default => true
    class_option :timestamps, :type => :boolean
    class_option :parent,     :type => :string, :desc => "The parent class for the generated model"

    def create_migration_file
      return if not options[:model] or not options[:migration] or options[:parent]
      migration_template "migration.rb", "db/migrate/create_#{table_name}.rb"
    end

    def create_model_file
      return unless options[:model]
      template 'model.rb', File.join('app/models',  "#{file_name}.rb")
    end

    def create_fixtures_file
      return unless options[:model]
      template 'test/fixtures.yml', File.join('test/fixtures', "#{file_name.pluralize}.yml")
    end

    def create_unit_test_file
      return unless options[:model]
      template 'test/unit.rb', File.join('test/unit', "#{file_name}_test.rb")
    end
{'fraction_non_alphanumeric': 0.13073538654934003, 'fraction_numerical': 0.0006285355122564425, 'mean_word_length': 4.125603864734299, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, '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': '6641411', 'n_tokens_mistral': 979, 'n_tokens_neox': 956, 'n_words': 239}