raykit 0.0.542 → 0.0.543
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 +4 -4
- data/lib/raykit/git/directory.rb +12 -13
- data/lib/raykit/zip.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25dc28248121fe9e6fdfe7adfd70c9efd54b57aefaf7c8933548a67dcd19c6d6
|
4
|
+
data.tar.gz: 7c8aebad7fc0195c4183c10dc005aed2be71675c5f7368a18a6a90543e8e8f6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77782d30be9b691fdeaa8c9b22ea2029657c33b34cb042f048caf8abfa8bae09b3bdf7244e50a202b11d906ae4c913ee02466501b0e28f5da0a899d55e9e15f6
|
7
|
+
data.tar.gz: 6bd0e95c948d75ae32c546c81dad2de315422e83e6c087ab6e77ce2e6e8ff01ea76293114aaad9a8f809dbcd16f5ad00e91849cecfdbd4f7d33ff5efdd194cc4
|
data/lib/raykit/git/directory.rb
CHANGED
@@ -75,20 +75,19 @@ module Raykit
|
|
75
75
|
|
76
76
|
def last_modified_time
|
77
77
|
Dir.chdir(@directory) do
|
78
|
-
|
79
78
|
begin
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
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
|
92
91
|
rescue Errno::ENAMETOOLONG => e
|
93
92
|
puts "Error: #{e.message}"
|
94
93
|
last_modified_time = Time.now # Or any other appropriate action
|
data/lib/raykit/zip.rb
CHANGED