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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67b46341612448addb41c0766a10c5fba7b7cfdaace2c724e73c0bbba21b79c7
4
- data.tar.gz: 2433e44b60a0620fbc186085490eaa4a8d8d26b86405462c157c55a7719650b9
3
+ metadata.gz: 918b40a729feb55c2684d4de01064ffa9b107e7ee7dab10b49d1478521a7513e
4
+ data.tar.gz: 69664ed3d49efe9f91568d7f00f56c9230391004c04dc457cda3374014f37167
5
5
  SHA512:
6
- metadata.gz: b6d1e13886fbe4d760e46d44dfbc2c729abfc5564ff6b926ef4edce11f9a94e7c99566319650a35e5e452ea037ee12e29a32ca054c11e55f6a899c6c86179756
7
- data.tar.gz: fe7934b8ec59c47e0915bf8f772d319e24c5ae7a286eaa66f9ef6c5a844d90f7e067761a85072663da2b07e78170e22cef71cede1fff13c4b1548e1ed41935af
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.parent_name.downcase
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 ",
@@ -1,3 +1,3 @@
1
1
  module ConsoleColor
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
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.5
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: 2020-04-20 00:00:00.000000000 Z
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: []