From 13214689ae7f7440178cd8890ed958d059e58fc9 Mon Sep 17 00:00:00 2001 From: Marius BALTEANU Date: Mon, 3 Jun 2019 20:29:49 +0000 Subject: [PATCH 3/3] Add missing frozen string literals and copyrights --- app/models/time_entry_import.rb | 19 ++++++++++++++++++ .../redmine_plugin/redmine_plugin_generator.rb | 19 ++++++++++++++++++ .../redmine_plugin_controller_generator.rb | 19 ++++++++++++++++++ .../redmine_plugin_model_generator.rb | 23 ++++++++++++++++++++-- lib/redmine/project_jump_box.rb | 19 ++++++++++++++++++ test/unit/lib/redmine/project_jump_box_test.rb | 19 ++++++++++++++++++ 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 4348516..567cdf9 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 ce2e2aa..0a7340f 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 16a820e..1c36d5c 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 f26f877..66daaf7 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 5978dc1..d3116a3 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 3753755..38a0b78 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 bf662ef..cc732f0 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 -- 2.1.4