2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/jefferies_tube/console.rb', line 2
def self.prompt_base
rails_env = JefferiesTube.configuration.environment
if rails_env
color = "\e[0m" current_app = JefferiesTube.configuration.prompt_name
if rails_env == "development"
elsif rails_env == "dev"
color = "\e[0;37m\e[1;44m" elsif ["test", "qa", "staging"].include? rails_env
color = "\e[0;37m\e[1;43m" elsif rails_env == "production"
color = "\e[0;37m\e[1;41m" end
base = "#{color}#{current_app}(#{rails_env})\e[0m"
return "#{base}"
else
return "#{current_app}"
end
end
|