Skip to content

Commit 1951175

Browse files
committed
lint
1 parent 45c60cb commit 1951175

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

lib/html_pipeline.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def require_dependencies(names, requirer)
8181
def define_dependency_loaded_method(name, value)
8282
self.class.define_method(:"#{name}_loaded?", -> { value })
8383
end
84-
end
84+
end
8585
# Public: Returns an Array of Filter objects for this Pipeline.
8686
attr_reader :text_filters, :node_filters
8787

lib/html_pipeline/convert_filter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ class << self
1212
def call(text, context: {}, result: {})
1313
new(context: context, result: result).call(text)
1414
end
15-
end
15+
end
1616
end
1717
end

lib/html_pipeline/filter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class << self
4949
def call(input, context: {})
5050
raise NoMethodError
5151
end
52-
end
52+
end
5353
# Make sure the context has everything we need. Noop: Subclasses can override.
5454
def validate; end
5555

lib/html_pipeline/node_filter/asset_proxy_filter.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def handle_element(element)
3737
end
3838

3939
def validate
40-
needs(:asset_proxy, :asset_proxy_secret_key) if asset_proxy_enabled?
40+
needs(:asset_proxy, :asset_proxy_secret_key)
4141
end
4242

4343
def asset_host_allowed?(host)
@@ -74,11 +74,11 @@ def determine_allowlist(proxy_settings)
7474
"#{context[:asset_proxy]}/#{asset_url_hash(url)}/#{hexencode(url)}"
7575
end
7676

77-
def asset_url_hash(url)
77+
private def asset_url_hash(url)
7878
OpenSSL::HMAC.hexdigest("sha1", context[:asset_proxy_secret_key], url)
7979
end
8080

81-
def hexencode(str)
81+
private def hexencode(str)
8282
str.unpack1("H*")
8383
end
8484
end

lib/html_pipeline/node_filter/mention_filter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def mentioned_logins_in(text, username_pattern = USERNAME_PATTERN)
3838
yield match, login
3939
end
4040
end
41-
end
41+
end
4242
# Hash that contains all of the mention patterns used by the pipeline
4343
MENTION_PATTERNS = Hash.new do |hash, key|
4444
hash[key] = %r{

lib/html_pipeline/node_filter/team_mention_filter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def mentioned_teams_in(text, team_pattern = TEAM_PATTERN)
3535
yield match, org, team
3636
end
3737
end
38-
end
38+
end
3939

4040
# Default pattern used to extract team names from text. The value can be
4141
# overridden by providing the team_pattern variable in the context. To

lib/html_pipeline/sanitization_filter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,6 @@ def call(html, config)
183183
sanitization_config = Selma::Sanitizer.new(config)
184184
Selma::Rewriter.new(sanitizer: sanitization_config).rewrite(html)
185185
end
186-
end
186+
end
187187
end
188188
end

lib/html_pipeline/text_filter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ class << self
1616
def call(input, context: {}, result: {})
1717
new(input, context: context, result: result).call
1818
end
19-
end
19+
end
2020
end
2121
end

0 commit comments

Comments
 (0)