bridgetown-core 1.0.0.alpha9 → 1.0.0.alpha10

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: 913ec78ef91ecd5b8e9f56777878f68bcb31625c9af575597bf56a0bf025f252
4
- data.tar.gz: f1e4b3292c9f4edf1ebf0318ba2d2751d0b220dc7346536014d4328772cb1879
3
+ metadata.gz: 5b529c24ff76bbed44607ecbef4d5dd66414bded0cb8d1640cfb6945d1ae7e9c
4
+ data.tar.gz: 2522b693b676608de3546183310970d7def3e05c6bbdf5561699fc434e4b3f6d
5
5
  SHA512:
6
- metadata.gz: f8affaf97ca29c3e093bf0562259bd9d878ccc216ba63a52ceb3388cfd735b92a32add0dadb8a2b748b7ba416c5a9167c0f6983dc5705b9622fbac445f4fd352
7
- data.tar.gz: 56917b674308b501407ab2a4eb7882cc679794e895291db31f4bc80724c1d1e8cbcabd25b86784300e91b0ec3a0cc80bc8789f01730615965fe4b267b8a6570f
6
+ metadata.gz: a628d623d424930d62deebff57273a72899b6399fc6ce2114410d0b1fa31293d427df9066238646d208c2878d20686a69bce6c80db5e548bee30e1b7c0ed45e3
7
+ data.tar.gz: 53b3202f0f8858de9ae4ac123750ebe29c873c989f73a1e1a63defd96ebc20c2e7e935c3f88e2c00685fff7e4eec33190b892788331181bf5e2780869b1684dc
data/.rubocop.yml CHANGED
@@ -31,6 +31,10 @@ Performance/CollectionLiteralInLoop:
31
31
  Exclude:
32
32
  - test/test_filters.rb
33
33
 
34
+ Style/OpenStructUse:
35
+ Exclude:
36
+ - test/**/*.rb
37
+
34
38
  Style/StringConcatenation:
35
39
  Exclude:
36
40
  - test/test_apply_command.rb
@@ -53,4 +53,5 @@ Gem::Specification.new do |s|
53
53
  s.add_runtime_dependency("thor", "~> 1.1")
54
54
  s.add_runtime_dependency("tilt", "~> 2.0")
55
55
  s.add_runtime_dependency("webrick", "~> 1.7")
56
+ s.add_runtime_dependency("zeitwerk", "~> 2.5")
56
57
  end
@@ -187,7 +187,7 @@ module Bridgetown
187
187
  say_status "Done!", "Have fun writing your new #{name} plugin :)"
188
188
  say_status "Remember:", "Don't forget to rename the SamplePlugin" \
189
189
  " code identifiers and paths to your own" \
190
- " indentifer, as well as update your README " \
190
+ " indentifer, as well as update your README" \
191
191
  " and CHANGELOG files as necessary."
192
192
  end
193
193
 
@@ -38,7 +38,7 @@ module Bridgetown
38
38
  return if text.empty?
39
39
 
40
40
  src << bufvar << ".safe_append='"
41
- src << text.gsub(%r{['\\]}, '\\\\\&') # rubocop:disable Style/StringLiterals
41
+ src << text.gsub(%r{['\\]}, '\\\\\&')
42
42
  src << "'.freeze;"
43
43
  end
44
44
 
@@ -28,6 +28,16 @@ module Bridgetown
28
28
  load_path.start_with?(root_dir) && ENV["BRIDGETOWN_ENV"] != "production"
29
29
  end
30
30
 
31
+ def clear_descendants_for_reload(_cpath, value, _abspath)
32
+ unless value.is_a?(Class) && value.singleton_class < ActiveSupport::DescendantsTracker
33
+ return
34
+ end
35
+
36
+ ActiveSupport::DescendantsTracker.class_variable_get(
37
+ :@@direct_descendants
38
+ )[value.superclass]&.reject! { _1 == value }
39
+ end
40
+
31
41
  def setup_loaders(autoload_paths = []) # rubocop:todo Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity
32
42
  (autoload_paths.presence || config.autoload_paths).each do |load_path|
33
43
  if @loaders.key?(load_path)
@@ -49,6 +59,7 @@ module Bridgetown
49
59
 
50
60
  loader.collapse(collapsed_path)
51
61
  end
62
+ loader.on_unload(&method(:clear_descendants_for_reload)) # rubocop:disable Performance/MethodObjectAsBlock
52
63
  Bridgetown::Hooks.trigger :loader, :pre_setup, loader, load_path
53
64
  loader.setup
54
65
  loader.eager_load if config.eager_load_paths.include?(load_path)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bridgetown
4
- VERSION = "1.0.0.alpha9"
4
+ VERSION = "1.0.0.alpha10"
5
5
  CODE_NAME = "Pearl"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha9
4
+ version: 1.0.0.alpha10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-12 00:00:00.000000000 Z
11
+ date: 2021-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -332,6 +332,20 @@ dependencies:
332
332
  - - "~>"
333
333
  - !ruby/object:Gem::Version
334
334
  version: '1.7'
335
+ - !ruby/object:Gem::Dependency
336
+ name: zeitwerk
337
+ requirement: !ruby/object:Gem::Requirement
338
+ requirements:
339
+ - - "~>"
340
+ - !ruby/object:Gem::Version
341
+ version: '2.5'
342
+ type: :runtime
343
+ prerelease: false
344
+ version_requirements: !ruby/object:Gem::Requirement
345
+ requirements:
346
+ - - "~>"
347
+ - !ruby/object:Gem::Version
348
+ version: '2.5'
335
349
  description: Bridgetown is a Webpack-aware, Ruby-powered static site generator for
336
350
  the modern Jamstack era
337
351
  email: maintainers@bridgetownrb.com