OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
linting
ulfertsa8a274ae7a6b
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rbindex dbaf50e7a09..462819cbcec 100644--- a/app/controllers/admin_controller.rb+++ b/app/controllers/admin_controller.rb@@ -81,19 +81,9 @@ class AdminController < ApplicationController[:text_database_allows_tsv, OpenProject::Database.allows_tsv?]]- # Add local directory test if we're not using fog- if OpenProject::Configuration.file_storage?- repository_writable = File.writable?(OpenProject::Configuration.attachments_storage_path)- @checklist << [:text_file_repository_writable, repository_writable]- end-- if OpenProject::Database.allows_tsv?- @checklist += plaintext_extraction_checks- end-- call_hook(:admin_information_checklist).each do |result|- @checklist += result- end+ @checklist += file_storage_checks+ @checklist += plaintext_extraction_checks+ @checklist += admin_information_hook_checks@storage_information = OpenProject::Storage.mount_informationend@@ -101,9 +91,9 @@ class AdminController < ApplicationControllerdef default_breadcrumbcase params[:action]when 'plugins'- l(:label_plugins)+ t(:label_plugins)when 'info'- l(:label_information)+ t(:label_information)endend@@ -114,13 +104,33 @@ class AdminController < ApplicationControllerprivatedef plaintext_extraction_checks- [- [:'extraction.available.pdftotext', Plaintext::PdfHandler.available?],- [:'extraction.available.unrtf', Plaintext::RtfHandler.available?],- [:'extraction.available.catdoc', Plaintext::DocHandler.available?],- [:'extraction.available.xls2csv', Plaintext::XlsHandler.available?],- [:'extraction.available.catppt', Plaintext::PptHandler.available?],- [:'extraction.available.tesseract', Plaintext::ImageHandler.available?]- ]+ if OpenProject::Database.allows_tsv?+ [+ [:'extraction.available.pdftotext', Plaintext::PdfHandler.available?],+ [:'extraction.available.unrtf', Plaintext::RtfHandler.available?],+ [:'extraction.available.catdoc', Plaintext::DocHandler.available?],+ [:'extraction.available.xls2csv', Plaintext::XlsHandler.available?],+ [:'extraction.available.catppt', Plaintext::PptHandler.available?],+ [:'extraction.available.tesseract', Plaintext::ImageHandler.available?]+ ]+ else+ []+ end+ end++ def file_storage_checks+ # Add local directory test if we're not using fog+ if OpenProject::Configuration.file_storage?+ repository_writable = File.writable?(OpenProject::Configuration.attachments_storage_path)+ [[:text_file_repository_writable, repository_writable]]+ else+ []+ end+ end++ def admin_information_hook_checks+ call_hook(:admin_information_checklist).map do |result|+ result+ end.flatten(1)endenddiff --git a/modules/ifc_models/app/helpers/ifc_models_helper.rb b/modules/ifc_models/app/helpers/ifc_models_helper.rbindex 5026edbac6b..a4952e13b62 100644--- a/modules/ifc_models/app/helpers/ifc_models_helper.rb+++ b/modules/ifc_models/app/helpers/ifc_models_helper.rb@@ -38,4 +38,4 @@ module IFCModelsHelperend]end-end\ No newline at end of file+enddiff --git a/modules/ifc_models/app/services/ifc_models/view_converter_service.rb b/modules/ifc_models/app/services/ifc_models/view_converter_service.rbindex 32d91247f34..51ca99ba161 100644--- a/modules/ifc_models/app/services/ifc_models/view_converter_service.rb+++ b/modules/ifc_models/app/services/ifc_models/view_converter_service.rb@@ -45,7 +45,7 @@ module IFCModelsenddef self.available_commands- @@available ||= begin+ @available ||= beginPIPELINE_COMMANDS.select do |command|_, status = Open3.capture2e('which', command)status.exitstatus.zero?@@ -134,12 +134,12 @@ module IFCModels### Build input filename and target filename- def convert!(source_file, target_dir, ext, &block)+ def convert!(source_file, target_dir, ext)filename = File.basename(source_file, '.*')target_filename = "#{filename}.#{ext}"target_file = File.join(target_dir, target_filename)- out, status = block.call target_file+ out, status = yield target_fileif status.exitstatus != 0raise "Failed to convert #{filename} to #{ext}: #{out}"