diff --git a/README.md b/README.md index d75d08f..c5b9e4f 100644 --- a/README.md +++ b/README.md @@ -34,37 +34,38 @@ License v2* (GPL). ### Redmine Additionals plugin - * additionals 2.0.20 + * additionals 3.0.0 * https://alphanodes.com/redmine-additionals * https://github.com/alphanodes/additionals.git ### Redmine Checklists plugin (Light version) - * checklists 3.1.10 + * checklists 3.1.18 * https://www.redmine.org/plugins/redmine_checklists * https://www.redmineup.com/pages/plugins/checklists ### Redmine CKEditor plugin - * ckeditor 1.1.5 + * ckeditor 1.2.3 * https://www.redmine.org/plugins/redmine-ckeditor * http://github.com/a-ono/redmine_ckeditor ### Redmine Glossary Plugin - * glossary 0.9.2 + * glossary 1.1.0 * https://www.r-labs.org/projects/rp-glossary/wiki/UsageEn * https://github.com/torutk/redmine_glossary ### Redmine Private Wiki Plugin - * private_wiki 0.2.0 + * private_wiki 0.2.0 (mistraloz) * http://www.redmine.org/plugins/redmine_private_wiki - * https://github.com/BlueXML/redmine_private_wiki + * https://github.com/mistraloz/redmine_private_wiki (*fork* con ajustes para + Redmine >= 4.0.3) ### Redmine Q&A plugin - * questions 1.0.0 + * questions 1.0.2 * https://www.redmine.org/plugins/redmine_questions * http://www.redminecrm.com/projects/questions diff --git a/config/configuration.yml.example b/config/configuration.yml.example index a8b6be8..5dbb717 100644 --- a/config/configuration.yml.example +++ b/config/configuration.yml.example @@ -179,6 +179,10 @@ default: # the ImageMagick's `convert` binary. Used to generate attachment thumbnails. #imagemagick_convert_command: + # Absolute path (e.g. /usr/bin/gs, c:/ghostscript/gs.exe) to + # the `gs` binary. Used to generate attachment thumbnails of PDF files. + #gs_command: + # Configuration of MiniMagick font. # # Redmine uses MiniMagick in order to export a gantt chart to a PNG image. diff --git a/lib/redmine/thumbnail.rb b/lib/redmine/thumbnail.rb index 79f7843..cc9656b 100644 --- a/lib/redmine/thumbnail.rb +++ b/lib/redmine/thumbnail.rb @@ -25,6 +25,7 @@ module Redmine extend Redmine::Utils::Shell CONVERT_BIN = (Redmine::Configuration['imagemagick_convert_command'] || 'convert').freeze + GS_BIN = (Redmine::Configuration['gs_command'] || 'gs').freeze ALLOWED_TYPES = %w(image/bmp image/gif image/jpeg image/png application/pdf) # Generates a thumbnail for the source image to target @@ -79,12 +80,13 @@ module Redmine @gs_available = false else begin - `gs -version` + `#{shell_quote GS_BIN} -version` @gs_available = $?.success? rescue @gs_available = false end end + logger.warn("gs binary (#{GS_BIN}) not available") unless @gs_available @gs_available end