bookshop-array-structures 1.4.7 → 1.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: 7c0a35b6a33b5ee4c41a6613b606215917ad4d8f96428e7a2c65a103cbd40bf5
4
- data.tar.gz: 62fd2204b8c1686bc9ecc62b3854fbeb74503f1ebc81c64e832ba43ddadda1ad
3
+ metadata.gz: e016f11ca04b0775464f53babe0820e58b83718a16ec4f224cacea8da3dedd42
4
+ data.tar.gz: e5d3aaf4e8f513b8e7fad77c54d60749f14b3dcb32bd7d7201060d8b14c498e5
5
5
  SHA512:
6
- metadata.gz: 72d4fa070d5331c027d10a54c444c5042d8cf5eebc91fac52a01e7af925213f13243e71f5942044a9a4ef3ca1ff82655f743ac5f90c7235155a32e3c9ee6436b
7
- data.tar.gz: 27919b0a39c3495ef05121344c238a0e15a513f78bfdb60497f9744dc371771768f79fe71a5d38cec0e10d8208468109dae80cf915d8cdab404c62a52fd3be4d
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.build_array_structures(site)
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
@@ -1,5 +1,5 @@
1
1
  module Bookshop
2
2
  module Arraystructures
3
- VERSION = "1.4.7"
3
+ VERSION = "1.6.1"
4
4
  end
5
5
  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.7
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: 2020-10-29 00:00:00.000000000 Z
11
+ date: 2021-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll