colorize 1.0.2 → 1.0.5

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: 5fd14fe9398abe190f9220d78856881233442eebb449e17ef360d37071b27d02
4
- data.tar.gz: c347bd5839c004ca73e57cc1af16bf9b54923d0f4676a06e89cf56d149fa3bbd
3
+ metadata.gz: 96a8cb83d923d510e6c2eb252edf612ccf052e6e4f0a1c3e2a7acfd90323dc40
4
+ data.tar.gz: 9ed2a4cb4e82a83c726cd63173cda755c6dbff39329e28e33c0ffdedc304eaa5
5
5
  SHA512:
6
- metadata.gz: 2cd8c7d986dd434080bdf1c9ab14249f8f96f85a4a66ed1f84b241232cf2e4373576b04de434b3ae500d37a110be42320c8f4b1dc74bb273c851d816cb73cb52
7
- data.tar.gz: d35c48011f472e3f214019024c95b9173db56a8928fa182de24167c138000ae08364fdcdf284ccc5dc80e2f450b5d3cf782c24ccc10d6b3ac33b01631776c8a2
6
+ metadata.gz: 61c0f448e3cf1651cc707b5d0691e329743d8c1473458100ce466bc2f98f13c2a1bd511d91836606c7dcc4bd3321b068947fd965a3774c65bb38d1002ceed15e
7
+ data.tar.gz: bbc9cc5151b2b6e21f24300a5a08c45068e6cfa1018b2d6865665b9ce509db25823341b758c61002d2d1e8692fbda3d3fd4365ea1a72326b873a227495ba4741
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.5 / 2023-06-22
4
+ - (backwards compatibility) purple -> magenta
5
+
6
+ ## 1.0.3 / 2023-06-21
7
+ - fix ? ommit
8
+
3
9
  ## 1.0.2 / 2023-06-21
4
10
  - check if color exists when extending class
5
11
 
@@ -3,23 +3,23 @@
3
3
  module Colorize
4
4
  module ClassMethods
5
5
  @@color_codes ||= {
6
- black: 30,
7
- red: 31,
8
- green: 32,
9
- yellow: 33,
10
- blue: 34,
11
- purple: 35,
12
- cyan: 36,
13
- white: 37,
14
- default: 39,
15
- light_black: 90,
16
- light_red: 91,
17
- light_green: 92,
18
- light_yellow: 93,
19
- light_blue: 94,
20
- light_purple: 95,
21
- light_cyan: 96,
22
- light_white: 97
6
+ black: 30,
7
+ red: 31,
8
+ green: 32,
9
+ yellow: 33,
10
+ blue: 34,
11
+ magenta: 35,
12
+ cyan: 36,
13
+ white: 37,
14
+ default: 39,
15
+ light_black: 90,
16
+ light_red: 91,
17
+ light_green: 92,
18
+ light_yellow: 93,
19
+ light_blue: 94,
20
+ light_magenta: 95,
21
+ light_cyan: 96,
22
+ light_white: 97
23
23
  }
24
24
 
25
25
  @@mode_codes ||= {
@@ -118,7 +118,7 @@ module Colorize
118
118
  # Scan for colorized string
119
119
  #
120
120
  def scan_for_colors
121
- scan(/\001?\033\[([0-9;]+)m\002?(.+?)\001?\033\[0m\002?|([^\001?\033]+)/m).map do |match|
121
+ scan(/\001?\033\[([0-9;]+)m\002?(.+?)\001?\033\[0m\002?|([^\001\033]+)/m).map do |match|
122
122
  split_colors(match)
123
123
  end
124
124
  end
@@ -4,5 +4,5 @@
4
4
  # Gem version
5
5
  #
6
6
  module Colorize
7
- VERSION = '1.0.2'
7
+ VERSION = '1.0.5'
8
8
  end
@@ -21,7 +21,7 @@ class TestColorize < Minitest::Test
21
21
  end
22
22
 
23
23
  def test_blue_hash
24
- assert_equal "\001\033[0;34;49m\002This is also blue\001\033[0m\002", 'This is also blue'.colorize(:color => :blue)
24
+ assert_equal "\001\033[0;34;49m\002This is also blue?\001\033[0m\002", 'This is also blue?'.colorize(:color => :blue)
25
25
  end
26
26
 
27
27
  def test_light_blue_symbol
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: colorize
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michał Kalbarczyk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-21 00:00:00.000000000 Z
11
+ date: 2023-06-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Extends String class or add a ColorizedString with methods to set text
14
14
  color, background color and text effects.