Skip to content

Commit

Permalink
Remove unused parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Guo Yunhe committed Jul 1, 2017
1 parent 3f52c19 commit 71c89ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/models/screenshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def thumbnail_path(fetch: true)
if cached?
thumbnail_file_path(fullpath: false)
elsif source_url.nil?
default_file_path(:thumbnail, fullpath: false)
default_file_path(fullpath: false)
elsif fetch
begin
self.fetch
Expand All @@ -43,7 +43,7 @@ def thumbnail_path(fetch: true)
rescue Exception => e
raise unless Rails.env.production?
Rails.logger.debug("No screenshot fetched for: " + pkg_name)
default_file_path(:thumbnail, fullpath: false)
default_file_path(fullpath: false)
end
else
nil
Expand Down Expand Up @@ -93,7 +93,7 @@ def cached_blob(type)
end

def default_blob(type)
open(default_file_path(type), "rb", &:read)
open(default_file_path(), "rb", &:read)
end

def cache_key
Expand Down Expand Up @@ -127,7 +127,7 @@ def thumbnail_file_path(fullpath: true)
fullpath ? File.join(Rails.root, "public", "images", file) : file
end

def default_file_path(type, fullpath: true)
def default_file_path(fullpath: true)
file = case pkg_name
when /-devel$/
"devel-package.svg"
Expand Down

0 comments on commit 71c89ea

Please sign in to comment.