raykit 0.0.529 → 0.0.531

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: 94b511322d47c513a6b188196a5d808f622ff53e8bc563a97d686f5f8de87674
4
- data.tar.gz: 8d7dc59b401a490d5cce51d349e11957e0660abf25762cf25f9c36beadb669e2
3
+ metadata.gz: 49562942373010a22018091a25fb97b8d238545e80c9b884c642579a3ecf1fa1
4
+ data.tar.gz: 9bdbc7cbdc9c298ea59a96aefe2c9bb028058cebaa698774a7e6361c0b47c02a
5
5
  SHA512:
6
- metadata.gz: b824527d135832435e855c11bf47462cacb713aeb86edd38f649ae5944ad5d8b83c7802e349796df6074fa4121e8cea4a124f6c395e9308a6dbb8c65d1afaac0
7
- data.tar.gz: 154df02f73ccf4ce0b9844611d22be35dc5665002e90349413db03d6ef36f286e284d3ac4d6f684f0e79cb9fe7eccb6d1f2b292873d1b20a1636a78d5d4fd36b
6
+ metadata.gz: 499e8974f7bec79cbc5e66b17ef456efa92cb6f0abd6fa8981a38cae477b59082b86ebb1f454caf6161826c170ac0a8a4005ebb9f6563405e199de2498587dd9
7
+ data.tar.gz: c15f6ff7bc07e3bc2ba5cf472bf376c4940cfb0477a55970d4311ec3ffe6b2a18698d0d8a854f87ee0069f4ae87406068626a963bac71054e1738912a3b27c60
@@ -75,7 +75,21 @@ module Raykit
75
75
 
76
76
  def last_modified_time
77
77
  Dir.chdir(@directory) do
78
- File.mtime(Dir.glob("**/*.*").select { |f| File.file?(f) }.max_by { |f| File.mtime(f) })
78
+
79
+ # Find the most recently modified file
80
+ most_recent_file = Dir.glob("**/*.*").select { |f| File.file?(f) }.max_by { |f| File.mtime(f) }
81
+
82
+ # Use File.mtime if a file was found, otherwise handle the nil case
83
+ if most_recent_file
84
+ last_modified_time = File.mtime(most_recent_file)
85
+ else
86
+ # Handle the case where no files are found. This could be setting a default value,
87
+ # raising a custom error, or any other appropriate action depending on your needs.
88
+ # For example, setting last_modified_time to Time.now or raising a custom error.
89
+ last_modified_time = Time.now # Or any other appropriate action
90
+ end
91
+
92
+ #File.mtime(Dir.glob("**/*.*").select { |f| File.file?(f) }.max_by { |f| File.mtime(f) })
79
93
  end
80
94
  end
81
95
 
data/lib/raykit.rb CHANGED
@@ -68,6 +68,11 @@ if defined?(RAYKIT_GLOBALS)
68
68
  Raykit::TopLevel.run(command, quit_on_failure)
69
69
  end
70
70
 
71
+ def show(command)
72
+ cmd = Raykit::Command.new(command).run
73
+ puts cmd.details
74
+ end
75
+
71
76
  def try(command)
72
77
  Raykit::TopLevel.run(command, false)
73
78
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raykit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.529
4
+ version: 0.0.531
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-29 00:00:00.000000000 Z
11
+ date: 2024-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '2.5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '2.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rainbow
29
29
  requirement: !ruby/object:Gem::Requirement