Skip to content

Commit

Permalink
Merge pull request #179 from guoyunhe/patch-1
Browse files Browse the repository at this point in the history
Use PNG instead of SVG for default screenshots
  • Loading branch information
lnussel committed Jul 27, 2017
2 parents 85ec787 + bc1cf2e commit 740c2d6
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions app/models/screenshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,47 +130,47 @@ def thumbnail_file_path(fullpath: true)
def default_file_path(fullpath: true)
file = case pkg_name
when /-devel$/
"devel-package.svg"
"devel-package.png"
when /-devel-/
"devel-package.svg"
"devel-package.png"
when /-debug$/
"devel-package.svg"
"devel-package.png"
when /-lang$/
"lang-package.svg"
"lang-package.png"
when /-l10n-/
"lang-package.svg"
"lang-package.png"
when /-i18n-/
"lang-package.svg"
"lang-package.png"
when /-translations/
"lang-package.svg"
"lang-package.png"
when /-doc$/
"doc-package.svg"
"doc-package.png"
when /-help-/
"doc-package.svg"
"doc-package.png"
when /-javadoc$/
"doc-package.svg"
"doc-package.png"
when /-debuginfo/
"devel-package.svg"
"devel-package.png"
when /-debugsource/
"devel-package.svg"
"devel-package.png"
when /-kmp-/
"devel-package.svg"
"devel-package.png"
when /^rubygem-/
"ruby-package.svg"
"ruby-package.png"
when /^perl-/
"perl-package.svg"
"perl-package.png"
when /^python-/
"python-package.svg"
"python-package.png"
when /^python2-/
"python-package.svg"
"python-package.png"
when /^python3-/
"python-package.svg"
"python-package.png"
when /^kernel-/
"kernel-package.svg"
"kernel-package.png"
when /^openstack-/i
"openstack-package.svg"
"openstack-package.png"
else
"package.svg"
"package.png"
end
if fullpath
File.join(Rails.root, "app/assets/images/default-screenshots", file)
Expand Down

0 comments on commit 740c2d6

Please sign in to comment.