ansi 1.6.0 → 1.6.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f64bee2019769713b2ac4762b94be9f6c2346eb4ae4baa0b0645e7a2f2371286
4
- data.tar.gz: 8fdba321ec78907d1109046af0656ee9c3a0c2342f5aaff7c3611ba3ea4d2976
3
+ metadata.gz: 4a6496d2daa294d5dbb0a2d8d6f0d4f6ccd48138d5f94028b752352318a49223
4
+ data.tar.gz: a521c650775d506060b45d5dce7222f397563f243a33d283e2c8badccb77bec0
5
5
  SHA512:
6
- metadata.gz: cb67809ddcbb4ddc3e527081a4c65ab4445c116d7eb17c0da6a31837d4cfc943c123724dd63e18ecf7812a43f5bfae6292899da2b8b2a1a6f77c70e1d336d0f8
7
- data.tar.gz: da85dad4be00c385f5c019b61ea1ae358ef0208bb5c7c9d17713e64e710f72098fe7798b1e04e76c9e2030c440a7558202510a382ec3aa72a2d9f4c9d9911cb5
6
+ metadata.gz: 6e49732e6828f3d2ee511c62ff3bec628acdc10626cf18fa4dd5b88f935ff14985937faca2e646d463cc13e98e5db90079758ae59088e10ff06776cfda0439a1
7
+ data.tar.gz: 4db6103bde45ff0556a917cc851ec1c4dc463d5031813d05dcbf4855f72e7212b2ab6eb0542b360f0ec81e40885f321f00b5a25f5cef868c1b70b63cd9fb5945
data/HISTORY.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # RELEASE HISTORY
2
2
 
3
+ ## 1.6.1 | 2026-11-20
4
+
5
+ Fixes loading on Ruby 4.0, color on Windows, and two wrong codes.
6
+
7
+ Changes:
8
+
9
+ * Stop asking for the win32console gem on Windows. Windows hasn't needed
10
+ it since Ruby 2.0, but without it ANSI printed a warning and turned
11
+ color off. (Darunada, #35; reported in #36)
12
+ * Correct the codes for `inverse_off` and `positive`, now 27, and for
13
+ `conceal_off`, `show` and `reveal`, now 28. They were 26 and 27, so
14
+ `inverse_off` did nothing and `reveal` turned off inverse instead.
15
+ (hurricup, #38)
16
+ * Depend on the `logger` gem. `require 'ansi'` loads `ANSI::Logger`, which
17
+ needs Ruby's `logger` library, and Ruby 4.0 no longer ships that as a
18
+ default gem. Under Bundler on Ruby 4.0, `require 'ansi'` failed with
19
+ "cannot load such file -- logger".
20
+ * Test on Ruby 4.0.
21
+ * Fix a typo in a comment. (eduardoj, #41)
22
+
3
23
  ## 1.6.0 | 2026-03-30
4
24
 
5
25
  Maintenance release. Modernized project tooling and cleaned up documentation.
data/NOTICE.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  ## ANSI
4
4
 
5
- Copyright © 2009 [Rubyworks](http://rubyworks.github.com) ·
5
+ Copyright © 2009 [Rubyworks](http://rubyworks.github.io) ·
6
6
  License [BSD-2-Clause](http://spdx.org/licenses/BSD-2-Clause) ·
7
- Website http://rubyworks.github.com/ansi
7
+ Website http://rubyworks.github.io/ansi
8
8
 
9
9
  Copyright 2009 Rubyworks.
10
10
 
data/lib/ansi/bbcode.rb CHANGED
@@ -84,7 +84,7 @@ module ANSI
84
84
 
85
85
  # ---------------------------
86
86
 
87
- # Returns the ANSI sequence for given color, if existant
87
+ # Returns the ANSI sequence for given color, if existent
88
88
  def BBCode.ansi(colorname)
89
89
  colorname.strip!
90
90
  return ANSINAME2CODE[ colorname.downcase ]
data/lib/ansi/chart.rb CHANGED
@@ -48,11 +48,11 @@ module ANSI
48
48
  :fraktur_off => 23,
49
49
  :underline_off => 24,
50
50
  :blink_off => 25,
51
- :inverse_off => 26,
52
- :positive => 26,
53
- :conceal_off => 27,
54
- :show => 27,
55
- :reveal => 27,
51
+ :inverse_off => 27,
52
+ :positive => 27,
53
+ :conceal_off => 28,
54
+ :show => 28,
55
+ :reveal => 28,
56
56
  :crossed_off => 29,
57
57
  :crossed_out_off => 29,
58
58
 
data/lib/ansi/code.rb CHANGED
@@ -6,15 +6,6 @@ module ANSI
6
6
  # NOTE: This has no effect on methods that return ANSI codes.
7
7
  $ansi = true
8
8
 
9
- if RUBY_PLATFORM =~ /(win32|w32)/
10
- begin
11
- require 'Win32/Console/ANSI'
12
- rescue LoadError
13
- warn "ansi: 'gem install win32console' to use color on Windows"
14
- $ansi = false
15
- end
16
- end
17
-
18
9
  require 'ansi/constants'
19
10
 
20
11
  # TODO: up, down, right, left, etc could have yielding methods too?
data/lib/ansi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ANSI
2
- VERSION = '1.6.0'
2
+ VERSION = '1.6.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ansi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Sawyer
@@ -10,6 +10,20 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 1980-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: logger
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rake
15
29
  requirement: !ruby/object:Gem::Requirement