build-files 1.4.1 → 1.4.2
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 +4 -4
- data/lib/build/files/path.rb +4 -2
- data/lib/build/files/state.rb +13 -10
- data/lib/build/files/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 227e24df878d95517873d1f07ecc789cff1320ad76090f1da90b3273f46c901e
|
4
|
+
data.tar.gz: f086ae85dcabc453cb5ee6155af0d6357db47d828eb0b7733461ecd2065b97d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce4cf1a75166c6cfa4acf0703b05e727c3ec2422ee1f29abfc11c3046f9ede6d6460a314ea449b9346bff2f352c137c2bb0d1f061b34ef71ecfda448020ee79e
|
7
|
+
data.tar.gz: 7bcc9d126cf37ae30527b908c0f0f4f799f85eb0ea83ff4dd588393c745ea587e334a6141ceadef393e2b7ca5edcb0aa0343d5f5dda8a3c70b5e38a3eb38a101
|
data/lib/build/files/path.rb
CHANGED
@@ -207,8 +207,10 @@ module Build
|
|
207
207
|
self.class.eql?(other.class) and @root.eql?(other.root) and @full_path.eql?(other.full_path)
|
208
208
|
end
|
209
209
|
|
210
|
-
|
211
|
-
|
210
|
+
include Comparable
|
211
|
+
|
212
|
+
def <=>(other)
|
213
|
+
self.to_s <=> other.to_s
|
212
214
|
end
|
213
215
|
|
214
216
|
# Match a path with a given pattern, using `File#fnmatch`.
|
data/lib/build/files/state.rb
CHANGED
@@ -138,32 +138,35 @@ module Build
|
|
138
138
|
"<State Added:#{@added} Removed:#{@removed} Changed:#{@changed} Missing:#{@missing}>"
|
139
139
|
end
|
140
140
|
|
141
|
-
# Are these files dirty with respect to the given inputs?
|
141
|
+
# Are these (output) files dirty with respect to the given inputs?
|
142
142
|
def dirty?(inputs)
|
143
|
-
self.
|
144
|
-
end
|
145
|
-
|
146
|
-
def self.dirty?(inputs, outputs)
|
147
|
-
if outputs.missing?
|
148
|
-
# puts "Output file missing: #{output_state.missing.inspect}"
|
143
|
+
if self.missing?
|
149
144
|
return true
|
150
145
|
end
|
151
146
|
|
152
147
|
# If there are no inputs or no outputs, we are always clean:
|
153
|
-
if inputs.empty? or
|
148
|
+
if inputs.empty? or self.empty?
|
154
149
|
return false
|
155
150
|
end
|
156
151
|
|
157
|
-
oldest_output_time =
|
152
|
+
oldest_output_time = self.oldest_time
|
158
153
|
newest_input_time = inputs.newest_time
|
159
154
|
|
160
155
|
if newest_input_time and oldest_output_time
|
161
156
|
# We are dirty if any inputs are newer (bigger) than any outputs:
|
162
|
-
|
157
|
+
if newest_input_time > oldest_output_time
|
158
|
+
return true
|
159
|
+
else
|
160
|
+
return false
|
161
|
+
end
|
163
162
|
end
|
164
163
|
|
165
164
|
return true
|
166
165
|
end
|
166
|
+
|
167
|
+
def self.dirty?(inputs, outputs)
|
168
|
+
outputs.dirty?(inputs)
|
169
|
+
end
|
167
170
|
end
|
168
171
|
end
|
169
172
|
end
|
data/lib/build/files/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: build-files
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rb-inotify
|