Class: CLIConstants
Class Method Summary
collapse
Methods inherited from CLIOptions
ascii_art, cli_descriptions, command_name_methods, gem_version, help_flags, skip_initialize_options, skip_model_controller_options
Class Method Details
.CLI_DOCUMENTATION_STRING ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/constants/cli_constants.rb', line 11
def CLI_DOCUMENTATION_STRING
descriptions = command_name_methods.map { |key, val| "=> #{key.to_s} - " + cli_descriptions[val] }
"#{ascii_art}
Rails on Rails Version: #{gem_version}
Rails on Rails: Command Line Interface to make your life easier.
=> The Rails on Rails command is 'rails_on_rails'. To blast this project into the fifth dimension.
=> Use '--help' on any of the commands listed below for more details.
List of commands:
#{descriptions.join("\n")}
"
end
|
.GEM_VERSION ⇒ Object
7
8
9
|
# File 'lib/constants/cli_constants.rb', line 7
def GEM_VERSION
gem_version
end
|
.GENERATE_MODEL_CONTROLLER_HELP_STRING ⇒ Object
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/constants/cli_constants.rb', line 34
def GENERATE_MODEL_CONTROLLER_HELP_STRING
opts = skip_model_controller_options.keys.map { |e| "\t=> #{e.to_s}" }
"This command runs the same as 'rails generate model --help'.
Use the parameters in 'rails generate model' to generate your CRUD operators.
AVR only Option:
--v2=true => Add GlobalController version v2
Optional flag options are:
--no-model=true => Do not generate a model in this command
--skip=<options-separated-by-a-comma-for-multiple-options>
Skip Options:
#{opts.join("\n")}
Use resources to declare the routes you want defined. After the generation is complete.
"
end
|
.GENERATE_TEST_RSPEC_HELP_STRING ⇒ Object
55
56
57
|
# File 'lib/constants/cli_constants.rb', line 55
def GENERATE_TEST_RSPEC_HELP_STRING
"This command has one paramter which is the controller name in Upper Camel Case or Snake Case"
end
|
.GENERATE_TEST_SEEDER_HELP_STRING ⇒ Object
51
52
53
|
# File 'lib/constants/cli_constants.rb', line 51
def GENERATE_TEST_SEEDER_HELP_STRING
"This command has one paramter which is the model name singularized in Upper Camel Case or Snake Case"
end
|
.INITIALIZE_HELP_STRING ⇒ Object
25
26
27
28
29
30
31
32
|
# File 'lib/constants/cli_constants.rb', line 25
def INITIALIZE_HELP_STRING
opts = skip_initialize_options.keys.map { |e| "\t=> #{e.to_s}" }
"This command has no parameters but has optional commands. Optional flag options are:
--skip=<options-separated-by-a-comma-for-multiple-options>
Skip Options:
#{opts.join("\n")}
"
end
|