colorize 0.7.2 → 0.7.3

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
  SHA1:
3
- metadata.gz: 08a6c1aa3ca40c8747c5fb2f38e09e1917226416
4
- data.tar.gz: faf34c7659e88abdf6eeab8d3edd2f4e7cc17cbc
3
+ metadata.gz: 1a859d7f8f8090ca83efe597653bebfba1b23663
4
+ data.tar.gz: d088577a685ef33228b8d1f113d5caadbe31c0d5
5
5
  SHA512:
6
- metadata.gz: 730baa609cc36db7c9e414a3496adbc8cccdda637a9baaf73103f72ec377ef3a99e9e550bf9ec08f88ac27926d491e62cfd9c4d4cf488984c66d76d9aa57d965
7
- data.tar.gz: b194e1444dff7a82ea0e24ade7627c215549136b8816da892a268f988af57e10f70eade5e3add0f8f730a197a50e776414ebf8740c8b2ea5287455aeba29fd48
6
+ metadata.gz: 8764f7d7590f39a5f08993fab8e972c780924405c893c6bf9915f19778d7a502bd73f34fb87ced20abe2f98de8db1bb252e3d521f8715b3c7cafbdd7cf932351
7
+ data.tar.gz: a96ab1eaa3e6d7e2f0a7ed0aaa4d11ec56476e0418784f57f85816c6b6c32d44ed267f3a68abc1743dbe11efbfb556ae90bcb7e94a18ba016ecba6a87f2a1751
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.7.23 / 2014-05-19
2
+ * fix new line maching
3
+
1
4
  == 0.7.2 / 2014-04-08
2
5
  * tests cleanups
3
6
  * gem release date fixed
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- colorize
1
+ colorize [![Gem Version](https://badge.fury.io/rb/colorize.svg)](http://badge.fury.io/rb/colorize)
2
2
  ========
3
3
 
4
4
  Ruby String class extension. Adds methods to set text color, background color and, text effects on ruby console and command line output, using ANSI escape sequences.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'colorize'
3
- s.version = '0.7.2'
3
+ s.version = '0.7.3'
4
4
 
5
5
  s.authors = ['fazibear']
6
6
  s.email = 'fazibear@gmail.com'
@@ -39,7 +39,7 @@ class String
39
39
  :hide => 8 # Hide text (foreground color would be the same as background)
40
40
  }
41
41
 
42
- REGEXP_PATTERN = /\033\[([0-9]+);([0-9]+);([0-9]+)m(.+?)\033\[0m|([^\033]+)/
42
+ REGEXP_PATTERN = /\033\[([0-9]+);([0-9]+);([0-9]+)m(.+?)\033\[0m|([^\033]+)/m
43
43
  COLOR_OFFSET = 30
44
44
  BACKGROUND_OFFSET = 40
45
45
 
@@ -80,10 +80,17 @@ class TestColorize < Test::Unit::TestCase
80
80
  end
81
81
 
82
82
  def test_concatenated_strings_uncolorize
83
- assert ('none' + 'red'.red + 'none' + 'blue'.blue + 'none').uncolorize == "nonerednonebluenone"
83
+ assert_equal ('none' + 'red'.red + 'none' + 'blue'.blue + 'none').uncolorize,
84
+ "nonerednonebluenone"
84
85
  end
85
86
 
86
87
  def test_frozen_strings
87
- assert 'This is blue text on red'.freeze.blue.on_red.blink == "\e[5;34;41mThis is blue text on red\e[0m"
88
+ assert_equal 'This is blue text on red'.freeze.blue.on_red.blink,
89
+ "\e[5;34;41mThis is blue text on red\e[0m"
90
+ end
91
+
92
+ def test_new_line
93
+ assert_equal "This is blue\ntext on red".freeze.blue.on_red.blink,
94
+ "\e[5;34;41mThis is blue\ntext on red\e[0m"
88
95
  end
89
96
  end
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: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - fazibear
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-08 00:00:00.000000000 Z
11
+ date: 2014-05-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby String class extension. Adds methods to set text color, background
14
14
  color and, text effects on ruby console and command line output, using ANSI escape