rcurses 3.5.1 → 3.6

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
  SHA256:
3
- metadata.gz: 8934ab816af30dae1102a75afcb592b042939cb7d8d779a8909f76a46cb966ce
4
- data.tar.gz: 588f61b7a6c19b080622f7474c97b106c8eabb035f1d16829232d1a5d5470abd
3
+ metadata.gz: bb34e80e138fc392c1e3afe3cf1310432786c1450410dae5cd427921e5922545
4
+ data.tar.gz: 052200eff4543ef3cab4e41ac1bf9dbdb3bfc4bb30b57eb65d1f946f723a93e2
5
5
  SHA512:
6
- metadata.gz: 35db0c89adafcd194083392ea141b6ea59a0c1e5ead1bd54fb1a74ec56c2e5ef278fb7da69d1b7fc5bd7d1f51b20445cb35227d1518d6dd8fae93ee097f73fb8
7
- data.tar.gz: 9ba55c21ecde3dc2118f95e3f45429592774f2c05ed48475db6800df0c01f745629e8a75a8b67dcf69463dfbfc9e9d5df7449820ea9410b109c9b16cd8b6d12f
6
+ metadata.gz: 3d42c393098673e0bba719d182c7ebc58e781abf52e72b743263de2f6e7255fdbf5579a82f75e9f0d689d3b721b2606b2c2617ad5a8f48e17795abc1d87acad8
7
+ data.tar.gz: 01f0f00498a92374dfd1083450daadd5b7298e7e68dcf2bc498ed87cb85d5aeed86166c7fa3e6843edc21a9b8d983e8ba5b3bbfae938e4f410e26628b05a3984
data/lib/rcurses.rb CHANGED
@@ -5,7 +5,7 @@
5
5
  # Web_site: http://isene.com/
6
6
  # Github: https://github.com/isene/rcurses
7
7
  # License: Public domain
8
- # Version: 3.5: Added method 'clear' to pane class
8
+ # Version: 3.6: Better clean_ansi
9
9
 
10
10
  require 'io/console' # Basic gem for rcurses
11
11
  require 'io/wait' # stdin handling
@@ -35,13 +35,8 @@ class String
35
35
  end
36
36
 
37
37
  def clean_ansi
38
- # Remove surrounding \e[0m if the string is otherwise unstyled
39
- stripped = self.gsub(/\A\e\[0m/, '').gsub(/\e\[0m\z/, '')
40
- if stripped.pure == stripped
41
- stripped
42
- else
43
- self
44
- end
38
+ # Remove a leading and trailing reset code if present, fixing extra \e[0m introduced by some commands
39
+ self.gsub(/\A\e\[0m/, '').gsub(/\e\[0m\z/, '')
45
40
  end
46
41
 
47
42
  def pure
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcurses
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.1
4
+ version: '3.6'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-11 00:00:00.000000000 Z
11
+ date: 2025-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clipboard
@@ -29,8 +29,7 @@ description: 'Create curses applications for the terminal easier than ever. Crea
29
29
  up text (in panes or anywhere in the terminal) in bold, italic, underline, reverse
30
30
  color, blink and in any 256 terminal colors for foreground and background. Use a
31
31
  simple editor to let users edit text in panes. Left, right or center align text
32
- in panes. Cursor movement around the terminal. New in 3.5.1: Added method ''clear''
33
- to pane class.'
32
+ in panes. Cursor movement around the terminal. New in 3.6: Better clean_ansi.'
34
33
  email: g@isene.com
35
34
  executables: []
36
35
  extensions: []