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 +4 -4
- data/lib/raykit/git/directory.rb +15 -1
- data/lib/raykit.rb +5 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49562942373010a22018091a25fb97b8d238545e80c9b884c642579a3ecf1fa1
|
4
|
+
data.tar.gz: 9bdbc7cbdc9c298ea59a96aefe2c9bb028058cebaa698774a7e6361c0b47c02a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 499e8974f7bec79cbc5e66b17ef456efa92cb6f0abd6fa8981a38cae477b59082b86ebb1f454caf6161826c170ac0a8a4005ebb9f6563405e199de2498587dd9
|
7
|
+
data.tar.gz: c15f6ff7bc07e3bc2ba5cf472bf376c4940cfb0477a55970d4311ec3ffe6b2a18698d0d8a854f87ee0069f4ae87406068626a963bac71054e1738912a3b27c60
|
data/lib/raykit/git/directory.rb
CHANGED
@@ -75,7 +75,21 @@ module Raykit
|
|
75
75
|
|
76
76
|
def last_modified_time
|
77
77
|
Dir.chdir(@directory) do
|
78
|
-
|
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
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.
|
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-
|
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.
|
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.
|
26
|
+
version: '2.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rainbow
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|