hyperlist 1.1.2 → 1.1.4

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: 4833d00af59c0e670c52789600b5c211056882bf24712925055307a6a19ad450
4
- data.tar.gz: f9079f324d678fde34ed9e7e004c6ad1515903506919764b1007fad386f8f88f
3
+ metadata.gz: ceec87c634faff3f44aea9faab6b7e2c5fbb6299827371c148b01ac833a6653e
4
+ data.tar.gz: d2aee8287a2af42238f8d55ac47e5ac4f38738d55c4672f5f7835c561653246a
5
5
  SHA512:
6
- metadata.gz: 3260f77e28209f0ed869f970442747ecaeec99107697992fc726a321b2fa5c88ab75a1fd66c71678ed40bdf16e089ad8beb4ba0060f2ebd947da158e95b6a14e
7
- data.tar.gz: 56ea68f58fe5bd03837fce80b62b5a8b3477d8d5f62b0faca3cc8ee2db48fb5b91fe4ac502b049f076f094cace07a0814ebaa8fd2172c4a23dd5c35c91f3b043
6
+ metadata.gz: a6bb97db751579efeb55724dd0280edf506a9c547c6809ae61e4fe2ed7ae8b505fb1fc85f138a6ae0c5aea47abc74ed391b6e35f347bbb0dc8e09c562eb2ea77
7
+ data.tar.gz: efdac57b3bff33a8cefa53f26782ff99dfee21536d54bd185497d89bd010669cc543b2e5c167bdb2d0fe250de73a82a4922dc6c927af33d6f07dbb74429cc2f4
@@ -0,0 +1,112 @@
1
+ # Debugging HyperList Issues
2
+
3
+ ## For the user experiencing startup crashes:
4
+
5
+ ### 1. First, verify you have the latest versions:
6
+
7
+ ```bash
8
+ gem list hyperlist
9
+ # Should show: hyperlist (1.1.3)
10
+
11
+ gem list rcurses
12
+ # Should show: rcurses (5.1.4) or higher
13
+ ```
14
+
15
+ ### 2. If not, update to the latest:
16
+
17
+ ```bash
18
+ gem update hyperlist
19
+ gem update rcurses
20
+ ```
21
+
22
+ ### 3. Run with debug mode to see errors:
23
+
24
+ ```bash
25
+ # Set debug environment variable
26
+ export RCURSES_DEBUG=1
27
+ export DEBUG=1
28
+
29
+ # Then run hyperlist
30
+ hyperlist
31
+
32
+ # Or run in one line:
33
+ DEBUG=1 RCURSES_DEBUG=1 hyperlist
34
+ ```
35
+
36
+ ### 4. Alternative: Run with Ruby directly to see errors:
37
+
38
+ ```bash
39
+ # Find where hyperlist is installed
40
+ which hyperlist
41
+
42
+ # Run it directly with Ruby to see any errors
43
+ ruby $(which hyperlist)
44
+ ```
45
+
46
+ ### 5. Check Ruby version compatibility:
47
+
48
+ ```bash
49
+ ruby --version
50
+ # HyperList requires Ruby 3.0.0 or higher
51
+ ```
52
+
53
+ ### 6. Try running with verbose Ruby output:
54
+
55
+ ```bash
56
+ ruby -w $(which hyperlist)
57
+ ```
58
+
59
+ ### 7. Check for missing dependencies:
60
+
61
+ ```bash
62
+ # This will show if rcurses is properly installed
63
+ ruby -e "require 'rcurses'; puts 'rcurses loaded successfully'"
64
+ ```
65
+
66
+ ### 8. Create a simple test file to isolate the issue:
67
+
68
+ Create a file called `test_hyperlist.rb`:
69
+
70
+ ```ruby
71
+ #!/usr/bin/env ruby
72
+
73
+ puts "Ruby version: #{RUBY_VERSION}"
74
+ puts "Testing rcurses..."
75
+
76
+ begin
77
+ require 'rcurses'
78
+ puts "✓ rcurses loaded successfully (version from gem)"
79
+ rescue LoadError => e
80
+ puts "✗ Failed to load rcurses: #{e.message}"
81
+ exit 1
82
+ end
83
+
84
+ puts "\nTesting basic rcurses functionality..."
85
+ begin
86
+ include Rcurses
87
+ puts "✓ Rcurses module included"
88
+ puts "✓ All basic checks passed!"
89
+ rescue => e
90
+ puts "✗ Error: #{e.message}"
91
+ exit 1
92
+ end
93
+ ```
94
+
95
+ Run it with:
96
+ ```bash
97
+ ruby test_hyperlist.rb
98
+ ```
99
+
100
+ ### 9. If all else fails, capture output:
101
+
102
+ ```bash
103
+ # Run with script to capture all output
104
+ script -c "hyperlist" hyperlist_output.txt
105
+
106
+ # Then send us the hyperlist_output.txt file
107
+ ```
108
+
109
+ ## Notes:
110
+ - GDB won't work with Ruby scripts (it's for compiled binaries)
111
+ - The new error handling in rcurses 5.1.4+ should show errors after terminal cleanup
112
+ - Setting DEBUG=1 or RCURSES_DEBUG=1 will show full stack traces
data/diagnose.rb ADDED
@@ -0,0 +1,115 @@
1
+ #!/usr/bin/env ruby
2
+ # HyperList Diagnostic Script
3
+ # Run this to help diagnose installation/startup issues
4
+
5
+ puts "=" * 60
6
+ puts "HyperList Diagnostic Report"
7
+ puts "=" * 60
8
+
9
+ # Check Ruby version
10
+ puts "\n1. Ruby Version:"
11
+ puts " #{RUBY_VERSION} (#{RUBY_PLATFORM})"
12
+ if RUBY_VERSION < "3.0.0"
13
+ puts " ⚠️ WARNING: HyperList requires Ruby 3.0.0 or higher"
14
+ else
15
+ puts " ✓ Ruby version OK"
16
+ end
17
+
18
+ # Check gem versions
19
+ puts "\n2. Gem Versions:"
20
+ begin
21
+ hyperlist_version = `gem list hyperlist --local`.match(/hyperlist \(([\d.]+)\)/)[1] rescue "not found"
22
+ rcurses_version = `gem list rcurses --local`.match(/rcurses \(([\d.]+(?:,\s*[\d.]+)*)\)/)[1] rescue "not found"
23
+
24
+ puts " hyperlist: #{hyperlist_version}"
25
+ if hyperlist_version >= "1.1.3"
26
+ puts " ✓ HyperList version OK"
27
+ else
28
+ puts " ⚠️ Please update: gem update hyperlist"
29
+ end
30
+
31
+ puts " rcurses: #{rcurses_version}"
32
+ if rcurses_version.include?("5.1.4") || rcurses_version >= "5.1.4"
33
+ puts " ✓ rcurses version OK"
34
+ else
35
+ puts " ⚠️ Please update: gem update rcurses"
36
+ end
37
+ rescue => e
38
+ puts " Error checking gems: #{e.message}"
39
+ end
40
+
41
+ # Test loading rcurses
42
+ puts "\n3. Testing rcurses load:"
43
+ begin
44
+ require 'rcurses'
45
+ puts " ✓ rcurses loaded successfully"
46
+
47
+ # Check if we can access rcurses modules
48
+ include Rcurses
49
+ puts " ✓ Rcurses modules accessible"
50
+ rescue LoadError => e
51
+ puts " ✗ Failed to load rcurses: #{e.message}"
52
+ puts " Try: gem install rcurses"
53
+ rescue => e
54
+ puts " ✗ Error with rcurses: #{e.message}"
55
+ end
56
+
57
+ # Test terminal capabilities
58
+ puts "\n4. Terminal Check:"
59
+ puts " TERM: #{ENV['TERM'] || 'not set'}"
60
+ puts " TTY: #{$stdin.tty? ? 'Yes' : 'No'}"
61
+ puts " Encoding: #{Encoding.default_external}"
62
+
63
+ # Check for HyperList executable
64
+ puts "\n5. HyperList Installation:"
65
+ hyperlist_path = `which hyperlist`.strip
66
+ if hyperlist_path.empty?
67
+ puts " ✗ hyperlist command not found in PATH"
68
+ puts " Try: gem install hyperlist"
69
+ else
70
+ puts " ✓ Found at: #{hyperlist_path}"
71
+
72
+ # Check if it's executable
73
+ if File.executable?(hyperlist_path)
74
+ puts " ✓ File is executable"
75
+ else
76
+ puts " ⚠️ File is not executable"
77
+ puts " Try: chmod +x #{hyperlist_path}"
78
+ end
79
+ end
80
+
81
+ # Try to load core dependencies
82
+ puts "\n6. Core Dependencies:"
83
+ deps = ['io/console', 'date', 'cgi', 'openssl', 'digest', 'base64']
84
+ deps.each do |dep|
85
+ begin
86
+ require dep
87
+ puts " ✓ #{dep}"
88
+ rescue LoadError => e
89
+ puts " ✗ #{dep}: #{e.message}"
90
+ end
91
+ end
92
+
93
+ # Test creating a basic rcurses pane (without initializing terminal)
94
+ puts "\n7. Testing Rcurses Pane Creation (simulation):"
95
+ begin
96
+ # Don't actually initialize the terminal, just test the class exists
97
+ if defined?(Rcurses::Pane)
98
+ puts " ✓ Rcurses::Pane class exists"
99
+ else
100
+ puts " ✗ Rcurses::Pane class not found"
101
+ end
102
+ rescue => e
103
+ puts " ✗ Error: #{e.message}"
104
+ end
105
+
106
+ puts "\n" + "=" * 60
107
+ puts "Diagnostic complete!"
108
+ puts "=" * 60
109
+
110
+ puts "\nIf everything shows ✓ but hyperlist still crashes:"
111
+ puts "1. Run with debug mode: DEBUG=1 RCURSES_DEBUG=1 hyperlist"
112
+ puts "2. Check for error log: cat ~/.hyperlist_error.log"
113
+ puts "3. Try running directly: ruby #{hyperlist_path}"
114
+
115
+ puts "\nPlease share this diagnostic output when reporting issues."
data/diagnose_safe.rb ADDED
@@ -0,0 +1,198 @@
1
+ #!/usr/bin/env ruby
2
+ # HyperList Safe Diagnostic Script
3
+ # This version ensures terminal remains in a sane state
4
+
5
+ # First, ensure terminal is in sane state
6
+ system("stty sane 2>/dev/null")
7
+
8
+ # Ensure we're not in raw mode and output is flushed properly
9
+ $stdout.sync = true
10
+ $stderr.sync = true
11
+
12
+ # Don't load rcurses until we explicitly test it
13
+ puts "=" * 60
14
+ puts "HyperList Safe Diagnostic Report"
15
+ puts "=" * 60
16
+
17
+ # Check Ruby version
18
+ puts "\n1. Ruby Version:"
19
+ puts " #{RUBY_VERSION} (#{RUBY_PLATFORM})"
20
+ if RUBY_VERSION < "3.0.0"
21
+ puts " WARNING: HyperList requires Ruby 3.0.0 or higher"
22
+ elsif RUBY_VERSION >= "3.4.0"
23
+ puts " WARNING: Ruby 3.4+ is a development version and may have compatibility issues"
24
+ puts " RECOMMENDED: Use Ruby 3.3.x for stability"
25
+ else
26
+ puts " OK: Ruby version supported"
27
+ end
28
+
29
+ # Check gem versions WITHOUT loading them
30
+ puts "\n2. Installed Gem Versions:"
31
+ begin
32
+ hyperlist_output = `gem list hyperlist --local 2>&1`
33
+ rcurses_output = `gem list rcurses --local 2>&1`
34
+
35
+ if hyperlist_output.include?("hyperlist")
36
+ version = hyperlist_output.match(/hyperlist \(([\d.]+)/)[1] rescue "unknown"
37
+ puts " hyperlist: #{version}"
38
+ if version >= "1.1.3"
39
+ puts " OK: HyperList version is current"
40
+ else
41
+ puts " UPDATE NEEDED: gem update hyperlist"
42
+ end
43
+ else
44
+ puts " hyperlist: NOT INSTALLED"
45
+ puts " Run: gem install hyperlist"
46
+ end
47
+
48
+ if rcurses_output.include?("rcurses")
49
+ # Extract just the first/latest version
50
+ version = rcurses_output.match(/rcurses \(([\d.]+)/)[1] rescue "unknown"
51
+ puts " rcurses: #{version}"
52
+ if version >= "5.1.4"
53
+ puts " OK: rcurses version is current"
54
+ else
55
+ puts " UPDATE NEEDED: gem update rcurses"
56
+ end
57
+ else
58
+ puts " rcurses: NOT INSTALLED"
59
+ puts " Run: gem install rcurses"
60
+ end
61
+ rescue => e
62
+ puts " Error checking gems: #{e.message}"
63
+ end
64
+
65
+ # Check terminal environment
66
+ puts "\n3. Terminal Environment:"
67
+ puts " TERM: #{ENV['TERM'] || 'not set'}"
68
+ puts " LANG: #{ENV['LANG'] || 'not set'}"
69
+ puts " TTY: #{$stdin.tty? ? 'Yes' : 'No'}"
70
+ puts " Terminal columns: #{`tput cols`.strip rescue 'unknown'}"
71
+ puts " Terminal rows: #{`tput lines`.strip rescue 'unknown'}"
72
+
73
+ # Check for HyperList executable
74
+ puts "\n4. HyperList Executable:"
75
+ hyperlist_path = `which hyperlist 2>/dev/null`.strip
76
+ if hyperlist_path.empty?
77
+ puts " NOT FOUND in PATH"
78
+
79
+ # Check common gem bin paths
80
+ gem_paths = [
81
+ "#{ENV['HOME']}/.local/share/gem/ruby/*/bin/hyperlist",
82
+ "#{ENV['HOME']}/.gem/ruby/*/bin/hyperlist",
83
+ "/usr/local/bin/hyperlist",
84
+ "/usr/bin/hyperlist"
85
+ ]
86
+
87
+ found = false
88
+ gem_paths.each do |pattern|
89
+ Dir.glob(pattern).each do |path|
90
+ if File.exist?(path)
91
+ puts " Found at: #{path}"
92
+ puts " Add to PATH: export PATH=\"#{File.dirname(path)}:$PATH\""
93
+ found = true
94
+ break
95
+ end
96
+ end
97
+ break if found
98
+ end
99
+ else
100
+ puts " Found at: #{hyperlist_path}"
101
+ if File.executable?(hyperlist_path)
102
+ puts " OK: File is executable"
103
+ else
104
+ puts " ERROR: File is not executable"
105
+ puts " Fix: chmod +x #{hyperlist_path}"
106
+ end
107
+ end
108
+
109
+ # Test basic dependencies WITHOUT loading rcurses
110
+ puts "\n5. Core Ruby Dependencies:"
111
+ deps = ['io/console', 'date', 'cgi', 'openssl', 'digest', 'base64']
112
+ deps.each do |dep|
113
+ begin
114
+ require dep
115
+ puts " OK: #{dep}"
116
+ rescue LoadError => e
117
+ puts " MISSING: #{dep} - #{e.message}"
118
+ end
119
+ end
120
+
121
+ # Separate rcurses test with isolation
122
+ puts "\n6. Testing rcurses (isolated):"
123
+ puts " Running isolated test..."
124
+
125
+ # Create a separate test script to isolate rcurses
126
+ test_script = <<~RUBY
127
+ begin
128
+ require 'rcurses'
129
+ puts "RCURSES_LOAD:OK"
130
+
131
+ # Check if main classes exist without initializing
132
+ if defined?(Rcurses::Pane)
133
+ puts "RCURSES_PANE:OK"
134
+ else
135
+ puts "RCURSES_PANE:FAIL"
136
+ end
137
+ rescue LoadError => e
138
+ puts "RCURSES_LOAD:FAIL:\#{e.message}"
139
+ rescue => e
140
+ puts "RCURSES_ERROR:\#{e.class}:\#{e.message}"
141
+ end
142
+ RUBY
143
+
144
+ # Run test in subprocess to avoid terminal corruption
145
+ result = `ruby -e "#{test_script}" 2>&1`
146
+
147
+ if result.include?("RCURSES_LOAD:OK")
148
+ puts " OK: rcurses loads successfully"
149
+ else
150
+ puts " ERROR: rcurses failed to load"
151
+ error = result.match(/RCURSES_LOAD:FAIL:(.+)/)
152
+ puts " Details: #{error[1]}" if error
153
+ end
154
+
155
+ if result.include?("RCURSES_PANE:OK")
156
+ puts " OK: Rcurses::Pane class available"
157
+ else
158
+ puts " ERROR: Rcurses::Pane class not found"
159
+ end
160
+
161
+ if result.include?("RCURSES_ERROR")
162
+ error = result.match(/RCURSES_ERROR:(.+):(.+)/)
163
+ puts " ERROR: #{error[1]} - #{error[2]}" if error
164
+ end
165
+
166
+ # Test terminal sanity
167
+ puts "\n7. Terminal State Check:"
168
+ system("stty -a > /dev/null 2>&1")
169
+ if $?.success?
170
+ puts " OK: Terminal responds to stty"
171
+ else
172
+ puts " ERROR: Terminal not responding properly"
173
+ end
174
+
175
+ # Try to restore terminal just in case
176
+ system("stty sane 2>/dev/null")
177
+ system("tput reset 2>/dev/null")
178
+
179
+ puts "\n" + "=" * 60
180
+ puts "Diagnostic complete!"
181
+ puts "=" * 60
182
+
183
+ puts "\nRECOMMENDATIONS:"
184
+ if RUBY_VERSION >= "3.4.0"
185
+ puts "1. IMPORTANT: You're using Ruby #{RUBY_VERSION} (development version)"
186
+ puts " Install Ruby 3.3.x for stability:"
187
+ puts " - Arch Linux: sudo pacman -S ruby"
188
+ puts " - Or use: rbenv install 3.3.4"
189
+ end
190
+
191
+ puts "\nTo test rcurses isolation:"
192
+ puts " ruby -e \"require 'rcurses'; puts 'Loaded OK'\""
193
+
194
+ puts "\nTo restore terminal if corrupted:"
195
+ puts " stty sane"
196
+ puts " reset"
197
+
198
+ puts "\nPlease share this diagnostic output when reporting issues."
data/fix_terminal.sh ADDED
@@ -0,0 +1,33 @@
1
+ #!/bin/bash
2
+ # Terminal restoration script for when things go wrong
3
+
4
+ echo "Restoring terminal to sane state..."
5
+
6
+ # Reset terminal to sane defaults
7
+ stty sane 2>/dev/null
8
+
9
+ # Clear any raw mode settings
10
+ stty echo 2>/dev/null
11
+ stty icanon 2>/dev/null
12
+ stty icrnl 2>/dev/null
13
+
14
+ # Reset terminal completely
15
+ tput reset 2>/dev/null
16
+ reset 2>/dev/null
17
+
18
+ # Clear screen
19
+ clear
20
+
21
+ # Show cursor
22
+ tput cnorm 2>/dev/null
23
+ echo -e "\033[?25h" # ANSI escape to show cursor
24
+
25
+ echo "Terminal restored!"
26
+ echo ""
27
+ echo "If your terminal is still broken, try:"
28
+ echo " 1. Close and reopen your terminal"
29
+ echo " 2. Run: reset"
30
+ echo " 3. Run: stty sane"
31
+ echo ""
32
+ echo "To check terminal state:"
33
+ echo " stty -a"
data/hyperlist CHANGED
@@ -7,7 +7,7 @@
7
7
  # Check for help/version BEFORE loading any libraries
8
8
  if ARGV[0] == '-h' || ARGV[0] == '--help'
9
9
  puts <<~HELP
10
- HyperList v1.1.0 - Terminal User Interface for HyperList files
10
+ HyperList v1.1.4 - Terminal User Interface for HyperList files
11
11
 
12
12
  USAGE
13
13
  hyperlist [OPTIONS] [FILE]
@@ -52,7 +52,7 @@ if ARGV[0] == '-h' || ARGV[0] == '--help'
52
52
  HELP
53
53
  exit 0
54
54
  elsif ARGV[0] == '-v' || ARGV[0] == '--version'
55
- puts "HyperList v1.1.0"
55
+ puts "HyperList v1.1.4"
56
56
  exit 0
57
57
  end
58
58
 
@@ -70,7 +70,7 @@ class HyperListApp
70
70
  include Rcurses::Input
71
71
  include Rcurses::Cursor
72
72
 
73
- VERSION = "1.1.2"
73
+ VERSION = "1.1.4"
74
74
 
75
75
  def initialize(filename = nil)
76
76
  @filename = filename ? File.expand_path(filename) : nil
data/hyperlist.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "hyperlist"
3
- spec.version = "1.1.2"
3
+ spec.version = "1.1.4"
4
4
  spec.authors = ["Geir Isene"]
5
5
  spec.email = ["g@isene.com"]
6
6
 
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.require_paths = ["."]
29
29
 
30
30
  # Runtime dependencies
31
- spec.add_runtime_dependency "rcurses", "~> 5.1"
31
+ spec.add_runtime_dependency "rcurses", "~> 5.1", ">= 5.1.5"
32
32
 
33
33
  # Development dependencies
34
34
  spec.add_development_dependency "minitest", "~> 5.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyperlist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '5.1'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 5.1.5
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,9 @@ dependencies:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
29
  version: '5.1'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 5.1.5
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: minitest
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -67,6 +73,10 @@ files:
67
73
  - CHANGELOG.md
68
74
  - LICENSE
69
75
  - README.md
76
+ - debug_instructions.md
77
+ - diagnose.rb
78
+ - diagnose_safe.rb
79
+ - fix_terminal.sh
70
80
  - hyperlist
71
81
  - hyperlist.gemspec
72
82
  - hyperlist_logo.svg