scribo 1.0.42 → 1.0.43

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: dfdf854f4af1cbef3ce4d1f082fac4e96ab0c88b2145c0cead51b36a4f63054a
4
- data.tar.gz: c9b6463328bb7e409e105a8f776526b409fea24407f06059b4e358a02c6e6e26
3
+ metadata.gz: '029c283ec7d69ebae9acf0a9d55b9ab7053236f88614709b702623e19818e8c0'
4
+ data.tar.gz: 3710cc12afb19430cfc65e444e4d2e8cd4a957e97aa24353e7396f731813b02a
5
5
  SHA512:
6
- metadata.gz: 2a5e675b556debd8974f7c773d3296ddc7ce1b809edc5a4f15a420c08be675db2069ea1d1a8cf39e14294ef7ad26229f491a6d6b1fc5464a55df3c037f845857
7
- data.tar.gz: 926c0bcb1ef6ec1035386f7976a9232381ca26e4f60974924d0169f8a0457ffdaeca50be4da39607bf78f68df9d06f96fff1a5f155f1832352a4dc10354a3119
6
+ metadata.gz: 0363b6af84320b2d2d4afa71afde47beb9e5eb350d3ad61811ce934ac3ee8375b865088b092a43dc6434e721d0e9c046e3da964a25169d490dd0463144e9daf8
7
+ data.tar.gz: 9ad6d69c2813d30ce000fbdf2ef92f12b7a2b9b31c9c9f6068c137861302491518aabd6097274ac73e8158ddf86e5bd15ef8cd5fb74eb1681805a5ebfcd80631
data/Gemfile.lock CHANGED
@@ -9,9 +9,9 @@ GIT
9
9
  PATH
10
10
  remote: .
11
11
  specs:
12
- scribo (1.0.38)
13
- ancestry
12
+ scribo (1.0.42)
14
13
  babel-transpiler (~> 0.7)
14
+ closure_tree
15
15
  down (~> 5.2)
16
16
  importmap-rails
17
17
  kaminari
@@ -107,8 +107,6 @@ GEM
107
107
  tzinfo (~> 2.0)
108
108
  addressable (2.8.6)
109
109
  public_suffix (>= 2.0.2, < 6.0)
110
- ancestry (4.3.3)
111
- activerecord (>= 5.2.6)
112
110
  ansi (1.5.0)
113
111
  ast (2.4.2)
114
112
  auxilium (3.0.24)
@@ -135,6 +133,9 @@ GEM
135
133
  rack-test (>= 0.6.3)
136
134
  regexp_parser (>= 1.5, < 3.0)
137
135
  xpath (~> 3.2)
136
+ closure_tree (7.4.0)
137
+ activerecord (>= 4.2.10)
138
+ with_advisory_lock (>= 4.0.0)
138
139
  coderay (1.1.3)
139
140
  concurrent-ruby (1.2.3)
140
141
  connection_pool (2.4.1)
@@ -143,7 +144,7 @@ GEM
143
144
  capybara (~> 3.0)
144
145
  ferrum (~> 0.14.0)
145
146
  date (3.3.4)
146
- down (5.4.1)
147
+ down (5.4.2)
147
148
  addressable (~> 2.8)
148
149
  drb (2.2.1)
149
150
  erubi (1.12.0)
@@ -153,7 +154,7 @@ GEM
153
154
  concurrent-ruby (~> 1.1)
154
155
  webrick (~> 1.7)
155
156
  websocket-driver (>= 0.6, < 0.8)
156
- ffi (1.16.3)
157
+ ffi (1.17.0)
157
158
  globalid (1.2.1)
158
159
  activesupport (>= 6.1)
159
160
  i18n (1.14.1)
@@ -187,19 +188,19 @@ GEM
187
188
  kramdown-parser-gfm (1.1.0)
188
189
  kramdown (~> 2.0)
189
190
  language_server-protocol (3.17.0.3)
190
- liquid (5.1.0)
191
- liquidum (1.0.17)
191
+ liquid (5.3.0)
192
+ liquidum (1.2.1)
192
193
  addressable (~> 2)
193
194
  babel-transpiler (~> 0.7)
194
195
  i18n (~> 1.8)
195
196
  kramdown (~> 2.1)
196
197
  kramdown-parser-gfm (~> 1.0)
197
- liquid (= 5.1.0)
198
+ liquid (< 5.4)
198
199
  parslet
199
200
  pg
200
201
  rails (>= 5.2)
201
202
  sassc (~> 2.2)
202
- slim-rails (~> 3.2.0)
203
+ slim-rails (~> 3.6)
203
204
  loofah (2.22.0)
204
205
  crass (~> 1.0.2)
205
206
  nokogiri (>= 1.12.0)
@@ -213,7 +214,7 @@ GEM
213
214
  method_source (1.0.0)
214
215
  mime-types (3.5.2)
215
216
  mime-types-data (~> 3.2015)
216
- mime-types-data (3.2024.0206)
217
+ mime-types-data (3.2024.0702)
217
218
  mimemagic (0.4.3)
218
219
  nokogiri (~> 1)
219
220
  rake
@@ -337,13 +338,13 @@ GEM
337
338
  pg
338
339
  rails (> 6.0)
339
340
  state_machines-activemodel
340
- slim (4.1.0)
341
- temple (>= 0.7.6, < 0.9)
342
- tilt (>= 2.0.6, < 2.1)
343
- slim-rails (3.2.0)
341
+ slim (5.2.1)
342
+ temple (~> 0.10.0)
343
+ tilt (>= 2.1.0)
344
+ slim-rails (3.6.3)
344
345
  actionpack (>= 3.1)
345
346
  railties (>= 3.1)
346
- slim (>= 3.0, < 5.0)
347
+ slim (>= 3.0, < 6.0, != 5.0.0)
347
348
  state_machines (0.6.0)
348
349
  state_machines-activemodel (0.9.0)
349
350
  activemodel (>= 6.0)
@@ -351,13 +352,13 @@ GEM
351
352
  stimulus-rails (1.3.3)
352
353
  railties (>= 6.0.0)
353
354
  stringio (3.1.0)
354
- tailwindcss-rails (2.3.0)
355
- railties (>= 6.0.0)
356
- temple (0.8.2)
355
+ tailwindcss-rails (2.6.3)
356
+ railties (>= 7.0.0)
357
+ temple (0.10.3)
357
358
  thor (1.3.1)
358
- tilt (2.0.11)
359
+ tilt (2.4.0)
359
360
  timeout (0.4.1)
360
- turbo-rails (2.0.4)
361
+ turbo-rails (2.0.5)
361
362
  actionpack (>= 6.0.0)
362
363
  activejob (>= 6.0.0)
363
364
  railties (>= 6.0.0)
@@ -369,6 +370,9 @@ GEM
369
370
  websocket-driver (0.7.6)
370
371
  websocket-extensions (>= 0.1.0)
371
372
  websocket-extensions (0.1.5)
373
+ with_advisory_lock (5.1.0)
374
+ activerecord (>= 6.1)
375
+ zeitwerk (>= 2.6)
372
376
  xpath (3.2.0)
373
377
  nokogiri (~> 1.8)
374
378
  zeitwerk (2.6.13)
@@ -379,6 +383,7 @@ PLATFORMS
379
383
  DEPENDENCIES
380
384
  auxilium (~> 3.0)
381
385
  capybara
386
+ closure_tree
382
387
  cuprite
383
388
  jbuilder
384
389
  key_path!
@@ -9,6 +9,8 @@ module Scribo
9
9
  belongs_to :site, class_name: 'Site', foreign_key: 'scribo_site_id'
10
10
  has_one_attached :asset
11
11
 
12
+
13
+
12
14
  validate :post_path
13
15
  validate :layout_cant_be_current_content
14
16
 
@@ -18,6 +20,8 @@ module Scribo
18
20
  after_save -> { store_full_path(true) }
19
21
  after_update -> {store_full_path(true)}
20
22
 
23
+
24
+
21
25
  scope :layouts, -> { in_folder('_layouts') }
22
26
  scope :posts, -> { in_folder('_posts') }
23
27
  scope :pages, -> { not_in_folder('_posts').restricted.where(kind: 'text') }
@@ -301,7 +305,7 @@ module Scribo
301
305
  elsif part_of_collection? && site.output_collection?(collection_name)
302
306
  result = "#{collection_name}/#{path}"
303
307
  else
304
- result = (ancestors.map(&:path) << path).join('/')
308
+ result = (ancestors.reverse.map(&:path) << path).join('/')
305
309
  end
306
310
  result = '/' + result unless result.start_with?('/')
307
311
 
@@ -313,9 +317,8 @@ module Scribo
313
317
  end
314
318
  end
315
319
 
316
-
317
320
  def tree_path
318
- result = (ancestors.map(&:path) << path).join('/')
321
+ result = (ancestors.reverse.map(&:path) << path).join('/')
319
322
  result = '/' + result unless result.start_with?('/')
320
323
  result
321
324
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Scribo
4
- VERSION = '1.0.42'
4
+ VERSION = '1.0.43'
5
5
  end
data/scribo.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
21
  end
22
22
 
23
- s.add_dependency 'ancestry'
23
+ s.add_dependency 'closure_tree'
24
24
  s.add_dependency 'babel-transpiler', '~> 0.7'
25
25
  s.add_dependency 'down', '~> 5.2'
26
26
  s.add_dependency 'kaminari'
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scribo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.42
4
+ version: 1.0.43
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom de Grunt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-27 00:00:00.000000000 Z
11
+ date: 2024-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: ancestry
14
+ name: closure_tree
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="