bridgetown-core 2.0.3 → 2.0.4

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: b45ea1fd5b5463485accf6d282e1a849007c1716eb70d4ab75672460ade5e4c5
4
- data.tar.gz: 55f0f1bf05da8aecef58bf07038ab081cab6c050121e16acfd3bfe22ab93770b
3
+ metadata.gz: 2170cd474fa9f4cf55cadfe90530a0c10ef30deb31a70f1fdbfdbc4ea966b336
4
+ data.tar.gz: 490b8ac7437faa89a7ae4fbe412926067517d8732061bd5184a116819095b681
5
5
  SHA512:
6
- metadata.gz: bf8b244b7f8c807588b542cbaa24a0f90a26c1d989390ae1e3354fefe751f483f08c5110c488155158dd8b587444523941e3d7d6fc3d72fa1babe77f62b3a6f3
7
- data.tar.gz: 2b2f544fcf8c80be8dc352c78db6553773007a6fe5daed82fefd9491507f029ef3057eb27e4809a9ac9afc3dc1997f500d6e99b5f58b38c04b9f2481391c4912
6
+ metadata.gz: cf816390da20818793f4cf331c5021b46aa54ff4fb4453f07e25b628a854d4b427e5a391f5d8c67decad46c363664078f20f276247eaae049d6bc4b709793e72
7
+ data.tar.gz: 0c8bee0f54f0c556754cabfbe3b522d4da234b63e6a0bfee437988751d03ec4c8f4e39f9b1bcd9caf701f25c7e2dc6156980fa407d9c98cc834c65c59ac0d90c
data/.rubocop.yml CHANGED
@@ -46,3 +46,7 @@ Style/StringConcatenation:
46
46
 
47
47
  Style/SafeNavigationChainLength:
48
48
  Enabled: false
49
+
50
+ Lint/Void:
51
+ Exclude:
52
+ - test/**/*.rb
@@ -254,7 +254,7 @@ module Bridgetown
254
254
  end
255
255
 
256
256
  resources.each do |data_resource|
257
- segments = data_resource.relative_path.each_filename.to_a[1..]
257
+ segments = data_resource.relative_path.each_filename.to_a[1..].reject { _1 == "_data" }
258
258
  nested = []
259
259
  segments.each_with_index do |segment, index|
260
260
  sanitized_segment = sanitize_filename.(File.basename(segment, ".*"))
@@ -99,7 +99,7 @@ module Bridgetown
99
99
  "esbuild"
100
100
  end
101
101
 
102
- def postcss_option
102
+ def postcss_option # rubocop:disable Naming/PredicateMethod
103
103
  !options["use-sass"]
104
104
  end
105
105
 
@@ -128,7 +128,7 @@ module Bridgetown
128
128
  def load_env_and_determine_port(config, options)
129
129
  initializer_file = File.join(config.root_dir, "config", "initializers.rb")
130
130
  if File.exist?(initializer_file) &&
131
- File.read(initializer_file) =~ (%r!^[\s]*init[\s]*:dotenv!)
131
+ File.read(initializer_file) =~ %r!^\s*init\s*:dotenv!
132
132
  require "dotenv"
133
133
  Bridgetown.load_dotenv(root: config.root_dir)
134
134
  end
@@ -52,25 +52,40 @@ module Bridgetown
52
52
  raise "No component rendering engine could be found for .#{ext} templates"
53
53
  end
54
54
 
55
+ # Provide a list of potential sidebar template paths (minus extensions).
56
+ #
57
+ # @return [Array<String>]
58
+ def component_template_path_candidates
59
+ @_tmpl_path_candidates ||= begin
60
+ dirname = File.dirname(source_location)
61
+ basename = File.basename(source_location, ".*")
62
+ stripped_path = File.join(dirname, basename)
63
+
64
+ paths = []
65
+ # same-file inner classes get folders of their own. `Shared::Navbar` inside `shared.rb`
66
+ # will get `shared/navbar.erb`
67
+ if (parent_name = nested_parent&.name&.underscore) &&
68
+ (dirname.split("/").last != parent_name)
69
+ paths << File.join(dirname, parent_name, nested_name.underscore)
70
+ end
71
+
72
+ paths + [stripped_path, "#{stripped_path}.html"] # that last one is a compatibility nod
73
+ end
74
+ end
75
+
55
76
  # Find the first matching template path based on source location and extension.
56
77
  #
57
78
  # @return [String]
58
79
  def component_template_path
59
- @_tmpl_path ||= begin
60
- stripped_path = File.join(
61
- File.dirname(source_location),
62
- File.basename(source_location, ".*")
63
- )
64
- supported_template_extensions.each do |ext|
65
- test_path = "#{stripped_path}.#{ext}"
66
- break test_path if File.exist?(test_path)
67
-
68
- test_path = "#{stripped_path}.html.#{ext}"
69
- break test_path if File.exist?(test_path)
80
+ @_tmpl_path ||= component_template_path_candidates.map do |candidate|
81
+ found_path = supported_template_extensions.map do |ext|
82
+ path = "#{candidate}.#{ext}"
83
+ break path if File.exist?("#{candidate}.#{ext}")
70
84
  end
85
+ break found_path unless Array(found_path).first.nil?
71
86
  end
72
87
 
73
- unless @_tmpl_path.is_a?(String)
88
+ if Array(@_tmpl_path).first.nil?
74
89
  raise "#{name}: no matching template could be found in #{File.dirname(source_location)}"
75
90
  end
76
91
 
@@ -210,7 +225,7 @@ module Bridgetown
210
225
  (method(:call).arity.zero? ? call : nil) || _renderer.render(self)
211
226
  end
212
227
 
213
- # Typically not used but here as a compatibility nod toward ViewComponent.
228
+ # Not used by default, but subclasses may utilize it (such as callable view objects)
214
229
  def call
215
230
  nil
216
231
  end
@@ -43,10 +43,12 @@ create_file "test/test_homepage.rb" do
43
43
  require "minitest_helper"
44
44
 
45
45
  class TestHomepage < Bridgetown::Test
46
- def test_homepage
47
- html get "/"
46
+ describe "index" do
47
+ it "has a body and a head" do
48
+ html get "/"
48
49
 
49
- assert document.query_selector("body")
50
+ expect(document.query_selector("body").inner_html).must_match(/<head.*?>/)
51
+ end
50
52
  end
51
53
  end
52
54
  RUBY
@@ -63,7 +63,7 @@ module Bridgetown
63
63
  # @param ext [String] the file's extension (including the dot)
64
64
  # @param convertible [Bridgetown::Layout, Bridgetown::Resource::Base]
65
65
  # @return [Boolean] Whether the extension matches one in the list
66
- def matches(ext, _convertible = nil)
66
+ def matches(ext, _convertible = nil) # rubocop:disable Naming/PredicateMethod
67
67
  (self.class.extname_list || []).include?(ext.downcase)
68
68
  end
69
69
 
@@ -87,28 +87,34 @@ module Bridgetown
87
87
  end
88
88
  end
89
89
 
90
- def line_start(convertible) # rubocop:disable Metrics/PerceivedComplexity
91
- if convertible.is_a?(Bridgetown::Resource::Base) &&
92
- convertible.model.origin.respond_to?(:front_matter_line_count)
93
- if convertible.model.origin.front_matter_line_count.nil?
94
- 1
95
- else
96
- convertible.model.origin.front_matter_line_count + 4
97
- end
98
- elsif convertible.is_a?(Bridgetown::GeneratedPage) && convertible.original_resource
99
- res = convertible.original_resource
100
- if res.model.origin.respond_to?(:front_matter_line_count)
101
- res.model.origin.front_matter_line_count + 4
102
- else
103
- 1
104
- end
90
+ def line_start(convertible) # rubocop:disable Metrics/CyclomaticComplexity
91
+ fmlc = case convertible
92
+ when Bridgetown::Layout
93
+ convertible.front_matter_line_count
94
+ when Bridgetown::Resource::Base
95
+ convertible.model.origin.respond_to?(:front_matter_line_count) &&
96
+ convertible.model.origin.front_matter_line_count
97
+ when Bridgetown::GeneratedPage
98
+ res = convertible.original_resource
99
+ if res&.model&.origin.respond_to?(:front_matter_line_count)
100
+ res.model.origin.front_matter_line_count
101
+ end
102
+ end
103
+
104
+ if fmlc
105
+ # We add 4 because the line counts are only for the interior of the front matter and we need
106
+ # to include 2 more lines for the delimiters, plus a blank line, plus 1 to get to content
107
+ #
108
+ # That shorthand breaks down if someone authors *no* blank line after front matter, or if
109
+ # there are multiple blank lines. But those are not best practices, so we'll just fudge it.
110
+ fmlc + 4
105
111
  else
106
112
  1
107
113
  end
108
114
  end
109
115
 
110
116
  def inspect
111
- "#<#{self.class}#{self.class.extname_list ? " #{self.class.extname_list.join(", ")}" : nil}>"
117
+ "#<#{self.class}#{" #{self.class.extname_list.join(", ")}" if self.class.extname_list}>"
112
118
  end
113
119
  end
114
120
  end
@@ -10,7 +10,7 @@ module Bridgetown
10
10
  support_slots
11
11
 
12
12
  # @return [Boolean] true since it always matches.
13
- def matches(*)
13
+ def matches(*) # rubocop:disable Naming/PredicateMethod
14
14
  true
15
15
  end
16
16
 
@@ -63,13 +63,22 @@ module Bridgetown
63
63
  input :rb
64
64
  template_engine :ruby
65
65
 
66
+ # rubocop:disable Style/DocumentDynamicEvalDefinition, Style/EvalWithLocation
66
67
  def convert(content, convertible)
67
68
  rb_view = Bridgetown::PureRubyView.new(convertible)
68
- results = rb_view.instance_eval(
69
- content, convertible.path.to_s, line_start(convertible)
69
+
70
+ rb_view.instance_eval(
71
+ "def __ruby_template;#{content};end", convertible.path.to_s, line_start(convertible)
70
72
  )
71
- rb_view._output_buffer || results.to_s
73
+
74
+ results = if convertible.is_a?(Bridgetown::Layout)
75
+ rb_view.__ruby_template { convertible.current_document_output.html_safe }
76
+ else
77
+ rb_view.__ruby_template
78
+ end
79
+ (rb_view._output_buffer || results).to_s
72
80
  end
81
+ # rubocop:enable Style/DocumentDynamicEvalDefinition, Style/EvalWithLocation
73
82
  end
74
83
  end
75
84
  end
@@ -4,6 +4,7 @@ module Bridgetown
4
4
  module Drops
5
5
  class StaticFileDrop < Drop
6
6
  extend Forwardable
7
+
7
8
  def_delegators :@obj, :name, :extname, :date, :modified_time, :basename
8
9
  def_delegator :@obj, :relative_path, :path
9
10
  def_delegator :@obj, :type, :collection
@@ -328,7 +328,7 @@ module Bridgetown
328
328
  #
329
329
  # rubocop:disable Metrics/CyclomaticComplexity
330
330
  # rubocop:disable Metrics/PerceivedComplexity
331
- def compare_property_vs_target(property, target)
331
+ def compare_property_vs_target(property, target) # rubocop:disable Naming/PredicateMethod
332
332
  case target
333
333
  when NilClass
334
334
  return true if property.nil?
@@ -7,6 +7,8 @@ module Bridgetown
7
7
  class Defaults
8
8
  using Bridgetown::Refinements
9
9
 
10
+ SANITIZATION_REGEX = %r!\A/|(?<=[^/])\z!
11
+
10
12
  # @return [Bridgetown::Site]
11
13
  attr_reader :site
12
14
 
@@ -63,7 +65,7 @@ module Bridgetown
63
65
  def merge_data_cascade_for_path(path, merged_data)
64
66
  absolute_path = site.in_source_dir(path)
65
67
  site.defaults_reader.path_defaults
66
- .select { |k, _v| absolute_path.include? k }
68
+ .select { |k, _v| absolute_path.include? k } # rubocop:disable Style/HashSlice
67
69
  .sort_by { |k, _v| k.length }
68
70
  .each do |defaults|
69
71
  merged_data.merge!(defaults[1])
@@ -93,7 +95,7 @@ module Bridgetown
93
95
  end
94
96
  end
95
97
 
96
- def glob_scope(sanitized_path, rel_scope_path)
98
+ def glob_scope(sanitized_path, rel_scope_path) # rubocop:disable Naming/PredicateMethod
97
99
  site_source = Pathname.new(site.source)
98
100
  abs_scope_path = site_source.join(rel_scope_path).to_s
99
101
 
@@ -148,7 +150,7 @@ module Bridgetown
148
150
  # @param old_scope [Hash] old scope hash, or nil if there's none
149
151
  # @param new_scope [Hash] new scope hash
150
152
  # @return [Boolean] true if the new scope has precedence over the older
151
- # rubocop: disable Naming/PredicateName
153
+ # rubocop: disable Naming/PredicatePrefix
152
154
  def has_precedence?(old_scope, new_scope)
153
155
  return true if old_scope.nil?
154
156
 
@@ -163,7 +165,7 @@ module Bridgetown
163
165
  !old_scope.key? "collection"
164
166
  end
165
167
  end
166
- # rubocop: enable Naming/PredicateName
168
+ # rubocop: enable Naming/PredicatePrefix
167
169
 
168
170
  # Collects a list of sets that match the given path and collection
169
171
  #
@@ -205,8 +207,6 @@ module Bridgetown
205
207
  set["scope"]["collection"] = set["scope"]["type"]
206
208
  end
207
209
 
208
- SANITIZATION_REGEX = %r!\A/|(?<=[^/])\z!
209
-
210
210
  # Sanitizes the given path by removing a leading and adding a trailing slash
211
211
  def sanitize_path(path)
212
212
  if path.nil? || path.empty?
@@ -79,7 +79,7 @@ module Bridgetown
79
79
  Result.new(
80
80
  content: ruby_content.post_match.lstrip,
81
81
  front_matter: process_ruby_data(ruby_content[1], file_path, 2),
82
- line_count: ruby_content[1].lines.size - 1
82
+ line_count: ruby_content[1].lines.size
83
83
  )
84
84
  elsif self.class.header?(file_path)
85
85
  Result.new(
@@ -33,7 +33,7 @@ module Bridgetown
33
33
  Result.new(
34
34
  content: yaml_content.post_match.lstrip,
35
35
  front_matter: YAMLParser.load(yaml_content[1]),
36
- line_count: yaml_content[1].lines.size - 1
36
+ line_count: yaml_content[1].lines.size
37
37
  )
38
38
  end
39
39
  end
@@ -92,8 +92,7 @@ module Bridgetown
92
92
  # @raise [ArgumentError] if the file cannot be found
93
93
  def find_relative_url_for_path(relative_path)
94
94
  site.each_site_file do |item|
95
- if item.relative_path.to_s == relative_path ||
96
- item.relative_path.to_s == "/#{relative_path}"
95
+ if [relative_path, "/#{relative_path}"].include?(item.relative_path.to_s)
97
96
  return safe(item.respond_to?(:relative_url) ? item.relative_url : relative_url(item))
98
97
  end
99
98
  end
@@ -12,7 +12,7 @@ module Bridgetown
12
12
  end
13
13
  end
14
14
 
15
- def add(severity, message = nil, progname = nil)
15
+ def add(severity, message = nil, progname = nil) # rubocop:disable Naming/PredicateMethod
16
16
  severity ||= UNKNOWN
17
17
  @logdev = logdevice(severity)
18
18
 
@@ -53,7 +53,7 @@ module Bridgetown
53
53
  @data
54
54
  end
55
55
 
56
- def write(model)
56
+ def write(model) # rubocop:disable Naming/PredicateMethod
57
57
  if File.exist?(original_path) && !Bridgetown::Utils.has_yaml_header?(original_path)
58
58
  raise Bridgetown::Errors::InvalidYAMLFrontMatterError,
59
59
  "Only existing files containing YAML front matter can be overwritten by the model"
@@ -15,7 +15,7 @@ module Bridgetown
15
15
  # Initialize a new plugin. This should be overridden by the subclass (generator or converter)
16
16
  #
17
17
  # @param config [Bridgetown::Configuration] the configuration for the site
18
- def initialize(config = {}) # rubocop:disable Style/RedundantInitialize
18
+ def initialize(config = {})
19
19
  # no-op for default
20
20
  end
21
21
  end
@@ -20,7 +20,7 @@ module Bridgetown
20
20
  end
21
21
  end
22
22
 
23
- def self.setup_bundler
23
+ def self.setup_bundler # rubocop:disable Naming/PredicateMethod
24
24
  if !ENV["BRIDGETOWN_NO_BUNDLER_REQUIRE"] &&
25
25
  (Bundler::SharedHelpers.in_bundle? || Bridgetown.env.test?)
26
26
  require "bundler"
@@ -355,7 +355,7 @@ module Bridgetown
355
355
  @fast_refresh_order = nil
356
356
  end
357
357
 
358
- def prepare_for_fast_refresh! # rubocop:todo Metrics
358
+ def prepare_for_fast_refresh! # rubocop:todo Metrics, Naming/PredicateMethod
359
359
  dispose_of_transform_effect
360
360
  FileUtils.rm(destination.output_path, force: true) if requires_destination?
361
361
  past_values = @data.peek.select do |key|
@@ -110,7 +110,7 @@ module Bridgetown
110
110
 
111
111
  # @param type [Symbol]
112
112
  # @return [Array<Bridgetown::Resource::Base>]
113
- def has_many_relation_for_type(type) # rubocop:disable Naming/PredicateName
113
+ def has_many_relation_for_type(type) # rubocop:disable Naming/PredicatePrefix
114
114
  label, singular_label = collection_labels
115
115
 
116
116
  other_collection_for_type(type).resources.select do |other_resource|
@@ -122,7 +122,7 @@ module Bridgetown
122
122
 
123
123
  # @param type [Symbol]
124
124
  # @return [Bridgetown::Resource::Base]
125
- def has_one_relation_for_type(type) # rubocop:disable Naming/PredicateName
125
+ def has_one_relation_for_type(type) # rubocop:disable Naming/PredicatePrefix
126
126
  label, singular_label = collection_labels
127
127
 
128
128
  other_collection_for_type(type).resources.find do |other_resource|
@@ -5,6 +5,7 @@ require "signalize/struct"
5
5
  class Bridgetown::Signals < Signalize::Struct
6
6
  alias_method :__prev_to_h, :to_h
7
7
  include Enumerable
8
+
8
9
  alias_method :to_h, :__prev_to_h
9
10
 
10
11
  def self.signal_accessor(...)
@@ -83,7 +83,7 @@ module Bridgetown
83
83
  end
84
84
  end.join(", ")
85
85
 
86
- "#<Bridgetown::Site::Signals#{object_id}>#{var_peeks.empty? ? nil : " #{var_peeks}"}>"
86
+ "#<Bridgetown::Site::Signals#{object_id}>#{" #{var_peeks}" unless var_peeks.empty?}>"
87
87
  end
88
88
  end.new(**data_hash)
89
89
  end
@@ -101,7 +101,7 @@ module Bridgetown
101
101
  #
102
102
  # @param dest [String] path to the destination dir
103
103
  # @return [Boolean] false if the file was not modified since last time (no-op)
104
- def write(dest)
104
+ def write(dest) # rubocop:disable Naming/PredicateMethod
105
105
  dest_path = destination(dest)
106
106
  return false if File.exist?(dest_path) && !modified?
107
107
 
@@ -157,7 +157,7 @@ module Bridgetown
157
157
  # @return [String] cleaned relative path of the static file
158
158
  def cleaned_relative_path
159
159
  @cleaned_relative_path ||= begin
160
- cleaned = relative_path[0..-extname.length - 1]
160
+ cleaned = relative_path[0..(-extname.length - 1)]
161
161
  cleaned.gsub!(%r!\.*\z!, "")
162
162
  cleaned.sub!(@collection.relative_path, "") if @collection
163
163
  cleaned
@@ -12,6 +12,9 @@ module Bridgetown
12
12
  # <quoted list> is a space-separated list of numbers
13
13
  SYNTAX = %r!^([a-zA-Z0-9.+#_-]+)((\s+\w+(=(\w+|"([0-9]+\s)*[0-9]+"))?)*)$!
14
14
 
15
+ OPTIONS_REGEX = %r!(?:\w="[^"]*"|\w=\w|\w)+!
16
+ LEADING_OR_TRAILING_LINE_TERMINATORS = %r!\A(\n|\r)+|(\n|\r)+\z!
17
+
15
18
  def initialize(tag_name, markup, tokens)
16
19
  super
17
20
  unless markup.strip =~ SYNTAX
@@ -28,8 +31,6 @@ module Bridgetown
28
31
  @highlight_options = parse_options(Regexp.last_match(2))
29
32
  end
30
33
 
31
- LEADING_OR_TRAILING_LINE_TERMINATORS = %r!\A(\n|\r)+|(\n|\r)+\z!
32
-
33
34
  def render(context)
34
35
  prefix = context["highlighter_prefix"] || ""
35
36
  suffix = context["highlighter_suffix"] || ""
@@ -49,8 +50,6 @@ module Bridgetown
49
50
 
50
51
  private
51
52
 
52
- OPTIONS_REGEX = %r!(?:\w="[^"]*"|\w=\w|\w)+!
53
-
54
53
  def parse_options(input)
55
54
  options = {}
56
55
  return options if input.empty?
@@ -3,6 +3,7 @@
3
3
  module Bridgetown
4
4
  module Utils # rubocop:todo Metrics/ModuleLength
5
5
  extend self
6
+
6
7
  autoload :Aux, "bridgetown-core/utils/aux"
7
8
  autoload :LoadersManager, "bridgetown-core/utils/loaders_manager"
8
9
  autoload :RequireGems, "bridgetown-core/utils/require_gems"
@@ -119,7 +120,7 @@ module Bridgetown
119
120
  # Determines whether a given file has YAML front matter
120
121
  #
121
122
  # @return [Boolean] if the YAML front matter is present.
122
- def has_yaml_header?(file) # rubocop: disable Naming/PredicateName
123
+ def has_yaml_header?(file) # rubocop: disable Naming/PredicatePrefix
123
124
  Bridgetown::Deprecator.deprecation_message(
124
125
  "Bridgetown::Utils.has_yaml_header? is deprecated, use " \
125
126
  "Bridgetown::FrontMatter::Loaders::YAML.header? instead"
@@ -127,7 +128,7 @@ module Bridgetown
127
128
  FrontMatter::Loaders::YAML.header?(file)
128
129
  end
129
130
 
130
- def has_rbfm_header?(file) # rubocop: disable Naming/PredicateName
131
+ def has_rbfm_header?(file) # rubocop: disable Naming/PredicatePrefix
131
132
  Bridgetown::Deprecator.deprecation_message(
132
133
  "Bridgetown::Utils.has_rbfm_header? is deprecated, use " \
133
134
  "Bridgetown::FrontMatter::Loaders::Ruby.header? instead"
@@ -1,6 +1,3 @@
1
- source "https://rubygems.org"
2
- git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
-
4
1
  ####
5
2
  # Welcome to your project's Gemfile, used by Rubygems & Bundler.
6
3
  #
@@ -17,6 +14,15 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
17
14
  # This will help ensure the proper Bridgetown version is running.
18
15
  ####
19
16
 
17
+ # Gems source:
18
+ source "https://rubygems.org"
19
+ # Or you can switch the above to an alternate community-led server:
20
+ # source "https://gem.coop"
21
+
22
+ # Git-based sources:
23
+ git_source(:github) { "https://github.com/#{_1}.git" }
24
+ git_source(:codeberg) { "https://codeberg.org/#{_1}.git" }
25
+
20
26
  # If you need to upgrade/switch Bridgetown versions, change the line below
21
27
  # and then run `bundle update bridgetown`
22
28
  gem "bridgetown", "~> <%= Bridgetown::VERSION %>"
@@ -26,11 +32,11 @@ gem "bridgetown", "~> <%= Bridgetown::VERSION %>"
26
32
 
27
33
  # Puma is the Rack-compatible web server used by Bridgetown
28
34
  # (you can optionally limit this to the "development" group)
29
- gem "puma", "< 7"
35
+ gem "puma", "< 8"
30
36
 
31
37
  # Uncomment to use the Inspectors API to manipulate the output
32
38
  # of your HTML or XML resources:
33
- # gem "nokogiri", "~> 1.13"
39
+ # gem "nokogiri", "~> 1.18"
34
40
 
35
41
  # Or for faster parsing of HTML-only resources via Inspectors, use Nokolexbor:
36
- # gem "nokolexbor", "~> 0.5"
42
+ # gem "nokolexbor", "~> 0.6"
@@ -8,11 +8,9 @@ layout: default
8
8
 
9
9
  You can learn more about how to build and deploy your new website by reading the [Bridgetown documentation](https://www.bridgetownrb.com/docs).
10
10
 
11
- You can choose a [theme](https://github.com/topics/bridgetown-theme) or add some [plugins](https://www.bridgetownrb.com/plugins/) to get started quickly.
11
+ You can add some [plugins](https://www.bridgetownrb.com/plugins/) to get started quickly or [write your own](https://www.bridgetownrb.com/docs/plugins) to extend the functionality of your site.
12
12
 
13
- Be sure to check out the [Bridgetown Community](https://community.bridgetown.pub) site if you have questions or are looking for helpful tips & tricks.
14
-
15
- You're also invited to join us in our [Discord chat](https://discord.gg/4E6hktQGz4).
13
+ Be sure to check out the [Bridgetown Discord chat](https://discord.gg/4E6hktQGz4) if you have questions or are looking for helpful tips & tricks.
16
14
 
17
15
  _Have fun and **good luck**!_
18
16
 
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: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-18 00:00:00.000000000 Z
11
+ date: 2025-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -64,14 +64,14 @@ dependencies:
64
64
  requirements:
65
65
  - - '='
66
66
  - !ruby/object:Gem::Version
67
- version: 2.0.3
67
+ version: 2.0.4
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - '='
73
73
  - !ruby/object:Gem::Version
74
- version: 2.0.3
74
+ version: 2.0.4
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: csv
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -434,7 +434,6 @@ files:
434
434
  - lib/bridgetown-core/commands/registrations.rb
435
435
  - lib/bridgetown-core/commands/start.rb
436
436
  - lib/bridgetown-core/component.rb
437
- - lib/bridgetown-core/concerns/intuitive_expectations.rb
438
437
  - lib/bridgetown-core/concerns/layout_placeable.rb
439
438
  - lib/bridgetown-core/concerns/localizable.rb
440
439
  - lib/bridgetown-core/concerns/prioritizable.rb
@@ -1,67 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Bridgetown
4
- # This is for including into Minitest::Expectation
5
- module IntuitiveExpectations
6
- def true?(msg = nil)
7
- must_be(:itself, Minitest::Assertions::UNDEFINED, msg)
8
- self
9
- end
10
-
11
- def false?(msg = nil)
12
- wont_be(:itself, Minitest::Assertions::UNDEFINED, msg)
13
- self
14
- end
15
-
16
- def ==(other)
17
- must_equal(other)
18
- self
19
- end
20
-
21
- def !=(other)
22
- must_not_equal(other)
23
- self
24
- end
25
-
26
- def nil?(msg = nil)
27
- must_be_nil(msg)
28
- self
29
- end
30
-
31
- def not_nil?(msg = nil)
32
- wont_be_nil(msg)
33
- self
34
- end
35
-
36
- def empty?(msg = nil)
37
- must_be_empty(msg)
38
- self
39
- end
40
-
41
- def filled?(msg = nil)
42
- wont_be_empty(msg)
43
- self
44
- end
45
-
46
- def include?(other, msg = nil)
47
- must_include(other, msg)
48
- self
49
- end
50
- alias_method :<<, :include?
51
-
52
- def exclude?(other, msg = nil)
53
- wont_include(other, msg)
54
- self
55
- end
56
-
57
- def =~(other)
58
- must_match(other)
59
- self
60
- end
61
-
62
- def is_a?(klass, msg = nil)
63
- must_be_instance_of(klass, msg)
64
- self
65
- end
66
- end
67
- end