rscons 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/rscons/cache.rb +5 -1
- data/lib/rscons/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTUxZTAyODAxMDQ0ZjJlODQxYThmN2M2Y2ZiOWMxNzAyNjBlZDJiNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDIzM2M0YzQ1ODczZWI1YWI1YmM3MTI3ZDVlMTQ0NGUwYmUyN2YwNg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzRlZDkxZDNhNWYwOWU3OTgwYjIwYmZlOGY2YmRlOTAxNmVmMzVhMDMyYTY0
|
10
|
+
M2ZiZjhlMDRkOTQ0MTljOTgyNGMzNDE5NDQ0ODk3ZTYwOTUxMThlZmE5YzE0
|
11
|
+
MWU3Y2ZjODkyOGRjYWYzM2ZlZDU4ODJlNzRkNTdjZDQ4Nzc1NDU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NThmYjIxNDYwNjkxZmU1NjBkYjMxYzE3MWIzMDdhNzU2YWMzMzg3ZTM5ZjY1
|
14
|
+
NjBhNjAxNmZkYjg1MzA1NWIxOTA5MmQ3MTRkOGM1ODVlN2VhN2EyYzZhMWNj
|
15
|
+
M2M4ODU4YzJhNzBlNmMwNTM4NDlhNzI0ZjNmYzk4OTY3ZTA3ZDM=
|
data/lib/rscons/cache.rb
CHANGED
@@ -80,6 +80,7 @@ module Rscons
|
|
80
80
|
# @return true value if the target is up to date, meaning that:
|
81
81
|
# - the target exists on disk
|
82
82
|
# - the cache has information for the target
|
83
|
+
# - the target's checksum matches its checksum when it was last built
|
83
84
|
# - the command used to build the target is the same as last time
|
84
85
|
# - all dependencies listed are also listed in the cache, or, if
|
85
86
|
# :strict_deps was given in options, the list of dependencies is
|
@@ -93,6 +94,9 @@ module Rscons
|
|
93
94
|
# target must be registered in the cache
|
94
95
|
return false unless @cache[:targets].has_key?(target)
|
95
96
|
|
97
|
+
# target must have the same checksum as when it was built last
|
98
|
+
return false unless @cache[:targets][target][:checksum] == lookup_checksum(target)
|
99
|
+
|
96
100
|
# command used to build target must be identical
|
97
101
|
return false unless @cache[:targets][target][:command] == command
|
98
102
|
|
@@ -141,7 +145,7 @@ module Rscons
|
|
141
145
|
# Calculate and return a file's checksum
|
142
146
|
# @param file [String] The file name.
|
143
147
|
def calculate_checksum(file)
|
144
|
-
@lookup_checksums[file] = Digest::MD5.hexdigest(File.read(file)).encode(__ENCODING__) rescue ''
|
148
|
+
@lookup_checksums[file] = Digest::MD5.hexdigest(File.read(file, {mode: 'rb'})).encode(__ENCODING__) rescue ''
|
145
149
|
end
|
146
150
|
end
|
147
151
|
end
|
data/lib/rscons/version.rb
CHANGED