Module: RocketApi

Defined in:
lib/rocket_api/lib.rb,
lib/rocket_api/errors.rb,
lib/rocket_api/version.rb,
lib/rocket_api/constants.rb,
lib/rocket_api/validation.rb,
lib/rocket_api/commands/dirs.rb,
lib/rocket_api/commands/files.rb,
lib/rocket_api/commands/helper.rb,
lib/rocket_api/rocket_commands.rb,
lib/rocket_api/commands/bot_dirs.rb,
lib/rocket_api/commands/gems_dir.rb,
lib/rocket_api/commands/rack_dir.rb,
lib/rocket_api/library/helper_plain_text.rb,
lib/rocket_api/library/gem_repo_plain_text.rb,
lib/rocket_api/library/rack_repo_plain_text.rb

Defined Under Namespace

Modules: Commands, Lib, Library, Validation Classes: CreateDirError, Error, InitFilesError, RocketCommands, ValidationError

Constant Summary collapse

VERSION =
"0.0.2.0".freeze
REGEXP_VALID =

Valid input

/[^0-9A-Za-z_-]/.freeze
CHECK_APPS =
%w[*.gemspec *.ru].freeze
COMMANDS =

Valid commands

{ init: "init", gem: "gem", rack: "rack", bot: "bot" }.freeze
GEM_DIRS =

Gem

%w[bin lib test].freeze
GEM_FILES =
%w[bin! gemspec! gems_main_file! gems_version! gem_test! rake_file! gitignore! gem_file! rubocop_yml!].freeze
GEM_MAP =
{ init_dirs: GEM_DIRS, init_files: GEM_FILES }.freeze
RACK_DIRS =

Rack

%w[app config test].freeze
RACK_FILES =
%w[rack_routes! rack_base_controller! rack_config_ru! gitignore! rack_app! rack_router! rack_initializers! rack_application! rack_gemfile!].freeze
RACK_MAP =
{ init_dirs: RACK_DIRS, init_files: RACK_FILES }.freeze
BOT_DIRS =

Bot

%w[app bin config db test services].freeze
BOT_FILES =
%w[readme! fake!].freeze
BOT_MAP =
{ init_dirs: BOT_DIRS, init_files: BOT_FILES }.freeze
AVAILABLE_COMMANDS =

Dirs map

{
  COMMANDS[:init] => {
    COMMANDS[:gem] => GEM_MAP,
    COMMANDS[:rack] => RACK_MAP,
    COMMANDS[:bot] => BOT_MAP
  }
}.freeze
PONG =

Ping

"PONG".freeze
INIT_DIR_ERROR =

Answers

"Init directory error".freeze
APP_DETECTED =
"Another one app exist".freeze
FOLDER_EXIST =
"folder exist:".freeze
FILE_EXIST =
"file already exist:".freeze
WRONG_RESPONSE =
"Wrong command".freeze
EMPTY_NAME =
"Project name is empty".freeze
INIT_FAIL =
"Init action fail:".freeze
CREATE_FAILED =
"Fail:".freeze
CREATE_SUCCESS =
"Success:".freeze
TAB =

Text

"\s\s".freeze
DOUBLE_TAB =
"\s\s\s\s".freeze