bookshop-array-structures 1.4.7 → 1.6.1
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 +4 -4
- data/lib/bookshop-array-structures.rb +12 -6
- data/lib/bookshop-array-structures/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e016f11ca04b0775464f53babe0820e58b83718a16ec4f224cacea8da3dedd42
|
|
4
|
+
data.tar.gz: e5d3aaf4e8f513b8e7fad77c54d60749f14b3dcb32bd7d7201060d8b14c498e5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0b9b88aefaa1c26206102ea822c9d43c58012488ecde7e454bf67e43a55c4942be3cd790bb312e1dad42e82ab2d99b941336b2343e2e85ca1565a4aa89243e7
|
|
7
|
+
data.tar.gz: 7d0c2f8005406396fb20923d4f4fe4391d96ff0fca9fd282653fa1fe0b09a4d0a67cf6e861f730c78187e8a1d75b986c5cceed5ff141cacf8c02b998376316ac
|
|
@@ -90,14 +90,10 @@ module Bookshop
|
|
|
90
90
|
return result
|
|
91
91
|
end
|
|
92
92
|
|
|
93
|
-
def self.
|
|
94
|
-
base_path = "_bookshop/components/"
|
|
95
|
-
if !site.theme.nil?
|
|
96
|
-
base_path = site.theme.root + "/_bookshop/components/"
|
|
97
|
-
end
|
|
93
|
+
def self.build_from_location(base_path, site)
|
|
98
94
|
site.config["_select_data"] ||= {}
|
|
99
95
|
site.config["_array_structures"] ||= {}
|
|
100
|
-
puts "📚 Parsing Stories
|
|
96
|
+
puts "📚 Parsing Stories from #{base_path}"
|
|
101
97
|
Dir.glob("**/*.stories.{toml,tml,tom,tm}", base: base_path).each do |f|
|
|
102
98
|
begin
|
|
103
99
|
component = TomlRB.load_file(base_path + f)
|
|
@@ -119,6 +115,16 @@ module Bookshop
|
|
|
119
115
|
end
|
|
120
116
|
}
|
|
121
117
|
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
def self.build_array_structures(site)
|
|
121
|
+
base_paths = [site.source + '/_bookshop/components/']
|
|
122
|
+
if !site.theme.nil?
|
|
123
|
+
base_paths.push(site.theme.root + "/_bookshop/components/")
|
|
124
|
+
end
|
|
125
|
+
base_paths.each do |base_path|
|
|
126
|
+
build_from_location(base_path, site)
|
|
127
|
+
end
|
|
122
128
|
puts "✅ Finshed Parsing Stories"
|
|
123
129
|
#puts site.config["_array_structures"].inspect
|
|
124
130
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bookshop-array-structures
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tate
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-01-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|