solara 0.2.1 → 0.2.2

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: dea7da41ec79265551adc948a5586af994164b9c04ef3576b2c37b9fab2f108f
4
- data.tar.gz: 31352f627b65fa267a082095bfec2346b03173a944e2c967974107c0c30f7e9b
3
+ metadata.gz: bf4626fe23d16f245e1e77267bf23f3b368cd4bb2fd286cb038a73f52f7f6b65
4
+ data.tar.gz: a4bbc04dfe9844532227f16283c4c3b7cf86450a21a75b01a479a88be8021c82
5
5
  SHA512:
6
- metadata.gz: a4623541490f240d2ffacbb682d8b9388058633af6e40d548cd998cad186f87addd4efc4675e2257d4c90102f42ce7589e3c90d400f84775d8ca25f1af201f5b
7
- data.tar.gz: c5158cd2c02abd104155d482c3e59e8c7a79b4289eb4316a5c9ee7de101892b6ae1d1341c247b97a38611041add484a4abaaf9d414c4380fa7cebbf12ecbbf35
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.debug("Shutting down server...")
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.debug("Server starting on http://localhost:#{@port}")
85
- Solara.logger.debug("Serving files from: #{@root}")
86
- Solara.logger.debug("Press Ctrl+C to stop the server")
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
- system "/usr/bin/xdg-open", url
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
@@ -1,3 +1,3 @@
1
1
  module Solara
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Malek Kamel