From a0b802a328d2f76209e996ccbe418fa3a0965886 Mon Sep 17 00:00:00 2001 From: "vit.jonas@gmail.com" Date: Thu, 5 May 2011 19:50:53 +0000 Subject: [PATCH] * never ending import story ... hope done git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk/redmine_dmsf@5 5e329b0b-a2ee-ea63-e329-299493fc886d --- README.txt | 16 +++++++++++----- app/controllers/dmsf_controller.rb | 18 ++++++++++++++++++ app/controllers/dmsf_detail_controller.rb | 18 ++++++++++++++++++ app/controllers/dmsf_state_controller.rb | 18 ++++++++++++++++++ app/helpers/dmsf_access_error.rb | 18 ++++++++++++++++++ app/helpers/dmsf_content_error.rb | 18 ++++++++++++++++++ app/helpers/dmsf_helper.rb | 18 ++++++++++++++++++ app/helpers/dmsf_upload.rb | 18 ++++++++++++++++++ app/helpers/dmsf_zip.rb | 18 ++++++++++++++++++ app/models/dmsf_file.rb | 18 ++++++++++++++++++ app/models/dmsf_file_lock.rb | 18 ++++++++++++++++++ app/models/dmsf_file_revision.rb | 18 ++++++++++++++++++ app/models/dmsf_folder.rb | 18 ++++++++++++++++++ app/models/dmsf_mailer.rb | 18 ++++++++++++++++++ app/models/dmsf_user_pref.rb | 18 ++++++++++++++++++ db/migrate/01_create_hierarchy.rb | 18 ++++++++++++++++++ init.rb | 18 ++++++++++++++++++ lib/tasks/dmsf_convert_documents.rake | 18 ++++++++++++++++++ test/test_helper.rb | 18 ++++++++++++++++++ 19 files changed, 335 insertions(+), 5 deletions(-) diff --git a/README.txt b/README.txt index f03e046f..dc9cacbe 100644 --- a/README.txt +++ b/README.txt @@ -1,6 +1,12 @@ -1 Installation and Setup +1 License -1.1. Required packages +Redmine Document Management System "Features" plugin is distributed under GNU GPL version 2. + +License itself is here: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html#SEC1 + +2 Installation and Setup + +2.1. Required packages For zipped content download you must have rubyzip gem installed. @@ -35,7 +41,7 @@ apt-get install xapian-ruby1.8 xapian-omega libxapian-dev xpdf antiword unzip an In case of package shortage it is possible to use: gem install xapian-full rubyzip -1.2. Plugin installation +2.2. Plugin installation Install redmine_dmsf into vendor/plugins directory with: * Put redmine_dmsf plugin content into vendor/plugins @@ -46,6 +52,8 @@ Install redmine_dmsf into vendor/plugins directory with: chown -R www-data:www-data /opt/redmine/vendor/plugins/redmine_dmsf * Restart web server +2.3. Setup + Then you must configure plugin in Administration -> Plugins -> DMSF -> Configure It is also neccessary to assign DMSF permissions to appropriate roles. @@ -66,8 +74,6 @@ To include Wiki DMSF link help: -1.3. Setup - It is necessary to index DMSF files with omega before searching attemts to recieve some output: omindex -s english -l 1 --db {path to index database from plugin configuration} {path to storage from plugin configuration} diff --git a/app/controllers/dmsf_controller.rb b/app/controllers/dmsf_controller.rb index 2742508e..9efa7148 100644 --- a/app/controllers/dmsf_controller.rb +++ b/app/controllers/dmsf_controller.rb @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + class DmsfController < ApplicationController unloadable diff --git a/app/controllers/dmsf_detail_controller.rb b/app/controllers/dmsf_detail_controller.rb index fab12cf2..2adf489a 100644 --- a/app/controllers/dmsf_detail_controller.rb +++ b/app/controllers/dmsf_detail_controller.rb @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + class DmsfDetailController < ApplicationController unloadable diff --git a/app/controllers/dmsf_state_controller.rb b/app/controllers/dmsf_state_controller.rb index 5cf3be55..a662e162 100644 --- a/app/controllers/dmsf_state_controller.rb +++ b/app/controllers/dmsf_state_controller.rb @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + class DmsfStateController < ApplicationController unloadable diff --git a/app/helpers/dmsf_access_error.rb b/app/helpers/dmsf_access_error.rb index 8a8d7722..f85a7def 100644 --- a/app/helpers/dmsf_access_error.rb +++ b/app/helpers/dmsf_access_error.rb @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + class DmsfAccessError < StandardError end diff --git a/app/helpers/dmsf_content_error.rb b/app/helpers/dmsf_content_error.rb index fbbd2f29..1809756e 100644 --- a/app/helpers/dmsf_content_error.rb +++ b/app/helpers/dmsf_content_error.rb @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + class DmsfContentError < StandardError end diff --git a/app/helpers/dmsf_helper.rb b/app/helpers/dmsf_helper.rb index 7f815d1e..1932bbb0 100644 --- a/app/helpers/dmsf_helper.rb +++ b/app/helpers/dmsf_helper.rb @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + require "tmpdir" module DmsfHelper diff --git a/app/helpers/dmsf_upload.rb b/app/helpers/dmsf_upload.rb index f81fc9ce..2ae9999c 100644 --- a/app/helpers/dmsf_upload.rb +++ b/app/helpers/dmsf_upload.rb @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + class DmsfUpload attr_accessor :name diff --git a/app/helpers/dmsf_zip.rb b/app/helpers/dmsf_zip.rb index 4a6d56ee..049386c2 100644 --- a/app/helpers/dmsf_zip.rb +++ b/app/helpers/dmsf_zip.rb @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + require 'zip/zip' require 'zip/zipfilesystem' diff --git a/app/models/dmsf_file.rb b/app/models/dmsf_file.rb index 03151710..a29f5ecb 100644 --- a/app/models/dmsf_file.rb +++ b/app/models/dmsf_file.rb @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + begin require 'xapian' $xapian_bindings_available = true diff --git a/app/models/dmsf_file_lock.rb b/app/models/dmsf_file_lock.rb index fdf28ce1..64759ead 100644 --- a/app/models/dmsf_file_lock.rb +++ b/app/models/dmsf_file_lock.rb @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + class DmsfFileLock < ActiveRecord::Base unloadable belongs_to :file, :class_name => "DmsfFile", :foreign_key => "dmsf_file_id" diff --git a/app/models/dmsf_file_revision.rb b/app/models/dmsf_file_revision.rb index 3e370135..d53e29ae 100644 --- a/app/models/dmsf_file_revision.rb +++ b/app/models/dmsf_file_revision.rb @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + class DmsfFileRevision < ActiveRecord::Base unloadable belongs_to :file, :class_name => "DmsfFile", :foreign_key => "dmsf_file_id" diff --git a/app/models/dmsf_folder.rb b/app/models/dmsf_folder.rb index 3b1a37df..e4f63069 100644 --- a/app/models/dmsf_folder.rb +++ b/app/models/dmsf_folder.rb @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + class DmsfFolder < ActiveRecord::Base unloadable belongs_to :project diff --git a/app/models/dmsf_mailer.rb b/app/models/dmsf_mailer.rb index 5a036fa2..f1263e26 100644 --- a/app/models/dmsf_mailer.rb +++ b/app/models/dmsf_mailer.rb @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + require "mailer" class DmsfMailer < Mailer diff --git a/app/models/dmsf_user_pref.rb b/app/models/dmsf_user_pref.rb index 4942d515..1cdfccab 100644 --- a/app/models/dmsf_user_pref.rb +++ b/app/models/dmsf_user_pref.rb @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + class DmsfUserPref < ActiveRecord::Base unloadable belongs_to :project diff --git a/db/migrate/01_create_hierarchy.rb b/db/migrate/01_create_hierarchy.rb index 62a25bd1..cb0e6e73 100644 --- a/db/migrate/01_create_hierarchy.rb +++ b/db/migrate/01_create_hierarchy.rb @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + class CreateHierarchy < ActiveRecord::Migration def self.up create_table :dmsf_folders do |t| diff --git a/init.rb b/init.rb index e9bd1c7e..37d41f62 100644 --- a/init.rb +++ b/init.rb @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + require 'redmine' Redmine::Plugin.register :redmine_dmsf do diff --git a/lib/tasks/dmsf_convert_documents.rake b/lib/tasks/dmsf_convert_documents.rake index 23dc01ce..54a5fc97 100644 --- a/lib/tasks/dmsf_convert_documents.rake +++ b/lib/tasks/dmsf_convert_documents.rake @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + desc <<-END_DESC Convert project documents to DMSF folder/file structure. diff --git a/test/test_helper.rb b/test/test_helper.rb index 7cc962ff..2b68ba10 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,3 +1,21 @@ +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + # Load the normal Rails helper require File.expand_path(File.dirname(__FILE__) + '/../../../../test/test_helper')