colorize 1.0.0.pre.beta.3 → 1.0.1

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: e6cf67e45a9d7d3a06cab45d8588ebc1bcdbcb25f60700bc8b891deaa47aa4ee
4
- data.tar.gz: bbee1cd60a0ff68de06a0febcb50cf6655304ed81354dcbde88538f7ea15266f
3
+ metadata.gz: 2440a0c4dffad361b76dc139b086a986c0cb4eb04c510e37f39cb33f86aa6448
4
+ data.tar.gz: c5c8b4df8f4a4fe62b6205205dad479e40e61d6134d38ff156dcd48cdadf7402
5
5
  SHA512:
6
- metadata.gz: 1cd49dd178b7c9fa10f1b1d1ce0b417ccc26ca19474883900ccf8a454c23f7d8f421799c05d37f6e88909a6dd7fedfe819788c9cf26173464d0a30c0cd051727
7
- data.tar.gz: cc199a5456e868009843681eb7cd0c4012a14e654fa2d8cc6701cf2e7ac8e0bc9de96ba12d0a51d610bc903d9399c18ba50b9985930df2de910d6da60b1c4f13
6
+ metadata.gz: 498e222fe9f170791b493d6367c613f7c7eeff98b14ca5726e7741fe783af2433683d79115bf6b74ff0ec956fbb2cf4ca900976dd406f451da795ebc0f778340
7
+ data.tar.gz: d6b023053c3130ecab27e494c54fbd2da2b8f0756c26931a03b4c74d6f68285bbd61281e38c95c72467126835f4a0382e689705e1dcca94615f7d8450c1e6b07
data/CHANGELOG.md CHANGED
@@ -1,107 +1,76 @@
1
1
  # Changelog
2
2
 
3
- ## [1.0.0-beta.3](https://github.com/fazibear/colorize/compare/v1.0.0-beta.2...v1.0.0-beta.3) (2023-03-23)
4
-
5
-
6
- ### Miscellaneous Chores
7
-
8
- * release 1.0.0-beta.2 ([45c3dd6](https://github.com/fazibear/colorize/commit/45c3dd6f503d5e5588f3f7598019dc7a53adac5e))
9
- * release 1.0.0-beta.3 ([2eb8f9d](https://github.com/fazibear/colorize/commit/2eb8f9d8c486722b66acdc525653cdef3cb9b163))
10
-
11
- ## [1.0.0-beta.2](https://github.com/fazibear/colorize/compare/v1.0.0-beta.2...v1.0.0-beta.2) (2023-03-23)
12
-
13
-
14
- ### Miscellaneous Chores
15
-
16
- * release 1.0.0-beta.2 ([45c3dd6](https://github.com/fazibear/colorize/commit/45c3dd6f503d5e5588f3f7598019dc7a53adac5e))
17
-
18
- ## [1.0.0-beta.2](https://github.com/fazibear/colorize/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2023-03-23)
19
-
20
-
21
- ### Miscellaneous Chores
22
-
23
- * release 1.0.0-beta.2 ([29ed0c5](https://github.com/fazibear/colorize/commit/29ed0c5ae97a9a66e4af7e376e2b2a937eaf024d))
24
-
25
- ## [1.0.0-beta.1](https://github.com/fazibear/colorize/compare/v0.8.1...v1.0.0-beta.1) (2023-03-23)
26
-
27
-
28
- ### Miscellaneous Chores
29
-
30
- * release 1.0.0-beta.1 ([6303e25](https://github.com/fazibear/colorize/commit/6303e257690cfa7b3efbf11993a4cd75418b5d5e))
31
- * release 1.0.0.beta ([fbb2cb2](https://github.com/fazibear/colorize/commit/fbb2cb25ff17e9f46ca7fc9b8173414b0f8df7db))
32
- * release 1.0.0.beta ([f8cb1e4](https://github.com/fazibear/colorize/commit/f8cb1e4033150143918f45663b74c5a574ca372b))
33
-
34
- == 1.0.0 / 2023-03-23
35
- * add more modes
36
- * add aliases
37
- * grey and gray default aliases
38
- * update dependencies
39
- * add non-visible text delimiters
40
- * add prevent_color switch
41
- * cleanup and refactor
42
-
43
- == 0.8.1 / 2016-06-29
44
- * fix gemspec bug
45
-
46
- == 0.8.0 / 2016-06-27
47
- * add ColorizedString class
48
- * update README file
49
- * add rubocop.yml and follow style
50
- * add italic mode
51
- * remove interpreter warrnings
52
-
53
- == 0.7.7 / 2015-04-19
54
- * update gems
55
-
56
- == 0.7.6 / 2015-04-18
57
- * fix bugs
58
-
59
- == 0.7.5 / 2014-12-11
60
- * big code refactoring
61
- * disable_colorization feature added
62
-
63
- == 0.7.4 / 2014-12-10
64
- * code cleanups
65
-
66
- == 0.7.3 / 2014-05-19
67
- * fix new line maching
68
-
69
- == 0.7.2 / 2014-04-08
70
- * tests cleanups
71
- * gem release date fixed
72
-
73
- == 0.7.1 / 2014-04-02
74
- * handling wrong color values
75
-
76
- == 0.7.0 / 2014-03-12
77
- * refactored to use regexp pattern matching
78
- * works with frozen strings
79
- * works with concatenated string
80
-
81
- == 0.6.0 / 2013-09-25
82
- * code cleanups
83
- * bold mode fixed
84
- * STDOUT.isatty condition removed
85
- * doc updated
86
- * jeweler tasks removed
87
- * Rakefile updated
88
-
89
- == 0.5.8 / 2009-12-02
90
- * code cleanups
91
- * removed 'ruby -w' warnings
92
-
93
- == 0.5.7 / 2009-11-24
94
- * moved to github/gemcutter
95
- * 1.9 compatible
96
-
97
- == 0.5.6 / 2007-08-27
98
- * rdocs Allison template
99
- * cleanups
100
-
101
- == 0.5.5 / 2007-08-11
102
- * added effects methods
103
- * README files
104
- * new rake file
105
-
106
- == 0.5.0 / 2007-04-22
107
- * initial rewritten version
3
+ ## 1.0.0 / 2023-03-23
4
+ - add more modes
5
+ - add aliases
6
+ - grey and gray default aliases
7
+ - update dependencies
8
+ - add non-visible text delimiters
9
+ - add prevent_color switch
10
+ - cleanup and refactor
11
+
12
+ ## 0.8.1 / 2016-06-29
13
+ - fix gemspec bug
14
+
15
+ ## 0.8.0 / 2016-06-27
16
+ - add ColorizedString class
17
+ - update README file
18
+ - add rubocop.yml and follow style
19
+ - add italic mode
20
+ - remove interpreter warrnings
21
+
22
+ ## 0.7.7 / 2015-04-19
23
+ - update gems
24
+
25
+ ## 0.7.6 / 2015-04-18
26
+ - fix bugs
27
+
28
+ ## 0.7.5 / 2014-12-11
29
+ - big code refactoring
30
+ - disable_colorization feature added
31
+
32
+ ## 0.7.4 / 2014-12-10
33
+ - code cleanups
34
+
35
+ ## 0.7.3 / 2014-05-19
36
+ - fix new line maching
37
+
38
+ ## 0.7.2 / 2014-04-08
39
+ - tests cleanups
40
+ - gem release date fixed
41
+
42
+ ## 0.7.1 / 2014-04-02
43
+ - handling wrong color values
44
+
45
+ ## 0.7.0 / 2014-03-12
46
+ - refactored to use regexp pattern matching
47
+ - works with frozen strings
48
+ - works with concatenated string
49
+
50
+ ## 0.6.0 / 2013-09-25
51
+ - code cleanups
52
+ - bold mode fixed
53
+ - STDOUT.isatty condition removed
54
+ - doc updated
55
+ - jeweler tasks removed
56
+ - Rakefile updated
57
+
58
+ ## 0.5.8 / 2009-12-02
59
+ - code cleanups
60
+ - removed 'ruby -w' warnings
61
+
62
+ ## 0.5.7 / 2009-11-24
63
+ - moved to github/gemcutter
64
+ - 1.9 compatible
65
+
66
+ ## 0.5.6 / 2007-08-27
67
+ - rdocs Allison template
68
+ - cleanups
69
+
70
+ ## 0.5.5 / 2007-08-11
71
+ - added effects methods
72
+ - README files
73
+ - new rake file
74
+
75
+ ## 0.5.0 / 2007-04-22
76
+ - initial rewritten version
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- colorize [![Gem Version](https://badge.fury.io/rb/colorize.svg)](http://badge.fury.io/rb/colorize) [![Ruby Gem](https://github.com/fazibear/colorize/actions/workflows/gem-push.yml/badge.svg)](https://github.com/fazibear/colorize/actions/workflows/gem-push.yml) [![Code Climate](https://codeclimate.com/github/fazibear/colorize/badges/gpa.svg)](https://codeclimate.com/github/fazibear/colorize) [![Test Coverage](https://codeclimate.com/github/fazibear/colorize/badges/coverage.svg)](https://codeclimate.com/github/fazibear/colorize)
1
+ colorize [![Gem Version](https://badge.fury.io/rb/colorize.svg)](http://badge.fury.io/rb/colorize) [![Ruby Gem](https://github.com/fazibear/colorize/actions/workflows/release.yml/badge.svg)](https://github.com/fazibear/colorize/actions/workflows/release.yml) [![Code Climate](https://codeclimate.com/github/fazibear/colorize/badges/gpa.svg)](https://codeclimate.com/github/fazibear/colorize) [![Test Coverage](https://codeclimate.com/github/fazibear/colorize/badges/coverage.svg)](https://codeclimate.com/github/fazibear/colorize)
2
2
  ========
3
3
 
4
4
  Ruby gem for colorizing text using ANSI escape sequences.
data/colorize.gemspec CHANGED
@@ -17,15 +17,6 @@ Gem::Specification.new do |s|
17
17
 
18
18
  s.require_paths = ['lib']
19
19
 
20
- s.add_development_dependency 'json', '~> 2.0'
21
- s.add_development_dependency 'minitest', '~> 5.0'
22
- s.add_development_dependency 'rake', '~> 13.0'
23
- s.add_development_dependency 'rubocop', '~> 1.0'
24
- s.add_development_dependency 'rubocop-github', '~> 0.20'
25
- s.add_development_dependency 'rubocop-minitest', '~> 0.29.0'
26
- s.add_development_dependency 'rubocop-performance', '~> 1.16'
27
- s.add_development_dependency 'rubocop-rake', '~> 0.6'
28
-
29
20
  s.files = [
30
21
  'LICENSE',
31
22
  'CHANGELOG.md',
@@ -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.0-beta.3'
7
+ VERSION = '1.0.1'
8
8
  end
@@ -207,4 +207,8 @@ class TestColorize < Minitest::Test
207
207
 
208
208
  String.prevent_colors false
209
209
  end
210
+
211
+ def test_colorized_string_without_readline
212
+ assert_equal "\e[0;31;49mgreen\e[0m".green, 'green'.green
213
+ end
210
214
  end
@@ -134,9 +134,7 @@ class TestColorizedString < Minitest::Test
134
134
  end
135
135
 
136
136
  def test_color_matrix_method
137
- assert_raises NoMethodError do
138
- ColorizedString.color_matrix
139
- end
137
+ assert_raises(NoMethodError) { ColorizedString.color_matrix }
140
138
  end
141
139
 
142
140
  def test_color_samples_method
@@ -211,4 +209,8 @@ class TestColorizedString < Minitest::Test
211
209
 
212
210
  ColorizedString.prevent_colors false
213
211
  end
212
+
213
+ def test_colorized_string_without_readline
214
+ assert_equal ColorizedString["\e[0;31;49mgreen\e[0m"].green, ColorizedString['green'].green
215
+ end
214
216
  end
metadata CHANGED
@@ -1,127 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: colorize
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.beta.3
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michał Kalbarczyk
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-23 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: json
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '2.0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '2.0'
27
- - !ruby/object:Gem::Dependency
28
- name: minitest
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '5.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '5.0'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '13.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '13.0'
55
- - !ruby/object:Gem::Dependency
56
- name: rubocop
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '1.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '1.0'
69
- - !ruby/object:Gem::Dependency
70
- name: rubocop-github
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '0.20'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '0.20'
83
- - !ruby/object:Gem::Dependency
84
- name: rubocop-minitest
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 0.29.0
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 0.29.0
97
- - !ruby/object:Gem::Dependency
98
- name: rubocop-performance
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '1.16'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '1.16'
111
- - !ruby/object:Gem::Dependency
112
- name: rubocop-rake
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '0.6'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '0.6'
11
+ date: 2023-06-19 00:00:00.000000000 Z
12
+ dependencies: []
125
13
  description: Extends String class or add a ColorizedString with methods to set text
126
14
  color, background color and text effects.
127
15
  email: fazibear@gmail.com
@@ -147,7 +35,7 @@ licenses:
147
35
  - GPL-2.0
148
36
  metadata:
149
37
  rubygems_mfa_required: 'true'
150
- post_install_message:
38
+ post_install_message:
151
39
  rdoc_options: []
152
40
  require_paths:
153
41
  - lib
@@ -158,12 +46,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
158
46
  version: '2.6'
159
47
  required_rubygems_version: !ruby/object:Gem::Requirement
160
48
  requirements:
161
- - - ">"
49
+ - - ">="
162
50
  - !ruby/object:Gem::Version
163
- version: 1.3.1
51
+ version: '0'
164
52
  requirements: []
165
- rubygems_version: 3.4.6
166
- signing_key:
53
+ rubygems_version: 3.4.14
54
+ signing_key:
167
55
  specification_version: 4
168
56
  summary: Ruby gem for colorizing text using ANSI escape sequences.
169
57
  test_files: []