Class: Ace::B36ts::Commands::ConfigCommand
- Inherits:
-
Object
- Object
- Ace::B36ts::Commands::ConfigCommand
- Defined in:
- lib/ace/b36ts/commands/config_command.rb
Overview
Command to display current configuration
Class Method Summary collapse
-
.execute(options = {}) ⇒ Integer
Execute the config command.
Class Method Details
.execute(options = {}) ⇒ Integer
Execute the config command
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/ace/b36ts/commands/config_command.rb', line 21 def execute( = {}) config = Molecules::ConfigResolver.resolve puts "Current ace-b36ts configuration:" puts "" puts " year_zero: #{config[:year_zero]}" puts " alphabet: #{config[:alphabet]}" if [:verbose] puts "" puts "Configuration sources (in order of precedence):" puts " 1. Runtime options (passed to commands)" puts " 2. Project config: .ace/b36ts/config.yml" puts " 3. User config: ~/.ace/b36ts/config.yml" puts " 4. Gem defaults: .ace-defaults/b36ts/config.yml" puts "" puts "Year range: #{config[:year_zero]} to #{config[:year_zero] + 107}" puts "ID length: 6 characters (Base36)" puts "Time precision: ~1.85 seconds" end 0 rescue => e warn "Error displaying config: #{e.}" warn e.backtrace.first(5).join("\n") if Ace::B36ts.debug? raise end |