Module: Railbow
- Defined in:
- lib/railbow.rb,
lib/railbow/init.rb,
lib/railbow/logo.rb,
lib/railbow/config.rb,
lib/railbow/params.rb,
lib/railbow/railtie.rb,
lib/railbow/version.rb,
lib/railbow/git_utils.rb,
lib/railbow/text_utils.rb,
lib/railbow/demo/runner.rb,
lib/railbow/table/theme.rb,
lib/railbow/table/column.rb,
lib/railbow/demo/fixtures.rb,
lib/railbow/color_assigner.rb,
lib/railbow/name_formatter.rb,
lib/railbow/table/renderer.rb,
lib/railbow/about_formatter.rb,
lib/railbow/formatters/base.rb,
lib/railbow/notes_formatter.rb,
lib/railbow/stats_formatter.rb,
lib/railbow/demo/routes_demo.rb,
lib/railbow/demo/status_demo.rb,
lib/railbow/migration_parser.rb,
lib/railbow/routes_formatter.rb,
lib/railbow/demo/migrate_demo.rb,
lib/railbow/migration_formatter.rb,
lib/railbow/name_collision_resolver.rb,
sig/railbow.rbs
Defined Under Namespace
Modules: AboutFormatter, Config, Demo, Formatters, GitUtils, Init, MigrationFormatter, NameCollisionResolver, NameFormatter, NotesFormatter, Params, RoutesFormatter, StatsFormatter, Table, TextUtils Classes: ColorAssigner, Error, MigrationParser, Railtie
Constant Summary collapse
- LOGO_SEGMENTS =
[ ["░█▀▀█", "░█▀▀█", "▀█▀", "░█───", "░█▀▀█", "░█▀▀▀█", "░█───░█"], ["░█▄▄▀", "░█▄▄█", "░█─", "░█───", "░█▀▀▄", "░█──░█", "░█─█─░█"], ["░█─░█", "░█─░█", "▄█▄", "░█▄▄█", "░█▄▄█", "░█▄▄▄█", "─░█░█─"] ].freeze
- LOGO_COLORS =
[ "\e[38;5;196m", "\e[38;5;208m", "\e[38;5;220m", "\e[38;5;40m", "\e[38;5;33m", "\e[38;5;93m", "\e[38;5;163m" ].freeze
- RESET =
"\e[0m"- VERSION =
"0.1.0"
Class Method Summary collapse
-
.plain? ⇒ Boolean
Returns true when Railbow formatting should be disabled.
- .print_logo ⇒ Object
Class Method Details
.plain? ⇒ Boolean
Returns true when Railbow formatting should be disabled. Checks for explicit opt-out, standard conventions, CI, and LLM agents.
12 13 14 15 16 17 18 |
# File 'lib/railbow.rb', line 12 def self.plain? return true if Params.plain? return true if ENV.key?("NO_COLOR") return true if ENV.key?("CLAUDECODE") return true if ENV.key?("CI") !$stdout.tty? end |
.print_logo ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/railbow/logo.rb', line 17 def self.print_logo LOGO_SEGMENTS.each do |segments| print " " segments.each_with_index do |seg, i| print "#{LOGO_COLORS[i]}#{seg}#{RESET}" print " " unless i == segments.length - 1 end puts end end |