<commit_before>require 'commander'
require_relative 'version'
require_relative '../generator'

module Cuba
  class Cli
    include Commander::Methods

    def run
      program :name, 'cuba'
      program :version, Cuba::Generator::VERSION
      program :description, 'Application Generator for Cuba framework.'

      command :new do |c|
        c.syntax = 'cuba new [options]'
        c.description = 'Creates a new Cuba app'
        c.option '--type STRING', String, 'Creates an app with preferred type'
        c.option '--database STRING', String, 'Setups a database configuration with DataMapper'
        c.action do |args, options|
          if options.type
            generator = Cuba::Generator.new(ARGV[1], options.type)
            generator.create_postgres_file if options.database == 'postgresql'
          else
            generator = Cuba::Generator.new(ARGV[1], :app)
            generator.create_postgres_file if options.database == 'postgresql'
          end
        end
      end
      run!
    end
  end
end<commit_msg>add sqlite to cli.rb<commit_after>require 'commander'
require_relative 'version'
require_relative '../generator'

module Cuba
  class Cli
    include Commander::Methods

    def run
      program :name, 'cuba'
      program :version, Cuba::Generator::VERSION
      program :description, 'Application Generator for Cuba framework.'

      command :new do |c|
        c.syntax = 'cuba new [options]'
        c.description = 'Creates a new Cuba app'
        c.option '--type STRING', String, 'Creates an app with preferred type'
        c.option '--database STRING', String, 'Setups a database configuration with DataMapper'
        c.action do |args, options|
          if options.type
            generator = Cuba::Generator.new(ARGV[1], options.type)
            generator.create_postgres_file if options.database == 'postgresql'
            generartor.create_sqlite_file if options.database == 'sqlite'
          else
            generator = Cuba::Generator.new(ARGV[1], :app)
            generator.create_postgres_file if options.database == 'postgresql'
            generator.create_sqlite_file if options.database == 'sqlite'
          end
        end
      end
      run!
    end
  end
end
{'fraction_non_alphanumeric': 0.09355416293643688, 'fraction_numerical': 0.0017905102954341987, 'mean_word_length': 2.5196850393700787, 'pattern_counts': {'":': 0, '<': 3, '<?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': '630939', 'n_tokens_mistral': 616, 'n_tokens_neox': 604, 'n_words': 188}