io-console 0.5.11-java → 0.7.0-java

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
  SHA256:
3
- metadata.gz: 38cdc89c8b27879ac31d4328625dcf5f7216068b9b151d49cda057655e53a4e9
4
- data.tar.gz: d344aa3370fc2900b01045d11721b6d742359dc7766bac1f72526167b807eb20
3
+ metadata.gz: 04e00fc2882d045d482efb00903a0546b330a73d95893e92667be4de4cd6d6cb
4
+ data.tar.gz: 18da261f918fdd309e6bc61746befd93b86e60733803c7f35957ff5b2d3babee
5
5
  SHA512:
6
- metadata.gz: a1d9fff14c7e7c1ab7169c803323f83e7aad2e02bccd31e4cf3a43ff5fa14774af8086a8927238585e5fe917454d692598ca47b83d5156529cd5332d8b2c06c5
7
- data.tar.gz: ab10ac539d83f14b5a205942b97f2ef413784c81bafe0bdb30e3c06e4eb818311dcb6abe7b3f1a90950b4861995767828b44fd2b4d718d887c7bb8ce982baf99
6
+ metadata.gz: 1f04f40af8db7d89dc11cc16a6cd8be87c70bcfc62aef2c5728cbc1e820d9076fa741d345f22dc80370f609970279d3ab28a560ec394830937fb7a9e5584df9a
7
+ data.tar.gz: 95b66a4722edd2e29a5e102857738e610ce848e3e7bbf9f6614079b357726f70e510d606cb6dac10d48a9febf945ab414607bbf99cd40e4886f2e607306a4f14
data/.document ADDED
@@ -0,0 +1,4 @@
1
+ LICENSE.txt
2
+ README.md
3
+ ext/
4
+ lib/io/console/size.rb
@@ -1,6 +1,8 @@
1
1
  require 'ffi'
2
2
 
3
- raise LoadError.new("native console only supported on i386, x86_64 and powerpc64") unless FFI::Platform::ARCH =~ /i386|x86_64|powerpc64/
3
+ unless FFI::Platform::ARCH =~ /i386|x86_64|powerpc64|aarch64|s390x/
4
+ raise LoadError.new("native console only supported on i386, x86_64, powerpc64, aarch64 and s390x")
5
+ end
4
6
 
5
7
  module IO::LibC
6
8
  extend FFI::Library
@@ -13,13 +13,13 @@ class IO
13
13
  def ttymode
14
14
  termios = LibC::Termios.new
15
15
  if LibC.tcgetattr(self.fileno, termios) != 0
16
- raise SystemCallError.new(path, FFI.errno)
16
+ raise SystemCallError.new(respond_to?(:path) ? path : "tcgetattr", FFI.errno)
17
17
  end
18
18
 
19
19
  if block_given?
20
20
  yield tmp = termios.dup
21
21
  if LibC.tcsetattr(self.fileno, LibC::TCSANOW, tmp) != 0
22
- raise SystemCallError.new(path, FFI.errno)
22
+ raise SystemCallError.new(respond_to?(:path) ? path : "tcsetattr(TCSANOW)", FFI.errno)
23
23
  end
24
24
  end
25
25
  termios
@@ -32,7 +32,7 @@ class IO
32
32
  block.call(self)
33
33
  ensure
34
34
  if orig_termios && LibC.tcsetattr(self.fileno, LibC::TCSANOW, orig_termios) != 0
35
- raise SystemCallError.new(path, FFI.errno)
35
+ raise SystemCallError.new(respond_to?(:path) ? path : "tcsetattr(TCSANOW)", FFI.errno)
36
36
  end
37
37
  end
38
38
  end
@@ -0,0 +1,3 @@
1
+ class IO::ConsoleMode
2
+ VERSION = 0.7.0
3
+ end
@@ -21,11 +21,12 @@
21
21
 
22
22
  require 'rbconfig'
23
23
 
24
- require_relative 'common'
24
+ require_relative 'console/version'
25
+ require_relative 'console/common'
25
26
 
26
27
  # If Windows, always use the stub version
27
28
  if RbConfig::CONFIG['host_os'] =~ /(mswin)|(win32)|(ming)/
28
- require_relative 'stub_console'
29
+ require_relative 'console/stub_console'
29
30
  else
30
31
 
31
32
  # If Linux or BSD, try to load the native version
@@ -33,7 +34,7 @@ else
33
34
  begin
34
35
 
35
36
  # Attempt to load the native Linux and BSD console logic
36
- require_relative 'native_console'
37
+ require_relative 'console/native_console'
37
38
  ready = true
38
39
 
39
40
  rescue Exception => ex
@@ -48,7 +49,7 @@ else
48
49
  if !ready
49
50
  begin
50
51
 
51
- require_relative 'stty_console'
52
+ require_relative 'console/stty_console'
52
53
  ready = true
53
54
 
54
55
  rescue Exception
@@ -61,7 +62,7 @@ else
61
62
 
62
63
  # If still not ready, just use stubbed version
63
64
  if !ready
64
- require_relative 'stub_console'
65
+ require_relative 'console/stub_console'
65
66
  end
66
67
 
67
68
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: io-console
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.11
4
+ version: 0.7.0
5
5
  platform: java
6
6
  authors:
7
7
  - Nobu Nakada
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-29 00:00:00.000000000 Z
11
+ date: 2023-12-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: add console capabilities to IO instances.
14
14
  email: nobu@ruby-lang.org
@@ -16,16 +16,17 @@ executables: []
16
16
  extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
+ - ".document"
19
20
  - LICENSE.txt
20
21
  - README.md
21
- - lib/io/console.rb
22
- - lib/io/console/ffi/bsd_console.rb
23
- - lib/io/console/ffi/common.rb
24
- - lib/io/console/ffi/console.rb
25
- - lib/io/console/ffi/linux_console.rb
26
- - lib/io/console/ffi/native_console.rb
27
- - lib/io/console/ffi/stty_console.rb
28
- - lib/io/console/ffi/stub_console.rb
22
+ - lib/ffi/io/console.rb
23
+ - lib/ffi/io/console/bsd_console.rb
24
+ - lib/ffi/io/console/common.rb
25
+ - lib/ffi/io/console/linux_console.rb
26
+ - lib/ffi/io/console/native_console.rb
27
+ - lib/ffi/io/console/stty_console.rb
28
+ - lib/ffi/io/console/stub_console.rb
29
+ - lib/ffi/io/console/version.rb
29
30
  - lib/io/console/size.rb
30
31
  homepage: https://github.com/ruby/io-console
31
32
  licenses:
@@ -36,6 +37,7 @@ metadata:
36
37
  post_install_message:
37
38
  rdoc_options: []
38
39
  require_paths:
40
+ - lib/ffi
39
41
  - lib
40
42
  required_ruby_version: !ruby/object:Gem::Requirement
41
43
  requirements:
@@ -48,7 +50,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
48
50
  - !ruby/object:Gem::Version
49
51
  version: '0'
50
52
  requirements: []
51
- rubygems_version: 3.2.32
53
+ rubygems_version: 3.5.0.dev
52
54
  signing_key:
53
55
  specification_version: 4
54
56
  summary: Console interface
data/lib/io/console.rb DELETED
@@ -1,5 +0,0 @@
1
- if RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'truffleruby'
2
- raise LoadError, 'loading unexpected file'
3
- else
4
- require_relative 'console/ffi/console'
5
- end
File without changes