<commit_before>module Rails
  module Generators
    class PluginGenerator < NamedBase
      def create_root
        self.root = File.expand_path("vendor/plugins/#{file_name}", root)
        empty_directory '.'
        FileUtils.cd(root)
      end

      # TODO Check class collision

      def create_root_files
        %w(README MIT-LICENSE Rakefile init.rb install.rb uninstall.rb).each do |file|
          template file
        end
      end

      def create_lib_files
        directory 'lib'
      end

      add_test_framework_option!

      class_option :with_tasks, :type => :boolean, :aliases => "-r", :default => false,
                                :desc => "When supplied creates tasks base files."

      class_option :with_generator, :type => :boolean, :aliases => "-g", :default => false,
                                    :desc => "When supplied creates generator base files."

      def create_tasks_files
        return unless options[:with_tasks]
        directory 'tasks'<commit_msg>Clean up plugin generator.<commit_after>module Rails
  module Generators
    class PluginGenerator < NamedBase
      class_option :with_tasks, :type => :boolean, :aliases => "-r", :default => false,
                                :desc => "When supplied creates tasks base files."

      class_option :with_generator, :type => :boolean, :aliases => "-g", :default => false,
                                    :desc => "When supplied creates generator base files."

      # TODO Check class collision

      def create_root
        self.root = File.expand_path("vendor/plugins/#{file_name}", root)
        empty_directory '.'
        FileUtils.cd(root)
      end

      def create_root_files
        %w(README MIT-LICENSE Rakefile init.rb install.rb uninstall.rb).each do |file|
          template file
        end
      end

      def create_lib_files
        directory 'lib'
      end

      add_test_framework_option!

      def create_tasks_files
        return unless options[:with_tasks]
        directory 'tasks'
{'fraction_non_alphanumeric': 0.0892945239269857, 'fraction_numerical': 0.0, 'mean_word_length': 2.1152073732718892, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1368430', 'n_tokens_mistral': 548, 'n_tokens_neox': 525, 'n_words': 154}