terminal 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef903d157312bb149fac82a78546b0d92f7280a2
4
- data.tar.gz: cfd561ae29ce4c0157cb8daf2226ca3f9c1e515f
3
+ metadata.gz: 05e177dc3351cb4df53995d41fb554fe423c1b03
4
+ data.tar.gz: cdfbde91064c71a25488c4bb512025e000414e7e
5
5
  SHA512:
6
- metadata.gz: fafa7d5e0e0072b81e2f90ca3b91c300d11b7f71a51dfc62d2b22d3abbae2a5d8c322d8d5a2a181693d2e5ffff98acf3f8507ab931711ea9c043f311eab8a823
7
- data.tar.gz: 85727be39d6e58c6dac422f02a567644eb337bdbeb4cec280a99a42634421daa8ec9a6e573b79b913d2f4cad868088b8f4c11c997d40e3d633cc87726aec21c3
6
+ metadata.gz: c75ce5827937293b621ac725311c4866a75335526a735accdfd4be74dbd84c4b34582ba9da7254734d079797fc99cc079935cc12a36885daef5a62dae05f8200
7
+ data.tar.gz: 66755452f8ccd918e4053fb9be004e9ca24f50e627838881b9e4c7df100cf677fbaaebf01972a51de5a44d4406843da760d6a3a653dfc912c25b00176572fed6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- terminal (0.3.3)
4
+ terminal (0.3.4)
5
5
  escape_utils (~> 1.0)
6
6
  gemoji (~> 2.0)
7
7
 
@@ -13,6 +13,7 @@
13
13
 
14
14
  .term-fg1 { } /* don't bold beccause it looks weird */
15
15
  .term-fg4 { text-decoration: underline; } /* underline */
16
+ .term-fg9 { text-decoration: line-through; } /* crossed-out */
16
17
 
17
18
  .term-fg30 { color: #666; } /* black (but we can't use black, so a diff color) */
18
19
  .term-fg31 { color: #e10c02; } /* red */
@@ -138,6 +138,18 @@ module Terminal
138
138
  elsif c_integer == 10
139
139
  # no-op
140
140
 
141
+ # Turn off bold
142
+ elsif c_integer == 21
143
+ @other_colors.delete("term-fg1")
144
+
145
+ # Turn off underline
146
+ elsif c_integer == 24
147
+ @other_colors.delete("term-fg4")
148
+
149
+ # Turn off crossed-out
150
+ elsif c_integer == 29
151
+ @other_colors.delete("term-fg9")
152
+
141
153
  # Reset foreground color only
142
154
  elsif c_integer == 39
143
155
  @fg_color = nil
@@ -1,3 +1,3 @@
1
1
  module Terminal
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
@@ -225,6 +225,24 @@ describe Terminal::Renderer do
225
225
 
226
226
  expect(render(raw)).to eql("<span class='term-fg34 term-fg4 term-fg1'>good news</span>\n&nbsp;\neveryone")
227
227
  end
228
+
229
+ it "ends underlining with \\e[24" do
230
+ raw = "\e[4mbegin\e[24m\r\nend"
231
+
232
+ expect(render(raw)).to eql("<span class='term-fg4'>begin</span>\nend")
233
+ end
234
+
235
+ it "ends bold with \\e[21" do
236
+ raw = "\e[1mbegin\e[21m\r\nend"
237
+
238
+ expect(render(raw)).to eql("<span class='term-fg1'>begin</span>\nend")
239
+ end
240
+
241
+ it "ends crossed out with \\e[29" do
242
+ raw = "\e[9mbegin\e[29m\r\nend"
243
+
244
+ expect(render(raw)).to eql("<span class='term-fg9'>begin</span>\nend")
245
+ end
228
246
  end
229
247
 
230
248
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terminal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Pitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-30 00:00:00.000000000 Z
11
+ date: 2014-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: escape_utils