<commit_before>require "thor"

module Pakyow
  class CommandLineInterface < Thor
    map ["--version", "-v"] => :version

    desc "new DESTINATION", <<DESC
Description:
    The 'pakyow new' command creates a new Pakyow application at the path
    specified.

Example:
    pakyow new path/to/application

    This generates a new Pakyow application in path/to/application.
DESC
    def new(destination)
      require "generators/pakyow/app/app_generator"
      Pakyow::Generators::AppGenerator.start(destination)
    end

    desc "console ENVIRONMENT", <<DESC
Description:
    The 'pakyow console' command stages the application and starts an interactive
    session. If environment is not specified, the default_environment defined by
    your application will be used.

Example:
    pakyow console development

    This starts the console with the 'development' configuration.
DESC
    def console(environment = :development)
      require "pakyow/commands/console"
      Pakyow::Commands::Console
        .new(environment: environment)
        .run
    rescue LoadError => e
      raise Thor::Error, <<ERR
Error: #{e.message}
You must run the `pakyow console` command in a Pakyow application's root directory.
ERR
    end

    desc "server ENVIRONMENT", <<DESC
Description:
    The 'pakyow server' command starts the application server.

    If environment is not specified, the default_environment defined
    by your application will be used.

    If port is not specified, the port defined
    by your application will be used (defaults to 3000).

Example:
    pakyow server development -p 3001

    This starts the application server on port 3001 with the 'development' configuration.
DESC
    option :port, type: :numeric, aliases: :p, default: 3000
    def server(environment = :development)
      require "pakyow/commands/server"
      Pakyow::Commands::Server
        .new(environment: environment, port: options[:port])
        .run
    rescue LoadError => e
      raise Thor::Error, <<ERR
Error: #{e.message}
You must run the `pakyow server` command in a Pakyow application's root directory.
ERR
    end

    desc "version", "Display the installed Pakyow version"
    def version
      require "pakyow/version"
      puts "Pakyow #{Pakyow::VERSION}"
    end
  end
end
<commit_msg>Slight change to version display<commit_after>require "thor"

module Pakyow
  class CommandLineInterface < Thor
    map ["--version", "-v"] => :version

    desc "new DESTINATION", <<DESC
Description:
    The 'pakyow new' command creates a new Pakyow application at the path
    specified.

Example:
    pakyow new path/to/application

    This generates a new Pakyow application in path/to/application.
DESC
    def new(destination)
      require "generators/pakyow/app/app_generator"
      Pakyow::Generators::AppGenerator.start(destination)
    end

    desc "console ENVIRONMENT", <<DESC
Description:
    The 'pakyow console' command stages the application and starts an interactive
    session. If environment is not specified, the default_environment defined by
    your application will be used.

Example:
    pakyow console development

    This starts the console with the 'development' configuration.
DESC
    def console(environment = :development)
      require "pakyow/commands/console"
      Pakyow::Commands::Console
        .new(environment: environment)
        .run
    rescue LoadError => e
      raise Thor::Error, <<ERR
Error: #{e.message}
You must run the `pakyow console` command in a Pakyow application's root directory.
ERR
    end

    desc "server ENVIRONMENT", <<DESC
Description:
    The 'pakyow server' command starts the application server.

    If environment is not specified, the default_environment defined
    by your application will be used.

    If port is not specified, the port defined
    by your application will be used (defaults to 3000).

Example:
    pakyow server development -p 3001

    This starts the application server on port 3001 with the 'development' configuration.
DESC
    option :port, type: :numeric, aliases: :p, default: 3000
    def server(environment = :development)
      require "pakyow/commands/server"
      Pakyow::Commands::Server
        .new(environment: environment, port: options[:port])
        .run
    rescue LoadError => e
      raise Thor::Error, <<ERR
Error: #{e.message}
You must run the `pakyow server` command in a Pakyow application's root directory.
ERR
    end

    desc "version", "Display the installed Pakyow version"
    def version
      require "pakyow/version"
      puts "Pakyow v#{VERSION}"
    end
  end
end

{'fraction_non_alphanumeric': 0.07695652173913044, 'fraction_numerical': 0.006956521739130435, 'mean_word_length': 3.3777354900095147, 'pattern_counts': {'":': 0, '<': 25, '<?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': '5611944', 'n_tokens_mistral': 1299, 'n_tokens_neox': 1249, 'n_words': 496}