gloo 2.2.0 → 2.4.0

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: 458df803a19ddb0ef29a942b8257e00723b1554d25ff11776d2d5cc170fd9535
4
- data.tar.gz: 6ae7b1768becdb52bb251b5c1bc0aaa5329caf34327fcd9a3a1ea9ac1ceed658
3
+ metadata.gz: e677ad11e6ffef597d0e2a42b34abb8402cdc43acd542bfbf798b7ad83b25079
4
+ data.tar.gz: ef5c30735d1da7cb085aab63f85d63e43de3399bb07902eb2192aca0976ca19a
5
5
  SHA512:
6
- metadata.gz: 8de984642bca19eb20c8ad2d171729d980adde59a7c768b0f1ecdff90fa0e15283a64b1d9fee318ba3deb4148e06e38b419b957aad08774ccaa491f47241db7f
7
- data.tar.gz: 53edc86be0a517dd71230b11f58a83874cb2598a4f846e690646f4d5400bde5481c6be4ace40e19a0ed9e6e60433fd38b9c9b358cce843d43e48c8227e32221c
6
+ metadata.gz: 6c1b7ca772f6ac41a93cd4f4b16957b54f0b4db7ab393050b7ebee7ee810f31cc57f75c6c9f8075dd065d1267c42b609217b8a6933ff29ee537f4c1cd27a9072
7
+ data.tar.gz: f5886a43cc46fd4665e8613e0d59162446234572d71b928dd32ede48f34ae3e2bbb692f61509750ccda197d2334ea607989bb5c59ab29894b02aa0621c5e3de2
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.0
1
+ 2.4.0
data/lib/VERSION_NOTES ADDED
@@ -0,0 +1,25 @@
1
+ 2.4.0 - 2023.06.27
2
+ - Updates URI open to work on Windows.
3
+ - Updates exec to work on Windows.
4
+
5
+
6
+ 2.3.1 - 2023.06.26
7
+ - Fixes version number stuff.
8
+
9
+
10
+ 2.3.0 - 2023.06.26
11
+ - Adds version notes as option on the version verb.
12
+
13
+
14
+ 2.2 - 2023.06.23
15
+ - Adds color to list output.
16
+ - Updates in-app help with verb and object lists and shows settings.
17
+ - Expanded settings with list indent and levels.
18
+ - Fixes bug with the debug flag from settings.
19
+
20
+ 2.1 - 2023.05.24
21
+ - Updates menu to provide convention for simplified usage.
22
+
23
+ 2.0 - 2023.05.22
24
+ - Version 2 merges gloo-lang back into a single gloo gem.
25
+
data/lib/gloo/app/info.rb CHANGED
@@ -10,18 +10,31 @@ module Gloo
10
10
  module App
11
11
  class Info
12
12
 
13
+ APP_NAME = 'Gloo'.freeze
14
+ VERSION_FILE = 'VERSION'.freeze
15
+ VERSION_NOTES_FILE = 'VERSION_NOTES'.freeze
16
+
13
17
  #
14
18
  # Load the version from the VERSION file.
15
19
  #
16
20
  def self.get_version
17
21
  f = File.dirname( File.absolute_path( __FILE__ ) )
18
22
  f = File.dirname( File.dirname( f ) )
19
- f = File.join( f, 'VERSION' )
23
+ f = File.join( f, VERSION_FILE )
20
24
  return File.read( f )
21
25
  end
22
26
 
23
27
  VERSION = Gloo::App::Info.get_version
24
- APP_NAME = 'Gloo'.freeze
28
+
29
+ #
30
+ # Load the version notes from the VERSION_NOTES file.
31
+ #
32
+ def self.get_version_notes
33
+ f = File.dirname( File.absolute_path( __FILE__ ) )
34
+ f = File.dirname( File.dirname( f ) )
35
+ f = File.join( f, VERSION_NOTES_FILE )
36
+ return File.read( f )
37
+ end
25
38
 
26
39
  #
27
40
  # Get the application display title.
@@ -258,6 +258,7 @@ module Gloo
258
258
  platform = TTY::Platform.new
259
259
  return 'open' if platform.mac?
260
260
  return 'xdg-open' if platform.linux?
261
+ return 'Start-Process' if platform.windows?
261
262
 
262
263
  return nil
263
264
  end
@@ -140,7 +140,8 @@ module Gloo
140
140
 
141
141
  cmd = Gloo::Core::GlooSystem.open_for_platform
142
142
  cmd_with_param = "#{cmd} \"#{value}\""
143
- `#{cmd_with_param}`
143
+ # `#{cmd_with_param}`
144
+ exec cmd_with_param
144
145
  end
145
146
 
146
147
  end
@@ -25,8 +25,13 @@ module Gloo
25
25
  cmd = expr.evaluate
26
26
  @engine.log.debug "starting cmd: #{cmd}"
27
27
 
28
- pid = fork { exec( cmd ) }
29
- Process.wait pid
28
+ platform = TTY::Platform.new
29
+ if platform.mac?
30
+ pid = fork { exec( cmd ) }
31
+ Process.wait pid
32
+ else
33
+ exec cmd
34
+ end
30
35
 
31
36
  # pid = spawn cmd
32
37
  # Process.wait pid
@@ -10,12 +10,14 @@ module Gloo
10
10
 
11
11
  KEYWORD = 'version'.freeze
12
12
  KEYWORD_SHORT = 'v'.freeze
13
+ NOTES = 'notes'.freeze
14
+ NOTES_SHORT = 'n'.freeze
13
15
 
14
16
  #
15
17
  # Run the verb.
16
18
  #
17
19
  def run
18
- @engine.log.show Gloo::App::Info.full_version
20
+ vers_notes? ? show_vers_notes : show_vers
19
21
  end
20
22
 
21
23
  #
@@ -32,6 +34,42 @@ module Gloo
32
34
  return KEYWORD_SHORT
33
35
  end
34
36
 
37
+
38
+ # ---------------------------------------------------------------------
39
+ # Private functions
40
+ # ---------------------------------------------------------------------
41
+
42
+ private
43
+
44
+ #
45
+ # Show basic version numbers.
46
+ #
47
+ def show_vers
48
+ @engine.log.show Gloo::App::Info.full_version
49
+ @engine.log.show "\nUse `#{KEYWORD} #{NOTES}` to see version notes."
50
+ end
51
+
52
+ #
53
+ # Show version notes.
54
+ #
55
+ def show_vers_notes
56
+ @engine.log.show "Gloo version notes..."
57
+ notes = Gloo::App::Info.get_version_notes
58
+ @engine.platform.show( notes, false, true )
59
+ end
60
+
61
+ #
62
+ # Is the request to show version notes?
63
+ #
64
+ def vers_notes?
65
+ if ( @tokens.token_count > 1 ) && (
66
+ ( @tokens.last == NOTES ) || ( @tokens.last == NOTES_SHORT ) )
67
+ return true
68
+ end
69
+
70
+ return false
71
+ end
72
+
35
73
  end
36
74
  end
37
75
  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: 2.2.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Crane
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-23 00:00:00.000000000 Z
11
+ date: 2023-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -270,6 +270,7 @@ files:
270
270
  - exe/o
271
271
  - gloo.gemspec
272
272
  - lib/VERSION
273
+ - lib/VERSION_NOTES
273
274
  - lib/dependencies.rb
274
275
  - lib/gloo.rb
275
276
  - lib/gloo/app/args.rb