<commit_before>module GemSuit
  class CLI < Thor
    module Builder

      def self.included(base)
        base.send :include, InstanceMethods
      end

      module InstanceMethods
      private

        def move_test_suites
          mkdir_p "tmp"
          Dir["{test,spec,features}"].each do |dir|
            mv dir, "tmp"
          end
        end

        def create_shared_assets
          # copy suit
          # write templates
        end

        def rails_new(major_version)
          version = ""
          puts "rails new #{version} dummy"
          # `rails new #{version} dummy`
        end

        def create_symlinks

        end

        def rake_install
          cmd = "rake install"
          puts "Running 'rake install' in order to be able to run the Rails 2 generators".green
          puts cmd<commit_msg>Almost completed create_shared_assets<commit_after>require "fileutils"

module GemSuit
  class CLI < Thor
    module Builder

      def self.included(base)
        base.send :include, InstanceMethods
      end

      module InstanceMethods
      private

        def create_shared_assets
          FileUtils.mkdir "spec"
          FileUtils.mkdir "unit"

          temp_dir = "tmp"
          Dir["{test,spec,features}"].each do |dir|
            FileUtils.mkdir temp_dir unless File.exists? temp_dir
            FileUtils.mv dir, temp_dir
          end

          FileUtils.cp_r File.expand_path(suit_path, "."), "test"

          Dir["#{temp_dir}/{test,spec,features}"].each do |dir|
            destination = File.expand_path "test/shared/test/#{File.basename(dir)}"
            FileUtils.rm destination if File.exists? destination
            FileUtils.mv dir, destination
          end
          FileUtils.rmdir temp_dir

          suit_config[:version] = GemSuit::VERSION::STRING
          # write templates
        end

        def rails_new(major_version)
          version = ""
          puts "rails new #{version} dummy"
          # `rails new #{version} dummy`
        end

        def create_symlinks

        end

        def rake_install
          cmd = "rake install"
          puts "Running 'rake install' in order to be able to run the Rails 2 generators".green
          puts cmd
{'fraction_non_alphanumeric': 0.07488789237668161, 'fraction_numerical': 0.0008968609865470852, 'mean_word_length': 1.8062893081761007, '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': '5689219', 'n_tokens_mistral': 625, 'n_tokens_neox': 593, 'n_words': 175}