Class: RocketApi::RocketCommands
- Inherits:
-
Object
- Object
- RocketApi::RocketCommands
- Extended by:
- Commands::Dirs, Commands::Files, Commands::GemsDir, Commands::Helper, Library::GemRepoPlainText, Library::HelperPlainText
- Defined in:
- lib/rocket_api/rocket_commands.rb
Class Method Summary collapse
Methods included from Commands::Files
class_name_camel, create_single_file, is_exist?
Methods included from Commands::Dirs
Methods included from Commands::GemsDir
gem_test!, gems_main_file!, gems_version!, gemspec!, rubocop_yml!
Methods included from Commands::Helper
bin!, gem_file!, gitignore!, rake_file!
Methods included from Library::GemRepoPlainText
gemfile_text, gitignore_text, plain_gem_test_version_text, plain_gemspec_text, plain_rubocop_yml_text, plain_version_text
Methods included from Library::HelperPlainText
Class Method Details
.init_gem_dir(**_options) ⇒ Object
…
20 21 22 23 24 25 26 27 |
# File 'lib/rocket_api/rocket_commands.rb', line 20 def self.init_gem_dir(**) raise GEM_DETECTED unless Dir.glob("*.gemspec").empty? create_repo(RocketApi::GEM_PROJECTS_DIR) rescue StandardError => e raise RocketApi::CreateDirError, "#{RocketApi::CREATE_FAILED} #{e.}" end |
.init_gem_files(**options) ⇒ Object
…
32 33 34 35 36 37 38 39 40 |
# File 'lib/rocket_api/rocket_commands.rb', line 32 def self.init_gem_files(**) raise RocketApi::EMPTY_NAME if [:project_name].nil? project_name = [:project_name] RocketApi::GEM_COMMANDS.each { |command| send(command, project_name) } rescue StandardError => e raise RocketApi::InitFilesError, "#{RocketApi::INIT_FAIL} #{e.}" end |