puts_color 0.1.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/puts_color CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "puts_color"
4
+ include PutsColor
4
5
 
5
6
  puts_red "It"
6
7
  puts_green "is"
data/lib/puts_color.rb CHANGED
@@ -1,43 +1,47 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- def puts_red(*strings)
4
- strings.each do |string|
5
- puts "\033[0;31m" + string + "\033[0m"
3
+ module PutsColor
4
+
5
+ def puts_red(*strings)
6
+ strings.each do |string|
7
+ puts "\033[0;31m" + string + "\033[0m"
8
+ end
6
9
  end
7
- end
8
10
 
9
- def puts_green(*strings)
10
- strings.each do |string|
11
- puts "\033[0;32m" + string + "\033[0m"
11
+ def puts_green(*strings)
12
+ strings.each do |string|
13
+ puts "\033[0;32m" + string + "\033[0m"
14
+ end
12
15
  end
13
- end
14
16
 
15
- def puts_yellow(*strings)
16
- strings.each do |string|
17
- puts "\033[0;33m" + string + "\033[0m"
17
+ def puts_yellow(*strings)
18
+ strings.each do |string|
19
+ puts "\033[0;33m" + string + "\033[0m"
20
+ end
18
21
  end
19
- end
20
22
 
21
- def puts_blue(*strings)
22
- strings.each do |string|
23
- puts "\033[0;34m" + string + "\033[0m"
23
+ def puts_blue(*strings)
24
+ strings.each do |string|
25
+ puts "\033[0;34m" + string + "\033[0m"
26
+ end
24
27
  end
25
- end
26
28
 
27
- def puts_purple(*strings)
28
- strings.each do |string|
29
- puts "\033[0;35m" + string + "\033[0m"
29
+ def puts_purple(*strings)
30
+ strings.each do |string|
31
+ puts "\033[0;35m" + string + "\033[0m"
32
+ end
30
33
  end
31
- end
32
34
 
33
- def puts_cyan(*strings)
34
- strings.each do |string|
35
- puts "\033[0;36m" + string + "\033[0m"
35
+ def puts_cyan(*strings)
36
+ strings.each do |string|
37
+ puts "\033[0;36m" + string + "\033[0m"
38
+ end
36
39
  end
37
- end
38
40
 
39
- def puts_grey(*strings)
40
- strings.each do |string|
41
- puts "\033[0;37m" + string + "\033[0m"
41
+ def puts_grey(*strings)
42
+ strings.each do |string|
43
+ puts "\033[0;37m" + string + "\033[0m"
44
+ end
42
45
  end
46
+
43
47
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "test/unit"
4
4
  require "puts_color"
5
+ include PutsColor
5
6
 
6
7
  class TestPutsColor < Test::Unit::TestCase
7
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puts_color
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-28 00:00:00.000000000 Z
12
+ date: 2013-12-15 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! 'The productive gem to put colorful string in Linux '
15
15
  email: tobeg3oogle@gmail.com