Skip to content

Commit

Permalink
Fix cops
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredcwhite committed Jan 25, 2023
1 parent 9672ed3 commit 13cad9b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ def self.included(klass)

YAML_HEADER = %r!\A---\s*\n!.freeze
YAML_BLOCK = %r!\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)!m.freeze
RUBY_HEADER = %r!\A[~`#\-]{3,}(?:ruby|<%|{%)\s*\n!.freeze
RUBY_HEADER = %r!\A[~`#-]{3,}(?:ruby|<%|{%)\s*\n!.freeze
RUBY_BLOCK =
%r!#{RUBY_HEADER.source}(.*?\n?)^((?:%>|%})?[~`#\-]{3,}\s*$\n?)!m.freeze
%r!#{RUBY_HEADER.source}(.*?\n?)^((?:%>|%})?[~`#-]{3,}\s*$\n?)!m.freeze

def read_front_matter(file_path) # rubocop:todo Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Metrics/MethodLength
file_contents = File.read(
Expand Down
4 changes: 2 additions & 2 deletions bridgetown-core/lib/bridgetown-core/model/repo_origin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ class RepoOrigin < Origin
include Bridgetown::Utils::RubyFrontMatterDSL

YAML_FRONT_MATTER_REGEXP = %r!\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)!m.freeze
RUBY_FRONT_MATTER_HEADER = %r!\A[~`#\-]{3,}(?:ruby|<%|{%)\s*\n!.freeze
RUBY_FRONT_MATTER_HEADER = %r!\A[~`#-]{3,}(?:ruby|<%|{%)\s*\n!.freeze
RUBY_FRONT_MATTER_REGEXP =
%r!#{RUBY_FRONT_MATTER_HEADER.source}(.*?\n?)^((?:%>|%})?[~`#\-]{3,}\s*$\n?)!m.freeze
%r!#{RUBY_FRONT_MATTER_HEADER.source}(.*?\n?)^((?:%>|%})?[~`#-]{3,}\s*$\n?)!m.freeze

# @return [String]
attr_accessor :content
Expand Down
2 changes: 0 additions & 2 deletions bridgetown-core/test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,6 @@ def mount_server(&block)
server.start
addr = server.listeners[0].addr
block.yield([server, addr[3], addr[1]])
rescue StandardError => e
raise e
ensure
server.shutdown
sleep 0.1 until server.status == :Stop
Expand Down

0 comments on commit 13cad9b

Please sign in to comment.