right_data 0.5.14 → 0.5.15
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.
- data/lib/FileSystemItem.rb +1 -0
- data/lib/main.rb +11 -1
- metadata +3 -3
data/lib/FileSystemItem.rb
CHANGED
data/lib/main.rb
CHANGED
|
@@ -209,7 +209,17 @@ module RightData
|
|
|
209
209
|
tree = FileSystemItem.new(prune, :parent => nil)
|
|
210
210
|
# Mark the nodes:
|
|
211
211
|
tree.traverse do |n|
|
|
212
|
-
|
|
212
|
+
# Could keep track of empty dirs too...
|
|
213
|
+
if File.directory?(n.path)
|
|
214
|
+
# If empty dir...
|
|
215
|
+
if n.leaf?
|
|
216
|
+
n.ignorable = true
|
|
217
|
+
n.parent.increment_ignorable_children
|
|
218
|
+
next false # Don't bother, no kids
|
|
219
|
+
else
|
|
220
|
+
next true
|
|
221
|
+
end
|
|
222
|
+
end
|
|
213
223
|
count += 1
|
|
214
224
|
if ignore_test(n.path)
|
|
215
225
|
n.ignorable = true
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: right_data
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 21
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 5
|
|
9
|
-
-
|
|
10
|
-
version: 0.5.
|
|
9
|
+
- 15
|
|
10
|
+
version: 0.5.15
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Jonathan Siegel
|