string_color 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +3 -1
- data/lib/string_color/version.rb +1 -1
- data/lib/string_color.rb +0 -14
- data/string_color.gemspec +5 -5
- data/test/test_string_color.rb +25 -25
- metadata +13 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9ce0ef35703ec7bd49c0b415dad753601546bea7b6897bdba7da48584e8cbf28
|
4
|
+
data.tar.gz: 44f162560d09af618e2c3dee96c1449cf54649a65e6978795e7ca92811002c02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4e0f55b5983904e8c65507a78f84ea68f7d68fc1ad0b3c325f20789071143c3371aa482712f551b4b5bd85cb853b650a8665f379fa3cfcc732bc4fc1a2891fb
|
7
|
+
data.tar.gz: 100ca031de5312a817522bc7cc6f417eb5ed1e4761685a4b515666eabb9a944712b3f8b8e3c9f54f13d95be20f2bf36ca196f65b64f1401cb4da117ac28f4baa
|
data/README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/string_color.svg)](http://badge.fury.io/rb/string_color)
|
2
|
+
|
1
3
|
# StringColor
|
2
4
|
|
3
5
|
Output color text in console
|
@@ -44,7 +46,7 @@ puts "This is red text".red
|
|
44
46
|
|
45
47
|
## Contributing
|
46
48
|
|
47
|
-
1. Fork it ( https://github.com/
|
49
|
+
1. Fork it ( https://github.com/YouSysAdmin/ruby_string_color/fork )
|
48
50
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
49
51
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
50
52
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/string_color/version.rb
CHANGED
data/lib/string_color.rb
CHANGED
@@ -1,19 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require 'string_color/version'
|
3
|
-
###################################################################
|
4
|
-
# #
|
5
|
-
# Text coloring #
|
6
|
-
# #
|
7
|
-
# ██████╗ ██████╗ ███████╗ ████████╗██████╗ ██████╗ ██╗ #
|
8
|
-
# ██╔══██╗██╔═══██╗██╔════╝ ╚══██╔══╝██╔══██╗██╔═══██╗██║ #
|
9
|
-
# ██████╔╝██║ ██║███████╗ ██║ ██████╔╝██║ ██║██║ #
|
10
|
-
# ██╔═══╝ ██║ ██║╚════██║ ██║ ██╔══██╗██║ ██║██║ #
|
11
|
-
# ██║ ╚██████╔╝███████║███████╗██║ ██║ ██║╚██████╔╝██║ #
|
12
|
-
# ╚═╝ ╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ #
|
13
|
-
# #
|
14
|
-
###################################################################
|
15
|
-
|
16
|
-
|
17
3
|
class String
|
18
4
|
# Return White
|
19
5
|
def white; colorize(self, "\e[1;37m"); end
|
data/string_color.gemspec
CHANGED
@@ -6,11 +6,11 @@ require 'string_color/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "string_color"
|
8
8
|
spec.version = StringColor::VERSION
|
9
|
-
spec.authors = ["
|
10
|
-
spec.email = ["
|
9
|
+
spec.authors = ["YouSysAdmin"]
|
10
|
+
spec.email = ["work@sysalex.com"]
|
11
11
|
spec.summary = %q{Colorize strings for terminal output}
|
12
12
|
spec.description = %q{Colorize strings for terminal output}
|
13
|
-
spec.homepage = "https://github.com/
|
13
|
+
spec.homepage = "https://github.com/YouSysAdmin/ruby_string_color"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -18,6 +18,6 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_development_dependency "bundler", "~>
|
22
|
-
spec.add_development_dependency "rake", '~> 0'
|
21
|
+
spec.add_development_dependency "bundler", "~> 2.3"
|
22
|
+
spec.add_development_dependency "rake", '~> 13.0'
|
23
23
|
end
|
data/test/test_string_color.rb
CHANGED
@@ -1,26 +1,26 @@
|
|
1
|
-
require 'minitest/autorun'
|
2
|
-
require 'string_color'
|
3
|
-
|
4
|
-
class StringColorTest < Minitest::Test
|
5
|
-
def test_color_output
|
6
|
-
puts 'White color'.white
|
7
|
-
puts 'Red color'.red
|
8
|
-
puts 'Light red color'.light_red
|
9
|
-
puts 'Green color'.green
|
10
|
-
puts 'Light green color'.light_green
|
11
|
-
puts 'Yellow color'.yellow
|
12
|
-
puts 'Blue color'.blue
|
13
|
-
puts 'Light blue color'.light_blue
|
14
|
-
puts 'Purple color'.purple
|
15
|
-
puts 'Light purple color'.light_purple
|
16
|
-
puts 'Brown color'.brown
|
17
|
-
puts 'Cyan color'.cyan
|
18
|
-
puts 'Light cyan color'.light_cyan
|
19
|
-
puts 'Light gray color'.light_gray
|
20
|
-
puts 'Dark gray color'.dark_gray
|
21
|
-
end
|
22
|
-
|
23
|
-
def test_equal
|
24
|
-
assert_equal "\e[31mRed\e[0m", "Red".red
|
25
|
-
end
|
1
|
+
require 'minitest/autorun'
|
2
|
+
require 'string_color'
|
3
|
+
|
4
|
+
class StringColorTest < Minitest::Test
|
5
|
+
def test_color_output
|
6
|
+
puts 'White color'.white
|
7
|
+
puts 'Red color'.red
|
8
|
+
puts 'Light red color'.light_red
|
9
|
+
puts 'Green color'.green
|
10
|
+
puts 'Light green color'.light_green
|
11
|
+
puts 'Yellow color'.yellow
|
12
|
+
puts 'Blue color'.blue
|
13
|
+
puts 'Light blue color'.light_blue
|
14
|
+
puts 'Purple color'.purple
|
15
|
+
puts 'Light purple color'.light_purple
|
16
|
+
puts 'Brown color'.brown
|
17
|
+
puts 'Cyan color'.cyan
|
18
|
+
puts 'Light cyan color'.light_cyan
|
19
|
+
puts 'Light gray color'.light_gray
|
20
|
+
puts 'Dark gray color'.dark_gray
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_equal
|
24
|
+
assert_equal "\e[31mRed\e[0m", "Red".red
|
25
|
+
end
|
26
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: string_color
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
autorequire:
|
7
|
+
- YouSysAdmin
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,31 +16,31 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '13.0'
|
41
41
|
description: Colorize strings for terminal output
|
42
42
|
email:
|
43
|
-
-
|
43
|
+
- work@sysalex.com
|
44
44
|
executables: []
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
@@ -54,11 +54,11 @@ files:
|
|
54
54
|
- lib/string_color/version.rb
|
55
55
|
- string_color.gemspec
|
56
56
|
- test/test_string_color.rb
|
57
|
-
homepage: https://github.com/
|
57
|
+
homepage: https://github.com/YouSysAdmin/ruby_string_color
|
58
58
|
licenses:
|
59
59
|
- MIT
|
60
60
|
metadata: {}
|
61
|
-
post_install_message:
|
61
|
+
post_install_message:
|
62
62
|
rdoc_options: []
|
63
63
|
require_paths:
|
64
64
|
- lib
|
@@ -73,9 +73,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
|
-
|
77
|
-
|
78
|
-
signing_key:
|
76
|
+
rubygems_version: 3.2.33
|
77
|
+
signing_key:
|
79
78
|
specification_version: 4
|
80
79
|
summary: Colorize strings for terminal output
|
81
80
|
test_files:
|