diff options
-rw-r--r-- | app/models/time_entry_import.rb | 19 | ||||
-rw-r--r-- | lib/generators/redmine_plugin/redmine_plugin_generator.rb | 19 | ||||
-rw-r--r-- | lib/generators/redmine_plugin_controller/redmine_plugin_controller_generator.rb | 19 | ||||
-rw-r--r-- | lib/generators/redmine_plugin_model/redmine_plugin_model_generator.rb | 23 | ||||
-rw-r--r-- | lib/redmine/project_jump_box.rb | 19 | ||||
-rw-r--r-- | test/unit/lib/redmine/project_jump_box_test.rb | 19 | ||||
-rw-r--r-- | test/unit/time_entry_import_test.rb | 19 |
7 files changed, 135 insertions, 2 deletions
diff --git a/app/models/time_entry_import.rb b/app/models/time_entry_import.rb index 434851606..567cdf9cf 100644 --- a/app/models/time_entry_import.rb +++ b/app/models/time_entry_import.rb @@ -1,3 +1,22 @@ +# frozen_string_literal: true + +# Redmine - project management software +# Copyright (C) 2006-2019 Jean-Philippe Lang +# +# 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 TimeEntryImport < Import def self.menu_item :time_entries diff --git a/lib/generators/redmine_plugin/redmine_plugin_generator.rb b/lib/generators/redmine_plugin/redmine_plugin_generator.rb index ce2e2aa42..0a7340fce 100644 --- a/lib/generators/redmine_plugin/redmine_plugin_generator.rb +++ b/lib/generators/redmine_plugin/redmine_plugin_generator.rb @@ -1,3 +1,22 @@ +# frozen_string_literal: true + +# Redmine - project management software +# Copyright (C) 2006-2019 Jean-Philippe Lang +# +# 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 RedminePluginGenerator < Rails::Generators::NamedBase source_root File.expand_path("../templates", __FILE__) diff --git a/lib/generators/redmine_plugin_controller/redmine_plugin_controller_generator.rb b/lib/generators/redmine_plugin_controller/redmine_plugin_controller_generator.rb index 16a820ebf..1c36d5c7a 100644 --- a/lib/generators/redmine_plugin_controller/redmine_plugin_controller_generator.rb +++ b/lib/generators/redmine_plugin_controller/redmine_plugin_controller_generator.rb @@ -1,3 +1,22 @@ +# frozen_string_literal: true + +# Redmine - project management software +# Copyright (C) 2006-2019 Jean-Philippe Lang +# +# 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 RedminePluginControllerGenerator < Rails::Generators::NamedBase source_root File.expand_path("../templates", __FILE__) argument :controller, :type => :string diff --git a/lib/generators/redmine_plugin_model/redmine_plugin_model_generator.rb b/lib/generators/redmine_plugin_model/redmine_plugin_model_generator.rb index f26f8779c..66daaf792 100644 --- a/lib/generators/redmine_plugin_model/redmine_plugin_model_generator.rb +++ b/lib/generators/redmine_plugin_model/redmine_plugin_model_generator.rb @@ -1,5 +1,24 @@ +# frozen_string_literal: true + +# Redmine - project management software +# Copyright (C) 2006-2019 Jean-Philippe Lang +# +# 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 RedminePluginModelGenerator < Rails::Generators::NamedBase - + source_root File.expand_path("../templates", __FILE__) argument :model, :type => :string argument :attributes, :type => :array, :default => [], :banner => "field[:type][:index] field[:type][:index]" @@ -24,7 +43,7 @@ class RedminePluginModelGenerator < Rails::Generators::NamedBase def copy_templates template 'model.rb.erb', "#{plugin_path}/app/models/#{model.underscore}.rb" template 'unit_test.rb.erb', "#{plugin_path}/test/unit/#{model.underscore}_test.rb" - + migration_filename = "%03i_#{@migration_filename}.rb" % (migration_number + 1) template "migration.rb", "#{plugin_path}/db/migrate/#{migration_filename}" end diff --git a/lib/redmine/project_jump_box.rb b/lib/redmine/project_jump_box.rb index 5978dc19a..d3116a3ff 100644 --- a/lib/redmine/project_jump_box.rb +++ b/lib/redmine/project_jump_box.rb @@ -1,3 +1,22 @@ +# frozen_string_literal: true + +# Redmine - project management software +# Copyright (C) 2006-2019 Jean-Philippe Lang +# +# 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. + module Redmine class ProjectJumpBox def initialize(user) diff --git a/test/unit/lib/redmine/project_jump_box_test.rb b/test/unit/lib/redmine/project_jump_box_test.rb index 375375556..38a0b78cc 100644 --- a/test/unit/lib/redmine/project_jump_box_test.rb +++ b/test/unit/lib/redmine/project_jump_box_test.rb @@ -1,3 +1,22 @@ +# frozen_string_literal: true + +# Redmine - project management software +# Copyright (C) 2006-2019 Jean-Philippe Lang +# +# 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 File.expand_path('../../../../test_helper', __FILE__) class Redmine::ProjectJumpBoxTest < ActiveSupport::TestCase diff --git a/test/unit/time_entry_import_test.rb b/test/unit/time_entry_import_test.rb index bf662efcf..cc732f0d7 100644 --- a/test/unit/time_entry_import_test.rb +++ b/test/unit/time_entry_import_test.rb @@ -1,3 +1,22 @@ +# frozen_string_literal: true + +# Redmine - project management software +# Copyright (C) 2006-2019 Jean-Philippe Lang +# +# 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 File.expand_path('../../test_helper', __FILE__) class TimeEntryImportTest < ActiveSupport::TestCase |