diff options
author | Go MAEDA <maeda@farend.jp> | 2019-06-04 06:36:20 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-06-04 06:36:20 +0000 |
commit | a7fbb4719a3c09e85e39a8de5097df8a76a0289a (patch) | |
tree | 488fe03579430529857f2bf6782ac2aa97a3463a /lib/generators | |
parent | 80a52e17d0ef938253416869443b1a01fc07ac39 (diff) | |
download | redmine-a7fbb4719a3c09e85e39a8de5097df8a76a0289a.tar.gz redmine-a7fbb4719a3c09e85e39a8de5097df8a76a0289a.zip |
Add missing frozen string literals and copyrights (#31508).
git-svn-id: http://svn.redmine.org/redmine/trunk@18225 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/generators')
3 files changed, 59 insertions, 2 deletions
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 |