raykit 0.0.529 → 0.0.530
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
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96716c7f61b07fb164b0b46e0d311db2baa16a154a0a8702c36b5d0d918a7599
|
4
|
+
data.tar.gz: 325a4f483ebad6696985b2b973eaa3d11dd82a5be9b66c044bcc9bb2a6872ff9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 580ab783b016b59b7266b3bfbaf135b80edf2701ce9a401519393fad72e6686bba168069a69c88aeed37d62db2296b2ba4df609821d7e569e527be2f007c4e79
|
7
|
+
data.tar.gz: 2bb2d7a887104afbc6f303fde18ab62a4da6a6a2f05608727f7299da415e7b9b1b8d9f51a9591966e8e254bfeb24572f7213d5a2de8a4cd4553e0f617d010137
|
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
|
|
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.530
|
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-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
requirements: []
|
154
|
-
rubygems_version: 3.
|
154
|
+
rubygems_version: 3.3.7
|
155
155
|
signing_key:
|
156
156
|
specification_version: 4
|
157
157
|
summary: ruby gem to support rake ci/cd tasks
|