Commit 4373ff56 authored by aklyachkin's avatar aklyachkin
Browse files

implemented corrections from srenatus



Signed-off-by: default avataraklyachkin <aklyachkin@gmail.com>
parent 13f79da2
...@@ -19,7 +19,7 @@ require "fileutils" ...@@ -19,7 +19,7 @@ require "fileutils"
module Omnibus module Omnibus
class FileFetcher < Fetcher class FileFetcher < Fetcher
# #
# Fetch if the local directory checksum is different than the path directory # Fetch if the local file checksum is different than the path file
# checksum. # checksum.
# #
# @return [true, false] # @return [true, false]
...@@ -29,8 +29,8 @@ module Omnibus ...@@ -29,8 +29,8 @@ module Omnibus
end end
# #
# The version identifier for this path. This is computed using the path # The version identifier for this file. This is computed using the file
# on disk to the source and the recursive shasum of that path on disk. # on disk to the source and the shasum of that file on disk.
# #
# @return [String] # @return [String]
# #
...@@ -68,7 +68,7 @@ module Omnibus ...@@ -68,7 +68,7 @@ module Omnibus
end end
# #
# The version for this item in the cache. The is the shasum of the directory # The version for this item in the cache. The is the shasum of the file
# on disk. # on disk.
# #
# This method is called *before* clean but *after* fetch. Since fetch # This method is called *before* clean but *after* fetch. Since fetch
...@@ -109,18 +109,18 @@ module Omnibus ...@@ -109,18 +109,18 @@ module Omnibus
end end
# #
# The shasum of the directory **inside** the project. # The shasum of the file **inside** the project.
# #
# @return [String] # @return [String, nil]
# #
def target_shasum def target_shasum
@target_shasum ||= digest(target_file, :sha256) @target_shasum ||= digest(target_file, :sha256)
rescue Errno::ENOENT rescue Errno::ENOENT
@target_shasum = 0 @target_shasum = nil
end end
# #
# The shasum of the directory **outside** of the project. # The shasum of the file **outside** of the project.
# #
# @return [String] # @return [String]
# #
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment