solara 0.2.1 → 0.2.2
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/solara/lib/core/dashboard/dashboard_server.rb +12 -5
- data/solara/lib/solara/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bf4626fe23d16f245e1e77267bf23f3b368cd4bb2fd286cb038a73f52f7f6b65
|
|
4
|
+
data.tar.gz: a4bbc04dfe9844532227f16283c4c3b7cf86450a21a75b01a479a88be8021c82
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c490881fbbcf873cb1fae33bcad4f25989cff5196ff70d0494238e2640cd39d68089512fe940590863d633494528755ee6dd4024d05d58f379c503cdd499b3ac
|
|
7
|
+
data.tar.gz: bcebb36d901d66ea8f184f480fcceb3c8472d35424432ea43d0a42b153409ff500f968626c32f507011f012194b5277f2defab8ce52c25064730ae2cccdc07eb
|
|
@@ -28,7 +28,7 @@ class DashboardServer
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def shutdown
|
|
31
|
-
Solara.logger.
|
|
31
|
+
Solara.logger.info("Shutting down server...")
|
|
32
32
|
@server.shutdown if @server
|
|
33
33
|
end
|
|
34
34
|
|
|
@@ -81,9 +81,10 @@ class DashboardServer
|
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
def print_server_info
|
|
84
|
-
Solara.logger.
|
|
85
|
-
Solara.logger.
|
|
86
|
-
Solara.logger.
|
|
84
|
+
Solara.logger.info("Please click the link or copy and paste it into your browser if it doesn't open automatically: http://localhost:#{@port}")
|
|
85
|
+
Solara.logger.info("Server starting on http://localhost:#{@port}")
|
|
86
|
+
Solara.logger.info("Serving files from: #{@root}")
|
|
87
|
+
Solara.logger.info("Press Ctrl+C to stop the server")
|
|
87
88
|
end
|
|
88
89
|
|
|
89
90
|
def start_server
|
|
@@ -104,7 +105,13 @@ class DashboardServer
|
|
|
104
105
|
when /darwin/
|
|
105
106
|
system "/usr/bin/open", url
|
|
106
107
|
when /linux/
|
|
107
|
-
|
|
108
|
+
# Check if we're in WSL
|
|
109
|
+
if File.exist?('/proc/version') && File.read('/proc/version').include?('Microsoft')
|
|
110
|
+
# Use the Windows start command to open in WSL
|
|
111
|
+
system "cmd.exe", "/c", "start", url
|
|
112
|
+
else
|
|
113
|
+
system "/usr/bin/xdg-open", url
|
|
114
|
+
end
|
|
108
115
|
when /mswin|mingw|cygwin/
|
|
109
116
|
system "start", url
|
|
110
117
|
end
|