contentfs 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
  SHA256:
3
- metadata.gz: 70692d20be1e5c1f76afe4397718ceadc6c71a3457c2e408ba35ae0e11d40611
4
- data.tar.gz: cddc23e982270efde7b2e0e9102b9d44ec71e2bd5c2863a98904b104ce1d9261
3
+ metadata.gz: 77679e7cfe4c3077753ec0b425edec31318c17272070713a4831f80b6878de3e
4
+ data.tar.gz: b07a87ccbfa7e5adcfbd193076af48ed7109b0240224c68e640c2189058c41c0
5
5
  SHA512:
6
- metadata.gz: 4677403196321b02096ea81e982e5499602b7f333cf826780fd407634b81da37b625fa1a0c1bbeb51c14dcb67dcc1cfbdc6fa6078394411464de3d8d1c12a9f7
7
- data.tar.gz: b6caaa759c1ea97d5ab945327b2dee30ba8930431cbe74bc79a3a6aad1bf8fe8bb3b7f830d7cbafc6d95c89213adb0468687589677ce92787a1d27467b0898df
6
+ metadata.gz: 97667d012f6b9b94dfdf74281ce53bf47966b7bf2da4e375c6d433ef7917f6f906ea5e7497424aaac2bb95fd65ab8149c8d429749a14cc5389b8fd1e2b0d7deb
7
+ data.tar.gz: 65baae29aa627cb17ec18e657955dca9caad84eacff8a3ff2ce0c85696eeeb235820f3975a76dc66610c706605c2a892c64420ad775a977f1b0eef2a8c238fe6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [v0.6.1](https://github.com/metabahn/contentfs/releases/tag/v0.6.1)
2
+
3
+ *released on 2021-04-02*
4
+
5
+ * `fix` [#13](https://github.com/metabahn/contentfs/pull/13) Resolve includes after rendering ([bryanp](https://github.com/bryanp))
6
+
1
7
  ## [v0.6.0](https://github.com/metabahn/contentfs/releases/tag/v0.6.0)
2
8
 
3
9
  *released on 2021-04-02*
@@ -44,19 +44,23 @@ module ContentFS
44
44
  end
45
45
 
46
46
  def render
47
- working_content = @content.dup
47
+ if @format && (renderer = Renderers.resolve(@format))
48
+ resolve_includes(renderer.render(@content))
49
+ else
50
+ resolve_includes(to_s)
51
+ end
52
+ end
48
53
 
49
- @content.scan(INCLUDE_REGEXP) do |match|
54
+ private def resolve_includes(content)
55
+ working_content = content.dup
56
+
57
+ content.scan(INCLUDE_REGEXP) do |match|
50
58
  if (include = @database.find_include(match[0]))
51
59
  working_content.gsub!($~.to_s, include.render)
52
60
  end
53
61
  end
54
62
 
55
- if @format && (renderer = Renderers.resolve(@format))
56
- renderer.render(working_content)
57
- else
58
- to_s
59
- end
63
+ working_content
60
64
  end
61
65
 
62
66
  private def parse_metadata(content)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ContentFS
4
- VERSION = "0.6.0"
4
+ VERSION = "0.6.1"
5
5
 
6
6
  def self.version
7
7
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contentfs
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
  - Bryan Powell