webgen 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/webgen/item_tracker/node_meta_info.rb +7 -1
- data/lib/webgen/version.rb +1 -1
- data/test/webgen/item_tracker/test_node_meta_info.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6fbb6e93b9b2cbae04fb5c395d3c51684742e33a7ae84902a9bb0c8a37067b6
|
4
|
+
data.tar.gz: b7631a0e10684ba0d7898ee5ec3cb7a3dbd15f7b47116b220917efb19372a066
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24818e0987424cbf2aa8ddd3cca0c74428bcd82d10b56837c879750d4bcb08e9bc45486970fe5b8aa442c3249ca9c2a62f9428626d55ea0c78deb3f86784bf0a
|
7
|
+
data.tar.gz: 169fea7fc799e2575b99cd3b9c2b8f1080cb7546f7cf28c784b0663994b1640ad4d1c1d2788ae925525bcdffc43df56cdc7faa00327117111a53b13665fb6ee9
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.5.
|
1
|
+
1.5.1
|
@@ -35,7 +35,13 @@ module Webgen
|
|
35
35
|
|
36
36
|
def item_data(alcn, key = nil) #:nodoc:
|
37
37
|
mi = @website.tree[alcn].meta_info
|
38
|
-
key.nil?
|
38
|
+
if key.nil? && mi['modified_at_in_dest_path']
|
39
|
+
mi
|
40
|
+
elsif key.nil?
|
41
|
+
(mi = mi.dup; mi.delete(CONTENT_MODIFICATION_KEY); mi)
|
42
|
+
else
|
43
|
+
mi[key].dup
|
44
|
+
end
|
39
45
|
end
|
40
46
|
|
41
47
|
def item_changed?(iid, old_data) #:nodoc:
|
data/lib/webgen/version.rb
CHANGED
@@ -24,6 +24,14 @@ class TestNodeMetaInfo < Minitest::Test
|
|
24
24
|
refute_same(@node.meta_info, @obj.item_data('alcn'))
|
25
25
|
assert_equal('value', @obj.item_data('alcn', 'key'))
|
26
26
|
refute_same(@node.meta_info['key'], @obj.item_data('alcn', 'key'))
|
27
|
+
|
28
|
+
@node.define_singleton_method(:meta_info) { {'key' => 'value', 'modified_at' => 5} }
|
29
|
+
assert_equal({'key' => 'value'}, @obj.item_data('alcn'))
|
30
|
+
@node.define_singleton_method(:meta_info) do
|
31
|
+
{'key' => 'value', 'modified_at' => 5, 'modified_at_in_dest_path' => true}
|
32
|
+
end
|
33
|
+
assert_equal({'key' => 'value', 'modified_at' => 5, 'modified_at_in_dest_path' => true},
|
34
|
+
@obj.item_data('alcn'))
|
27
35
|
end
|
28
36
|
|
29
37
|
def test_item_changed?
|