HDLRuby 3.6.1 → 3.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/HDLRuby/ui/hruby_board.rb +28 -1
- data/lib/HDLRuby/version.rb +1 -1
- 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: 70c4b4aec90e44d8229a4f13990112c3599b7104e3a867cf87741b2d1e4ff246
|
4
|
+
data.tar.gz: 10c6957977c1df45cae0f270dd27db75824a92e51dc508b5ffa600ce4654f1a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56b18d61f3945edaaff50244ecb8ae69fa5c29058942c456ca377eb54da83bb64677004dae4047a8f2aae9b4dd2fa57972c8cf6f0fc497bfe9785c447466cfaa
|
7
|
+
data.tar.gz: 81e58ca1a9ae1b6ba038c5a43c857ebff9e93dd2627befe89706c0200389a5ee18e1d77261e21d13f291b547dc4cf5be2e9024d75d524e2d54d26c37f7943679
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'socket'
|
2
|
+
require 'io/console'
|
2
3
|
|
3
4
|
require 'rubyHDL'
|
4
5
|
|
@@ -994,6 +995,31 @@ HTMLRESPONSE
|
|
994
995
|
@@http_ports << @http_port
|
995
996
|
# Create the server
|
996
997
|
@server = TCPServer.new(@http_port)
|
998
|
+
|
999
|
+
browse = Thread.new do
|
1000
|
+
url = "http://localhost:#{@http_port}"
|
1001
|
+
# Shall we try to open a page automatically:
|
1002
|
+
puts "Shall I open a new page on your browser for the GUI? [y/n]"
|
1003
|
+
ch = ""
|
1004
|
+
ch = STDIN.getch while !(ch =~ /[YyNn]/)
|
1005
|
+
unless ch =~ /[Yy]/ then
|
1006
|
+
puts "Please open the following url manually: #{url}"
|
1007
|
+
browse.kill
|
1008
|
+
end
|
1009
|
+
# Open the page if possible.
|
1010
|
+
sleep(0.2)
|
1011
|
+
case RUBY_PLATFORM
|
1012
|
+
when /darwin/
|
1013
|
+
Kernel.system("open",url)
|
1014
|
+
when /linux/
|
1015
|
+
Kernel.system("xdg",url)
|
1016
|
+
when /mingw|mswin/
|
1017
|
+
Kernel.system("start",url)
|
1018
|
+
else
|
1019
|
+
puts "Please open the following url on your browser: #{url}"
|
1020
|
+
end
|
1021
|
+
end
|
1022
|
+
|
997
1023
|
# Create the running function.
|
998
1024
|
this = self
|
999
1025
|
Kernel.define_method(@name.to_sym) { this.run }
|
@@ -1269,7 +1295,7 @@ HTMLRESPONSE
|
|
1269
1295
|
|
1270
1296
|
# Start the ui.
|
1271
1297
|
def run
|
1272
|
-
# At first the
|
1298
|
+
# At first the ui is not running.
|
1273
1299
|
@connected = false
|
1274
1300
|
# Create the ui thread.
|
1275
1301
|
@thread = Thread.new do
|
@@ -1295,6 +1321,7 @@ HTMLRESPONSE
|
|
1295
1321
|
# Wait for a first connection.
|
1296
1322
|
sleep(0.1) while(!@connected)
|
1297
1323
|
end
|
1324
|
+
|
1298
1325
|
end
|
1299
1326
|
|
1300
1327
|
|
data/lib/HDLRuby/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: HDLRuby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lovic Gauthier
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-01-
|
10
|
+
date: 2025-01-14 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: bundler
|