contentfs 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e31d3c4cb4c0ffab42607cb9f3c4cc156707a66b399fc03f9ea499940cb95ccf
4
- data.tar.gz: 5fa367925ffaa833aa5aeba306865fe85132cb8ad72e0b4772640714e18433de
3
+ metadata.gz: 5386e4d1a1ef23527ec457ecb544d4d36d02e44811fe81f87db93f4188d82145
4
+ data.tar.gz: f44614daf6d97aabd4d83a0e2339dd8d20e19d742b8b8403c37fc2967dd40925
5
5
  SHA512:
6
- metadata.gz: 72bdcb70dd4901bf9a20a3ac3f21aefb36b74d1b9af55e16204376a001bdb27e259b04d4cccc5082f3a737f92ea844aa9c8b4941420282526df8cb627ef0b0eb
7
- data.tar.gz: c4af486c19311a43f14d328c65094a3a8106e9d82004fb59efc7105c66d5324ea88f3afa90b59db3ce6d61496d120b4b0f7b61b76ed70998592186d5c7849c6c
6
+ metadata.gz: 39ee593b9c158d2093d5a8bc59a8d8510adb8a206d4b786a0465347e79f12323806765be999be8ad7fd14bccb4e32134696c1f851fa466a1a515d3b44d7ecc63
7
+ data.tar.gz: f1ab2b7a9cc994b5d91cef392fa8d4a4c1bedaac69428ceb9552143b7f969391ec32a16ae1240c66da616a80440945bfae9f8a30e010bcd47f2f36f7aa89e3ef
@@ -1,3 +1,9 @@
1
+ ## v0.3.0
2
+
3
+ *unreleased*
4
+
5
+ * `chg` [#8](https://github.com/metabahn/contentfs/pull/8) Load database content from _content to avoid collisions ([bryanp](https://github.com/bryanp))
6
+
1
7
  ## v0.2.1
2
8
 
3
9
  *unreleased*
@@ -40,6 +40,12 @@ module ContentFS
40
40
  {}
41
41
  end
42
42
 
43
+ content_path = path.join.glob("_content.*")[0]
44
+
45
+ @content = if content_path&.exist?
46
+ Content.load(content_path, metadata: @metadata, namespace: @namespace)
47
+ end
48
+
43
49
  children, nested = {}, {}
44
50
  Pathname.new(path).glob("*") do |path|
45
51
  next if path.basename.to_s.start_with?("_")
@@ -50,11 +56,7 @@ module ContentFS
50
56
  else
51
57
  content = Content.load(path, metadata: @metadata, namespace: @namespace)
52
58
 
53
- if content.slug == :content
54
- @content = content
55
- else
56
- children[content.slug] = content
57
- end
59
+ children[content.slug] = content
58
60
  end
59
61
  end
60
62
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ContentFS
4
- VERSION = "0.2.1"
4
+ VERSION = "0.3.0"
5
5
 
6
6
  def self.version
7
7
  VERSION
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contentfs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Powell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-16 00:00:00.000000000 Z
11
+ date: 2020-11-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A structured content file system.
14
14
  email: bryan@metabahn.com