bridgetown-builder 0.18.5 → 0.19.3

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: 338212d970bacb2c8cb998ff7c60a9f1372f34880ae9009224f8c493fbd3dce7
4
- data.tar.gz: 1b911ea5c09e6051b6472e808b585d127ce9405d47288661a254074e29cb1981
3
+ metadata.gz: e6f41b4cde425bebbf974bc31e3879999481cfd598cee555cdb411fee5bc04af
4
+ data.tar.gz: 85b1733da9b7c11ade8b357db2ea46c44dd9d70c8c0f25ea186f59e3a469d154
5
5
  SHA512:
6
- metadata.gz: 798153f59a971fec7e3804107a7fd2e1b7b39297f235975984489aa806bb5029fbc2b138e9658eb49c29c5c23d086dce03fd7fa3e6d2adce367094f95504dbea
7
- data.tar.gz: 86710570940e5870dca8c5f6f050e59f0ce1739ede4b21d95fffdebbb0cd2d35b12c253fe18753fde13b46b32f35223099b2cb4b64abc93e6f9c293cf22073e8
6
+ metadata.gz: ff71b2ece4c823ad51b84303acd6429a6f4f82aa8d68c2a5a5822ca96ce8d4ea95063a5c4c1359634c3597bd18018da3c874b6d3c246203d8dd18711c3da5df7
7
+ data.tar.gz: 91e7a452d285f7a0fd7f6a8300ed8ffe47981b469ee09bf629263f4d804889740e14849c966a6aaf88d8a365586c4ab4f5e6fdc94608f4b49c17a5a148a749a6
@@ -3,6 +3,8 @@
3
3
  module Bridgetown
4
4
  # Superclass for a website's SiteBuilder abstract class
5
5
  class Builder < Bridgetown::Builders::PluginBuilder
6
+ extend ActiveSupport::DescendantsTracker
7
+
6
8
  class << self
7
9
  def register
8
10
  Bridgetown::Hooks.register_one :site, :pre_read, reloadable: false do |site|
@@ -21,25 +23,8 @@ module Bridgetown
21
23
  name
22
24
  end
23
25
 
24
- def self.inherited(const)
25
- (@children ||= Set.new).add const
26
- catch_inheritance(const) do |const_|
27
- catch_inheritance(const_)
28
- end
29
- end
30
-
31
- def self.catch_inheritance(const)
32
- const.define_singleton_method :inherited do |const_|
33
- (@children ||= Set.new).add const_
34
- yield const_ if block_given?
35
- end
36
- end
37
-
38
26
  def self.descendants
39
- @children ||= Set.new
40
- out = @children.map(&:descendants)
41
- out << self unless ["SiteBuilder", "Bridgetown::Builder"].include?(name)
42
- Set.new(out).flatten
27
+ super.reject { |klass| ["SiteBuilder"].include?(klass.name) }
43
28
  end
44
29
  end
45
30
  end
@@ -4,16 +4,16 @@ module Bridgetown
4
4
  module Builders
5
5
  module DSL
6
6
  module Liquid
7
- def liquid_filter(filter_name, method_name = nil, &block)
7
+ def liquid_filter(filter_name, method_name = nil, filters_scope: false, &block)
8
8
  builder_self = self
9
9
  m = Module.new
10
10
 
11
- if block
11
+ if block && !filters_scope
12
12
  m.define_method filter_name do |*args|
13
13
  builder_self.instance_exec(*args, &block)
14
14
  end
15
- elsif method_name
16
- block = method(method_name)
15
+ else
16
+ block = method(method_name) if method_name
17
17
  m.define_method filter_name, &block
18
18
  end
19
19
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.5
4
+ version: 0.19.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-09 00:00:00.000000000 Z
11
+ date: 2021-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bridgetown-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.18.5
19
+ version: 0.19.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.18.5
26
+ version: 0.19.3
27
27
  description:
28
28
  email: maintainers@bridgetownrb.com
29
29
  executables: []