-
Notifications
You must be signed in to change notification settings - Fork 4
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
WIP: Help with formulas testing #365
base: main
Are you sure you want to change the base?
Conversation
def downloadable?(name) | ||
retries ||= 0 | ||
retries += 1 | ||
Down.open("https://fonts.google.com/download?family=#{name}") | ||
Down.open("https://fonts.google.com/download?family=#{ERB::Util.url_encode(name)}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [93/80]
response = h.head("/download?family=#{ERB::Util.url_encode(name)}") | ||
next unless response.is_a?(Net::HTTPOK) | ||
|
||
header = response['content-length'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
end | ||
|
||
def download(name) | ||
url = "https://fonts.google.com/download?family=#{ERB::Util.url_encode(name)}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [88/80]
Excavate::Archive.new(archive).files do |path| | ||
next unless File.file?(path) | ||
|
||
yield path if path.end_with?(".ttf") || path.end_with?(".otf") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use path.end_with?(".ttf", ".otf") instead of path.end_with?(".ttf") || path.end_with?(".otf").
end | ||
end | ||
|
||
def archive_fonts_up_to_date?(formula, metadata_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method has too many lines. [12/10]
@@ -34,6 +35,8 @@ def fetch_new_paths | |||
new_paths = [] | |||
|
|||
fetch_fonts_paths.each do |path| | |||
# next unless path.end_with?("coveredbyyourgrace") || path.end_with?("anton") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [89/80]
See #364