lib/berkshelf/locations/path_location.rb in berkshelf-3.0.0.beta4 vs lib/berkshelf/locations/path_location.rb in berkshelf-3.0.0.beta5

- old
+ new

@@ -47,9 +47,16 @@ return new_path if new_path.index('.') == 0 "./#{new_path}" end + # Valid if the path exists and is readable + # + # @return [Boolean] + def valid? + File.exist?(path) && File.readable?(path) + end + def to_hash super.merge(value: self.path) end # The string representation of this PathLocation