console_color 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/console_color/railtie.rb +6 -2
- data/lib/console_color/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 918b40a729feb55c2684d4de01064ffa9b107e7ee7dab10b49d1478521a7513e
|
4
|
+
data.tar.gz: 69664ed3d49efe9f91568d7f00f56c9230391004c04dc457cda3374014f37167
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35a0b0c3d3879b4b64e51a459822dc3284a837783fcda1a9587bd3c413680b317ccc391846267c6b4f798a544d0c0417e899d61abd894c1b0c9d616a808a1ade
|
7
|
+
data.tar.gz: 1f33661fa923a828a180615d69ca12111a36d57d1612caf7affbf6d9702333bcd4c075408665b56a7c80cddbc280513e430dbf6e9326ee92cc82630170556c79
|
@@ -4,11 +4,15 @@ module ConsoleColor
|
|
4
4
|
def setup(*)
|
5
5
|
super
|
6
6
|
|
7
|
-
app_name = Rails.application.class.
|
7
|
+
app_name = if Rails.application.class.respond_to?(:module_parent_name)
|
8
|
+
Rails.application.class.module_parent_name
|
9
|
+
else
|
10
|
+
Rails.application.class.parent_name
|
11
|
+
end
|
8
12
|
environment = ENV.fetch('CONSOLE_COLOR_ENV', Rails.env)
|
9
13
|
color = ConsoleColor::COLORS[environment]
|
10
14
|
|
11
|
-
prompt = "\001#{color}\002#{app_name}:#{environment}"
|
15
|
+
prompt = "\001#{color}\002#{app_name.downcase}:#{environment}"
|
12
16
|
|
13
17
|
IRB.conf[:PROMPT][:RAILS_APP] = {
|
14
18
|
PROMPT_I: "#{prompt}>\e[0m ",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: console_color
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joey Aghion
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -59,7 +59,7 @@ homepage: https://github.com/joeyAghion/console_color
|
|
59
59
|
licenses:
|
60
60
|
- MIT
|
61
61
|
metadata: {}
|
62
|
-
post_install_message:
|
62
|
+
post_install_message:
|
63
63
|
rdoc_options: []
|
64
64
|
require_paths:
|
65
65
|
- lib
|
@@ -74,9 +74,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
requirements: []
|
77
|
-
rubyforge_project:
|
77
|
+
rubyforge_project:
|
78
78
|
rubygems_version: 2.7.6
|
79
|
-
signing_key:
|
79
|
+
signing_key:
|
80
80
|
specification_version: 4
|
81
81
|
summary: Add color-coded app and environment information to the Rails console prompt.
|
82
82
|
test_files: []
|