colcolor 0.0.4 → 0.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3967e2969a53a7848538f222ce5cb6e5ab9279fc
4
- data.tar.gz: 410513740a17f7dd0d4f8f9d8e079b79448fe3da
3
+ metadata.gz: 998fbf91dba3b59630eb91d225bd1e2a0eec9c99
4
+ data.tar.gz: cb57811e78534181c806ec84460167273dad0288
5
5
  SHA512:
6
- metadata.gz: 18e71204f739c47a34b1c79040b1d5c40a8e54fb47e38f58eae22b1af018b7bfa18761543ec8127cecd930f1ad486a1cadce05a79b0c7dfa159bc4eac5498142
7
- data.tar.gz: 41fe752d50804abd4e462b9714518004c257fe80cdee42dcc37977661627e2ab5daf2a06e43ec88db2579eac257a5daded240ea39550fde32b431d44782f8096
6
+ metadata.gz: e5571f9959ad2d2e0bc897eef6c938f30a25b523c0f0db703e133abef963185bf8758d6336493683f2af60e1070110ce32f06442df57a9130dad70b72569b511
7
+ data.tar.gz: c82faa329536e755cab5700fcb75d20326fd60603eb8b376e8149304dcf567c7c683f738d84a8f1d45f50ae76bc414efc8617ed76e532db06b9853a0a3083a64
data/README.md CHANGED
@@ -99,7 +99,7 @@ Output:
99
99
  If you want to apply colors periodically to a text, set `cyclic` option to true.
100
100
 
101
101
  ```ruby
102
- "H E L L O W O R L D".colco(:red, :green, :yellow, cycle:true)
102
+ "H E L L O W O R L D".colco(:red, :green, :yellow, cyclic:true)
103
103
 
104
104
  ```
105
105
 
@@ -10,8 +10,8 @@ module Colcolor
10
10
  BGCOLORS = TAGMAP(COLORSET, 40..47)
11
11
  EXTRA = TAGMAP(%i(clear bold underline blink reverse), [0,1,4,5,7])
12
12
 
13
- def colco(*colors, regexp:/\S+/, cycle:false)
14
- cs = cycle ? colors.cycle : colors.to_enum
13
+ def colco(*colors, regexp:/\S+/, cyclic:false)
14
+ cs = cyclic ? colors.cycle : colors.to_enum
15
15
  self.gsub(regexp) do
16
16
  cname = cs.next rescue nil
17
17
  color = build_color_tag(cname)
@@ -1,3 +1,3 @@
1
1
  module Colcolor
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -71,12 +71,12 @@ describe Colcolor do
71
71
  end
72
72
  end
73
73
 
74
- context "with cycle option" do
74
+ context "with cyclic option" do
75
75
  it "applys colors cyclic to the text" do
76
76
  str = "a b c d e f"
77
77
  expect = "\e[31ma\e[0m \e[32mb\e[0m \e[33mc\e[0m \e[31md\e[0m \e[32me\e[0m \e[33mf\e[0m"
78
78
  color_set = [:red, :green, :yellow]
79
- expect(str.colco(*color_set, cycle:true)).to eq expect
79
+ expect(str.colco(*color_set, cyclic:true)).to eq expect
80
80
  end
81
81
  end
82
82
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: colcolor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - kyoendo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-23 00:00:00.000000000 Z
11
+ date: 2014-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler