nanoc-conref-fs 0.6.0 → 0.6.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
  SHA1:
3
- metadata.gz: fdb225742e914ae1ac3f39c539c290a2c91aabf0
4
- data.tar.gz: 694937b4c238491409411370271cc9d5d061c0c3
3
+ metadata.gz: 643c54357fd0361c0123a9d722ba4894e62d5f55
4
+ data.tar.gz: 1ce617281d9e1f819fb0b2f4f6c0df22975eee2d
5
5
  SHA512:
6
- metadata.gz: 9edf0b62eb28ea4fb128303e7cb442f79b32916b6b562c08f784e09b3d4396e16043a9c96d43837f4b341d4be3a62668168c4a0335c75d42b572318040e34e27
7
- data.tar.gz: f6cbdd94a675dadc4b3dc2b91704909b415f91c718baf57a85e10e8581d665b32aa93e7f174d5bef783c41b98f4a38649cce52ed3b4a463515f9f69d629c81a2
6
+ metadata.gz: 5748f945fe9a5a3472c6755b94bf9834517b3d939e5311fd736d9fe87cfed447cdf5ce79d7e0484398bb7db844187d81cd2a411a45bf45666db7bf10fb30b69b
7
+ data.tar.gz: 485936ca60828db60518f2f12f8796b8dab8532cb0e2cb0e19a69478afe4777e7e5e377ae51818a40997abc4192f386f919a3b5e26fe2d68d440480289abbcb4
@@ -31,7 +31,6 @@ class ConrefFS < Nanoc::DataSource
31
31
 
32
32
  def self.apply_attributes(config, item, rep)
33
33
  page_vars = NanocConrefFS::Conrefifier.file_variables(config[:page_variables], item[:filename], rep)
34
-
35
34
  frontmatter_vars = { :page => page_vars }.merge(NanocConrefFS::Variables.variables[rep])
36
35
 
37
36
  unless page_vars[:data_association].nil?
@@ -47,10 +46,17 @@ class ConrefFS < Nanoc::DataSource
47
46
 
48
47
  item.attributes.each_pair do |key, value|
49
48
  if value.is_a?(Array)
50
- item[key] = value.map do |arr_v|
51
- return arr_v unless arr_v =~ NanocConrefFS::Conrefifier::SINGLE_SUB
52
- NanocConrefFS::Conrefifier.apply_liquid(arr_v, frontmatter_vars)
49
+ frontmatter = []
50
+ # tried to do this with `map` and it completely erased the attributes
51
+ # array; not sure why
52
+ value.each do |v|
53
+ frontmatter << if v =~ NanocConrefFS::Conrefifier::SINGLE_SUB
54
+ NanocConrefFS::Conrefifier.apply_liquid(v, frontmatter_vars)
55
+ else
56
+ v
57
+ end
53
58
  end
59
+ item[key] = frontmatter
54
60
  else
55
61
  if value =~ NanocConrefFS::Conrefifier::SINGLE_SUB
56
62
  value = NanocConrefFS::Conrefifier.apply_liquid(value, frontmatter_vars)
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = 'nanoc-conref-fs'
6
- spec.version = '0.6.0'
6
+ spec.version = '0.6.1'
7
7
  spec.authors = ['Garen Torikian']
8
8
  spec.email = ['gjtorikian@gmail.com']
9
9
  spec.summary = 'A Nanoc filesystem to permit using conrefs/reusables in your content.'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc-conref-fs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-17 00:00:00.000000000 Z
11
+ date: 2015-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nanoc