io-console 0.8.1-java → 0.8.2-java
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 +4 -4
- data/lib/ffi/io/console/version.rb +1 -1
- data/lib/ffi/io/console.rb +32 -26
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b840d62f5d17d3a367f0a978c107b39ecb08c59ca9a81d9bc9faf88041fbb909
|
|
4
|
+
data.tar.gz: 8c4dc753789ff1a4c6e2b5b5d1c55e6d5c1d59e9fffe308fd824578c6ec30a0b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a2311dbec33c917c4033c6f1cad2e45e56c0d1e34b88ef5897d1d0e8e14003a9f4db6d15e0ffd24cd1e2ac3661a482729821f03e2c0a768bb9a67cd8276a18f5
|
|
7
|
+
data.tar.gz: '0398f065e2c7de6be4c33291c3ea050622de33cb01364b0b7443a89c3aed0afd3ff6e13f615174ae1a6803fb9b3280c6288d7b615ee2a7e929224684105bf33c'
|
data/lib/ffi/io/console.rb
CHANGED
|
@@ -24,45 +24,51 @@ require 'rbconfig'
|
|
|
24
24
|
require_relative 'console/version'
|
|
25
25
|
require_relative 'console/common'
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
require_relative 'console/stub_console'
|
|
30
|
-
else
|
|
31
|
-
|
|
27
|
+
case RbConfig::CONFIG['host_os']
|
|
28
|
+
when /darwin|openbsd|freebsd|netbsd|linux/i
|
|
32
29
|
# If Linux or BSD, try to load the native version
|
|
33
|
-
if RbConfig::CONFIG['host_os'].downcase =~ /darwin|openbsd|freebsd|netbsd|linux/
|
|
34
|
-
begin
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
begin
|
|
32
|
+
|
|
33
|
+
# Attempt to load the native Linux and BSD console logic
|
|
34
|
+
require_relative 'console/native_console'
|
|
35
|
+
|
|
36
|
+
rescue Exception => ex
|
|
39
37
|
|
|
40
|
-
|
|
38
|
+
warn "failed to load native console support: #{ex}" if $VERBOSE
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
else
|
|
41
|
+
|
|
42
|
+
# Native ready.
|
|
43
|
+
ready = true
|
|
44
44
|
|
|
45
|
-
end
|
|
46
45
|
end
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
when /mswin|win32|ming/i
|
|
48
|
+
# If Windows, stty is not possible, always use the stub version
|
|
49
|
+
|
|
50
|
+
ready = false
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
ready = true
|
|
52
|
+
end
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
if ready.nil?
|
|
55
|
+
# Native is not ready, try to use stty
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
begin
|
|
58
|
+
|
|
59
|
+
require_relative 'console/stty_console'
|
|
60
|
+
ready = true
|
|
61
|
+
|
|
62
|
+
rescue Exception => ex2
|
|
63
|
+
|
|
64
|
+
warn "failed to load stty console support: #{ex2}" if $VERBOSE
|
|
65
|
+
ready = false
|
|
59
66
|
|
|
60
|
-
end
|
|
61
67
|
end
|
|
68
|
+
end
|
|
62
69
|
|
|
70
|
+
unless ready
|
|
63
71
|
# If still not ready, just use stubbed version
|
|
64
|
-
if !ready
|
|
65
|
-
require_relative 'console/stub_console'
|
|
66
|
-
end
|
|
67
72
|
|
|
73
|
+
require_relative 'console/stub_console'
|
|
68
74
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: io-console
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.2
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Nobu Nakada
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-
|
|
10
|
+
date: 2025-12-14 00:00:00.000000000 Z
|
|
11
11
|
dependencies: []
|
|
12
12
|
description: add console capabilities to IO instances.
|
|
13
13
|
email: nobu@ruby-lang.org
|