Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few more keyword argument issues #668

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/jekyll/assets/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ def skip_gzip?
end

# --
def find_asset(asset, *args)
def find_asset(asset, *args, **kwargs)
msg = "Searched for, and rendered #{asset} in %<time>s"
out = Logger.with_timed_logging msg do
super(asset, *args)
super(asset, *args, **kwargs)
end

# We keep track.
Expand All @@ -67,10 +67,10 @@ def find_asset(asset, *args)
end

# --
def find_asset!(asset, *args)
def find_asset!(asset, *args, **kwargs)
msg = "Searched for, and rendered #{asset} in %<time>s"
out = Logger.with_timed_logging msg do
super(asset, *args)
super(asset, *args, **kwargs)
end

# We keep track.
Expand Down
4 changes: 2 additions & 2 deletions lib/jekyll/assets/patches/cached_environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def initialize(env)
# @return [Sprockets::Asset]
# --
%i(find_asset find_asset!).each do |v|
define_method v do |*a|
super(*a).tap do |m|
define_method v do |*a, **b|
super(*a, **b).tap do |m|
m&.environment = self
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/jekyll/assets/plugins/html/vid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class Video < HTML
# --
def run
Nokogiri::HTML::Builder.with(doc) do |d|
d.video("No support for video.", args.to_h({
d.video("No support for video.", args.to_h(
html: true, skip: HTML.skips
}))
))
end
end
end
Expand Down
5 changes: 1 addition & 4 deletions lib/jekyll/assets/plugins/srcmap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ module SrcMap
# --
def self.map_path(env:, asset:)
[
path({
asset: asset,
env: env,
}),
path(asset: asset, env: env),
EXT,
].join
end
Expand Down
4 changes: 1 addition & 3 deletions lib/jekyll/assets/plugins/srcmap/writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,7 @@ def asset_path
private
def map_path(file)
asset = base.join(env.strip_paths(file))
SrcMap.path({
asset: asset, env: env
})
SrcMap.path(asset: asset, env: env)
end
end

Expand Down
4 changes: 1 addition & 3 deletions lib/jekyll/assets/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,7 @@ def parse_liquid(obj, ctx:)
end
when obj.is_a?(Array)
obj.map do |v|
parse_liquid(v, {
ctx: ctx,
})
parse_liquid(v, ctx: ctx)
end
when obj.is_a?(String)
k = Digest::SHA256.hexdigest(obj)[0, 6]
Expand Down