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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7503141411c417cebfe4ce07f0c73743cb0d3d8f1106df4c44c10c002b36e21
4
- data.tar.gz: 27b7f63d682a006ad8d29708541abe0ad2684d83660d548ae4c133c025ae4137
3
+ metadata.gz: d6fbb6e93b9b2cbae04fb5c395d3c51684742e33a7ae84902a9bb0c8a37067b6
4
+ data.tar.gz: b7631a0e10684ba0d7898ee5ec3cb7a3dbd15f7b47116b220917efb19372a066
5
5
  SHA512:
6
- metadata.gz: d48ff1a6abfd6fa03cb13da0fe4f65997049f93bdd4112cadbe877971e93cf6ad46a205db7ccc9bbc3cb3a5e978772f391a936e030804273dcfbcc9f60b51755
7
- data.tar.gz: 8ddcc6251a2004df145341c3185d7d629f42c828ce3bc93dc5a85ef6e952f6baa46fcddc6ab586eebb44e8322bfe443d9b721115ded0c3a765557bbb7f7677c3
6
+ metadata.gz: 24818e0987424cbf2aa8ddd3cca0c74428bcd82d10b56837c879750d4bcb08e9bc45486970fe5b8aa442c3249ca9c2a62f9428626d55ea0c78deb3f86784bf0a
7
+ data.tar.gz: 169fea7fc799e2575b99cd3b9c2b8f1080cb7546f7cf28c784b0663994b1640ad4d1c1d2788ae925525bcdffc43df56cdc7faa00327117111a53b13665fb6ee9
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.5.0
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? ? (mi = mi.dup; mi.delete(CONTENT_MODIFICATION_KEY); mi) : mi[key].dup
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:
@@ -3,6 +3,6 @@
3
3
  module Webgen
4
4
 
5
5
  # The version of webgen.
6
- VERSION = '1.5.0'
6
+ VERSION = '1.5.1'
7
7
 
8
8
  end
@@ -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?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webgen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Leitner