colorize_cn 0.2.1
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/lib/colorize_cn.rb +8 -0
- data/test/test_colorize_cn.rb +16 -0
- metadata +49 -0
data/lib/colorize_cn.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require "test/unit"
|
2
|
+
require 'colorize_cn.rb'
|
3
|
+
require 'colorize'
|
4
|
+
|
5
|
+
|
6
|
+
class StringTest < Test::Unit::TestCase
|
7
|
+
def test_blue_symbol
|
8
|
+
assert_equal 'This is blue'.colorize_cn("blue"),
|
9
|
+
"\e[0;34;49mThis is blue\e[0m"
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_incorrect_symbol
|
13
|
+
assert_equal 'This is incorrect color'.colorize_cn("bold"),
|
14
|
+
"\e[0;39;49mThis is incorrect color\e[0m"
|
15
|
+
end
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: colorize_cn
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Antonio Bethune
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-01-05 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: A simple hangman letter checker
|
15
|
+
email: abethune96@gmail.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/colorize_cn.rb
|
21
|
+
- test/test_colorize_cn.rb
|
22
|
+
homepage:
|
23
|
+
licenses:
|
24
|
+
- MIT
|
25
|
+
post_install_message:
|
26
|
+
rdoc_options: []
|
27
|
+
require_paths:
|
28
|
+
- lib
|
29
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ! '>='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
|
+
none: false
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
requirements: []
|
42
|
+
rubyforge_project:
|
43
|
+
rubygems_version: 1.8.24
|
44
|
+
signing_key:
|
45
|
+
specification_version: 3
|
46
|
+
summary: Checks to see if the letter given occur in the word to be guessed and returns
|
47
|
+
the indexes of the letter if it does
|
48
|
+
test_files: []
|
49
|
+
has_rdoc:
|