lib/dev_tasks.rb in dev_tasks-0.0.73 vs lib/dev_tasks.rb in dev_tasks-0.0.74

- old
+ new

@@ -47,21 +47,21 @@ def update self[:dependencies]=Dependencies.new if !has_key?(:dependencies) self[:artifacts]=Artifacts.new if !has_key?(:artifacts) allartifactsexist = true self[:artifacts].each{|f| allartifactsexist=false if !File.exists?(f)} - self[:oldest_artifact]=self[:artifacts].min_by { |f| File.mtime(f) } if allartifactsexist + self[:newest_artifact]=self[:artifacts].max_by { |f| File.mtime(f) } if allartifactsexist self[:commands]=Commands.new if !has_key?(:commands) self[:commands].update self[:up_to_date] = false - if(allartifactsexist && !self[:oldest_artifact].nil? && !self[:newest_src_file].nil? && File.exists?(self[:oldest_artifact]) && File.exists?(self[:newest_src_file])) - if(File.mtime(self[:oldest_artifact]) > File.mtime(self[:newest_src_file])) - self[:command_order]=['pull'] if(File.mtime(self[:oldest_artifact]) > File.mtime(self[:newest_src_file])) + if(allartifactsexist && !self[:newest_artifact].nil? && !self[:newest_src_file].nil? && File.exists?(self[:newest_artifact]) && File.exists?(self[:newest_src_file])) + if(File.mtime(self[:newest_artifact]) > File.mtime(self[:newest_src_file])) + self[:command_order]=['pull'] if(File.mtime(self[:newest_artifact]) > File.mtime(self[:newest_src_file])) self[:up_to_date]=true end - self[:oldest_artifact_mtime]=File.mtime(self[:oldest_artifact]).to_s + self[:newest_artifact_mtime]=File.mtime(self[:newest_artifact]).to_s self[:newest_src_file_mtime]=File.mtime(self[:newest_src_file]).to_s end update_tasks end