Module: Belt::CLI::AppDetection
- Included in:
- EnvironmentCommand, FrontendCommand, FrontendDeployCommand, FrontendSetupCommand, GenerateCommand, SetupCommand, TablesCommand
- Defined in:
- lib/belt/cli/app_detection.rb
Instance Method Summary collapse
Instance Method Details
#detect_app_name ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/belt/cli/app_detection.rb', line 6 def detect_app_name routes_file = 'infrastructure/routes.tf.rb' if File.exist?(routes_file) match = File.read(routes_file).match(/namespace :(\w+)/) return match[1] if match end File.basename(Dir.pwd) end |