jstdutil 0.3.4 → 0.3.5
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/Changelog +4 -0
- data/VERSION +1 -1
- data/lib/jstdutil/autotest.rb +0 -1
- data/lib/jstdutil/redgreen.rb +2 -2
- data/test/redgreen_test.rb +3 -3
- metadata +3 -3
data/Changelog
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.5
|
data/lib/jstdutil/autotest.rb
CHANGED
data/lib/jstdutil/redgreen.rb
CHANGED
@@ -12,10 +12,10 @@ module Jstdutil
|
|
12
12
|
# Not included as a gem dependency since it drags in Test::Unit
|
13
13
|
# and friends, which is overkill for our situation
|
14
14
|
module Color
|
15
|
-
COLORS = { :clear => 0, :red =>
|
15
|
+
COLORS = { :clear => 0, :bright => 1, :red => 31, :green => 32, :yellow => 33 }
|
16
16
|
|
17
17
|
def self.method_missing(color_name, *args)
|
18
|
-
color(color_name) + args.first + color(:clear)
|
18
|
+
color(:bright) + color(color_name) + args.first + color(:clear)
|
19
19
|
end
|
20
20
|
|
21
21
|
def self.color(color)
|
data/test/redgreen_test.rb
CHANGED
@@ -4,15 +4,15 @@ class RedGreenTest < Test::Unit::TestCase
|
|
4
4
|
context "adding pretty colors" do
|
5
5
|
|
6
6
|
should "wrap in green" do
|
7
|
-
assert_equal "\e[
|
7
|
+
assert_equal "\e[1m\e[32mtrees\e[0m", Jstdutil::RedGreen::Color.green("trees")
|
8
8
|
end
|
9
9
|
|
10
10
|
should "wrap in red" do
|
11
|
-
assert_equal "\e[
|
11
|
+
assert_equal "\e[1m\e[31mdress\e[0m", Jstdutil::RedGreen::Color.red("dress")
|
12
12
|
end
|
13
13
|
|
14
14
|
should "wrap in yellow" do
|
15
|
-
assert_equal "\e[
|
15
|
+
assert_equal "\e[1m\e[33mdress\e[0m", Jstdutil::RedGreen::Color.yellow("dress")
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jstdutil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 5
|
10
|
+
version: 0.3.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Christian Johansen
|