raykit 0.0.541 → 0.0.543

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: 5bddb2c97063bd86d173ed73495bcbb9e015784790563f654faff106cb174378
4
- data.tar.gz: cc5e2f34b70a72a41ab356ab5ab4ad9a03c2fb945dde9e75ab7e7ddf5bf0d6a5
3
+ metadata.gz: 25dc28248121fe9e6fdfe7adfd70c9efd54b57aefaf7c8933548a67dcd19c6d6
4
+ data.tar.gz: 7c8aebad7fc0195c4183c10dc005aed2be71675c5f7368a18a6a90543e8e8f6d
5
5
  SHA512:
6
- metadata.gz: c1c14d602a9c751f7df8ffd726a25ec3e727a110d336c3562a27ffcd1fdcf18de15cfcaa9ed15c5c833f9a1bc42708377e2df06409a0116395e0eeff1f91740a
7
- data.tar.gz: dae31d357ef3e6e75ab31a53edabde051def520ed07bc5b1684b320518f2e539dfef98412bf5b951ff03b9f744d20a3650b2f4e1d48bbe031015fef9a5c99425
6
+ metadata.gz: 77782d30be9b691fdeaa8c9b22ea2029657c33b34cb042f048caf8abfa8bae09b3bdf7244e50a202b11d906ae4c913ee02466501b0e28f5da0a899d55e9e15f6
7
+ data.tar.gz: 6bd0e95c948d75ae32c546c81dad2de315422e83e6c087ab6e77ce2e6e8ff01ea76293114aaad9a8f809dbcd16f5ad00e91849cecfdbd4f7d33ff5efdd194cc4
@@ -75,17 +75,21 @@ module Raykit
75
75
 
76
76
  def last_modified_time
77
77
  Dir.chdir(@directory) do
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.
78
+ begin
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
+ rescue Errno::ENAMETOOLONG => e
92
+ puts "Error: #{e.message}"
89
93
  last_modified_time = Time.now # Or any other appropriate action
90
94
  end
91
95
 
data/lib/raykit/zip.rb CHANGED
@@ -40,7 +40,7 @@ module Raykit
40
40
  @include_globs.each do |include_glob|
41
41
  Dir.glob(include_glob) { |f|
42
42
  #puts "\n" + f
43
- files_to_archive << f
43
+ files_to_archive << f if File.file?(f)
44
44
  }
45
45
  end
46
46
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raykit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.541
4
+ version: 0.0.543
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow