Sha256: 08ba57352072c11c6679cd5098a09b4a964bc075aeef0bfc2bc76fac5a285817
Contents?: true
Size: 622 Bytes
Versions: 3
Compression:
Stored size: 622 Bytes
Contents
include SaferRailsConsole::Colors app_name = ::Rails.application.class.parent.to_s.underscore.dasherize env_name = SaferRailsConsole.environment_name status = ::Rails.application.sandbox ? 'sandboxed' : 'unsandboxed' color = SaferRailsConsole.prompt_color prompt = "#{app_name}(#{env_name})(#{status}):%03n:%i" IRB.conf[:PROMPT][:RAILS_ENV] = { PROMPT_I: color_text("#{prompt}> ", color), PROMPT_N: color_text("#{prompt}> ", color), PROMPT_S: color_text("#{prompt}%l ", color), PROMPT_C: color_text("#{prompt}* ", color), RETURN: color_text('=> ', color).concat("%s\n") } IRB.conf[:PROMPT_MODE] = :RAILS_ENV
Version data entries
3 entries across 3 versions & 1 rubygems