gloo 5.3.7 → 5.3.8

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: 99cf3aaaa69bc108816bf0c7d00ce28fdefc8b077518287dd85f7d1122f7ed90
4
- data.tar.gz: 45146264b60f9d68d5e4e4c30e3f0b6ba295b1985de2beb66d89fff529e3f3e5
3
+ metadata.gz: '09b142bdfb67e58657f3b57bd8cafcc2854818a7e31d6baf1c57b873a4b9299d'
4
+ data.tar.gz: 54bcb342bf1917c63bb856dd6bf0b8b49c06e77710817adff73cdc4a29bae986
5
5
  SHA512:
6
- metadata.gz: 356125b643a512c2f34073d702de9f56ae798b4dd37b20e2de3179eab011c6db0be3d44b897b5a7a26aaa2390c54a32c26d417d7d5a9b885283b671aba438ec5
7
- data.tar.gz: 6d09402914487f2e00ee23b181e93f629dca1156970e0b06f40bc4ff9d16dea96d5d032327bb07689a21b0b4d401eeaf1cfe20f046973c780684f7f12a40279e
6
+ metadata.gz: f1b1c09eb8b9c686b6dfe8e4b55d0cee1f0ccf41d8f1eb7681b18c9954b0f030348735451a638ae0fd2ab4d3c8624aaf224a5e2697fcd3b850616b2cf7cab32a
7
+ data.tar.gz: 20788c488d3b105b79d2c1f999422c59b812ef3487cb0d214f8491ab90b20e4b1cd58eedfed744f51e3bbcf11c2c34715e07b314e2c2875ea35c778920afa4e2
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 5.3.7
1
+ 5.3.8
data/lib/VERSION_NOTES CHANGED
@@ -1,3 +1,7 @@
1
+ 5.3.8 - 2026.05.24
2
+ - Update to URI to enable opening on Windows and WSL.
3
+
4
+
1
5
  5.3.7 - 2026.05.01
2
6
  - Clears out the default value for a prompt so it doesn't persist.
3
7
 
@@ -111,6 +111,7 @@ module Gloo
111
111
  return true
112
112
  end
113
113
 
114
+
114
115
  # ---------------------------------------------------------------------
115
116
  # Children
116
117
  # ---------------------------------------------------------------------
@@ -122,6 +123,7 @@ module Gloo
122
123
  return false
123
124
  end
124
125
 
126
+
125
127
  # ---------------------------------------------------------------------
126
128
  # Messages
127
129
  # ---------------------------------------------------------------------
@@ -187,6 +189,7 @@ module Gloo
187
189
  return @engine.settings.log_path
188
190
  end
189
191
 
192
+
190
193
  # ---------------------------------------------------------------------
191
194
  # Special chars
192
195
  # ---------------------------------------------------------------------
@@ -196,6 +199,7 @@ module Gloo
196
199
  return "\n"
197
200
  end
198
201
 
202
+
199
203
  # ---------------------------------------------------------------------
200
204
  # Screen Messages
201
205
  # ---------------------------------------------------------------------
@@ -210,6 +214,7 @@ module Gloo
210
214
  return Gloo::App::Settings.cols( @engine )
211
215
  end
212
216
 
217
+
213
218
  # ---------------------------------------------------------------------
214
219
  # Platform Messages
215
220
  # ---------------------------------------------------------------------
@@ -249,6 +254,24 @@ module Gloo
249
254
  return OS.mac?
250
255
  end
251
256
 
257
+ # Is the platform WSL on Windows?
258
+ def msg_platform_wsl?
259
+ return self.class.wsl?
260
+ end
261
+
262
+ #
263
+ # Is the platform WSL on Windows?
264
+ #
265
+ def self.wsl?
266
+ return false unless OS.linux?
267
+
268
+ ENV.key?('WSL_DISTRO_NAME') ||
269
+ ENV.key?('WSL_INTEROP') ||
270
+ File.read('/proc/sys/kernel/osrelease').downcase.include?('microsoft')
271
+ rescue
272
+ return false
273
+ end
274
+
252
275
  #
253
276
  # Get the command to open a file on this platform.
254
277
  #
@@ -257,6 +280,7 @@ module Gloo
257
280
  return 'xdg-open' if OS.posix?
258
281
 
259
282
  return 'Start-Process' if OS.windows?
283
+ return 'explorer.exe' if self.wsl?
260
284
 
261
285
  return nil
262
286
  end
@@ -149,15 +149,22 @@ module Gloo
149
149
  #
150
150
  # Open the given URL with platform command.
151
151
  #
152
+ # NOTE that this was using "cmd = Gloo::Core::GlooSystem.open_for_platform"
153
+ # but refactored because on windows the command is more complex.
154
+ #
152
155
  def self.open_url( url, engine=nil )
153
- cmd = Gloo::Core::GlooSystem.open_for_platform
154
- cmd_with_param = "#{cmd} \"#{url}\""
155
-
156
- if OS.mac?
157
- `#{cmd_with_param}`
156
+ case
157
+ when OS.windows?
158
+ system( "powershell", "-Command", "Start-Process", url )
159
+ when OS.mac?
160
+ `open "#{url}"`
161
+ when OS.linux?
162
+ if Gloo::Core::GlooSystem.wsl?
163
+ `explorer.exe "#{url}"`
164
+ else
165
+ `xdg-open "#{url}"`
166
+ end
158
167
  else
159
- # This does not work in Linux or in WSL on Windows:
160
- # exec cmd_with_param
161
168
  engine.log.warn 'Opening URL not supported on this platform.' if engine
162
169
  end
163
170
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gloo
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.7
4
+ version: 5.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Crane
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-05-01 00:00:00.000000000 Z
11
+ date: 2026-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler