bunch 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bunch/directory_node.rb +9 -0
- data/lib/bunch/version.rb +1 -1
- metadata +2 -2
data/lib/bunch/directory_node.rb
CHANGED
@@ -21,6 +21,11 @@ module Bunch
|
|
21
21
|
if File.exist?(ordering_file)
|
22
22
|
ordering = YAML.load_file(ordering_file)
|
23
23
|
ordered, unordered = children.partition { |c| ordering.include?(c.name) }
|
24
|
+
|
25
|
+
(ordering - ordered.map(&:name)).each do |f|
|
26
|
+
$stderr.puts "WARNING: directory #{ full_name } has no object #{ f }"
|
27
|
+
end
|
28
|
+
|
24
29
|
ordered.sort_by { |c| ordering.index(c.name) } + unordered.sort_by(&:name)
|
25
30
|
else
|
26
31
|
children.sort_by(&:name)
|
@@ -49,6 +54,10 @@ module Bunch
|
|
49
54
|
File.basename(@root)
|
50
55
|
end
|
51
56
|
|
57
|
+
def full_name
|
58
|
+
@root
|
59
|
+
end
|
60
|
+
|
52
61
|
def write_to_file(dir)
|
53
62
|
return if filenames.count == 0
|
54
63
|
super
|
data/lib/bunch/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bunch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mime-types
|