<commit_before>require 'rails/generators/active_record'

module Events
  module Generators
    class InstallGenerator < ActiveRecord::Generators::Base
      desc "Installs Events and generates the necessary migrations"
      argument :name, :type => :string, :default => "Events"

      # hook_for :users, :default => "devise", :desc => "Admin user generator to run. Skip with --skip-users"

      # def self.source_root
      #   @_active_admin_source_root ||= File.expand_path("../templates", __FILE__)
      # end

      # def copy_initializer
      #   @underscored_user_name = name.underscore
      #   template 'active_admin.rb.erb', 'config/initializers/active_admin.rb'
      # end

      # def setup_directory
      #   empty_directory "app/admin"
      #   template 'dashboard.rb', 'app/admin/dashboard.rb'
      #   if options[:users].present?
      #     @user_class = name
      #     template 'admin_user.rb.erb', "app/admin/#{name.underscore}.rb"
      #   end
      # end

      def setup_routes
        route "resources :events"
      end

      # def create_assets
      #   generate "active_admin:assets"
      # end

      # def create_migrations
      #   Dir["#{self.class.source_root}/migrations/*.rb"].sort.each do |filepath|
      #     name = File.basename(filepath)
      #     migration_template "migrations/#{name}", "db/migrate/#{name.gsub(/^\d+_/,'')}"
      #     sleep 1
      #   end
      # end
    end
  end
end<commit_msg>ref events g install<commit_after>require 'rails/generators/active_record'

module Events
  module Generators
    class InstallGenerator < ActiveRecord::Generators::Base
      desc "Installs Events and generates the necessary migrations"
      argument :name, :type => :string, :default => "Events"

      def setup_routes
        route "resources :events"
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.11394465545306566, 'fraction_numerical': 0.0005425935973955507, 'mean_word_length': 2.644268774703557, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '3101645', 'n_tokens_mistral': 560, 'n_tokens_neox': 557, 'n_words': 128}