diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 21a0735..18eab42 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -9,10 +9,10 @@ services: # Update 'VARIANT' to pick a version of Ruby: 3, 3.0, 2, 2.7, 2.6 # Append -bullseye or -buster to pin to an OS version. # Use -bullseye variants on local arm64/Apple Silicon. - RUBY_VERSION: "3.1" + RUBY_VERSION: "3.2" # Optional Node.js version to install NODE_VERSION: "lts/*" - REDMINE_VERSION: "5.1-stable" + REDMINE_VERSION: "6.0-stable" # Overrides default command so things don't shut down after the process ends. command: sleep infinity diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3840204..170861a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,6 @@ name: build on: push: - branches-ignore: pull_request: env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} @@ -11,17 +10,8 @@ jobs: strategy: matrix: db: [sqlite3, mysql, postgres] - ruby_version: ["2.7", "3.0", "3.1", "3.2"] - redmine_version: [4.2-stable, 5.0-stable, 5.1-stable, master] - exclude: - - ruby_version: "3.0" - redmine_version: 4.2-stable - - ruby_version: "3.1" - redmine_version: 4.2-stable - - ruby_version: "3.2" - redmine_version: 4.2-stable - - ruby_version: "3.2" - redmine_version: 5.0-stable + ruby_version: ["3.1", "3.2", "3.3"] + redmine_version: [6.0-stable, master] services: mysql: image: mysql:5.7 diff --git a/Gemfile_for_test b/Gemfile_for_test index 4d727d8..f830914 100644 --- a/Gemfile_for_test +++ b/Gemfile_for_test @@ -1,6 +1,6 @@ group :test do - gem 'factory_girl_rails' + # gem 'factory_girl_rails' #gem 'shoulda-matchers' gem 'shoulda' gem 'simplecov-lcov', :require => false diff --git a/app/models/wiki_extensions_comment.rb b/app/models/wiki_extensions_comment.rb index 0158a19..1e1542d 100644 --- a/app/models/wiki_extensions_comment.rb +++ b/app/models/wiki_extensions_comment.rb @@ -14,7 +14,7 @@ # 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 WikiExtensionsComment < ActiveRecord::Base +class WikiExtensionsComment < ApplicationRecord belongs_to :user belongs_to :wiki_page validates_presence_of :comment, :wiki_page_id, :user_id diff --git a/app/models/wiki_extensions_count.rb b/app/models/wiki_extensions_count.rb index ae3e386..4204d2a 100644 --- a/app/models/wiki_extensions_count.rb +++ b/app/models/wiki_extensions_count.rb @@ -14,7 +14,7 @@ # 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 WikiExtensionsCount < ActiveRecord::Base +class WikiExtensionsCount < ApplicationRecord belongs_to :project belongs_to :page, :foreign_key => :page_id, :class_name => 'WikiPage' validates_presence_of :project diff --git a/app/models/wiki_extensions_menu.rb b/app/models/wiki_extensions_menu.rb index 662faa7..5edb92a 100644 --- a/app/models/wiki_extensions_menu.rb +++ b/app/models/wiki_extensions_menu.rb @@ -14,7 +14,7 @@ # 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 WikiExtensionsMenu < ActiveRecord::Base +class WikiExtensionsMenu < ApplicationRecord include Redmine::SafeAttributes belongs_to :project validates_presence_of :project_id diff --git a/app/models/wiki_extensions_setting.rb b/app/models/wiki_extensions_setting.rb index 2648938..4e7b0b4 100644 --- a/app/models/wiki_extensions_setting.rb +++ b/app/models/wiki_extensions_setting.rb @@ -14,7 +14,7 @@ # 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 WikiExtensionsSetting < ActiveRecord::Base +class WikiExtensionsSetting < ApplicationRecord belongs_to :project #attr_accessible :auto_preview_enabled, :tag_disabled diff --git a/app/models/wiki_extensions_tag.rb b/app/models/wiki_extensions_tag.rb index 8632b0f..351c336 100644 --- a/app/models/wiki_extensions_tag.rb +++ b/app/models/wiki_extensions_tag.rb @@ -14,7 +14,7 @@ # 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 WikiExtensionsTag < ActiveRecord::Base +class WikiExtensionsTag < ApplicationRecord #attr_accessible :name, :project_id validates_presence_of :name, :project_id validates_uniqueness_of :name, :scope => :project_id diff --git a/app/models/wiki_extensions_tag_relation.rb b/app/models/wiki_extensions_tag_relation.rb index e6c1412..1df76f1 100644 --- a/app/models/wiki_extensions_tag_relation.rb +++ b/app/models/wiki_extensions_tag_relation.rb @@ -14,7 +14,7 @@ # 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 WikiExtensionsTagRelation < ActiveRecord::Base +class WikiExtensionsTagRelation < ApplicationRecord belongs_to :wiki_page belongs_to :tag, :class_name => 'WikiExtensionsTag', :foreign_key => :tag_id validates_presence_of :wiki_page_id, :tag_id diff --git a/app/models/wiki_extensions_vote.rb b/app/models/wiki_extensions_vote.rb index 8e7105c..94e968a 100644 --- a/app/models/wiki_extensions_vote.rb +++ b/app/models/wiki_extensions_vote.rb @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -class WikiExtensionsVote < ActiveRecord::Base +class WikiExtensionsVote < ApplicationRecord validates_presence_of :target_class_name, :target_id, :keystr, :count validates_uniqueness_of :keystr, :scope => [:target_class_name, :target_id] @@ -48,4 +48,3 @@ def self.find_or_create(class_name, obj_id, key_str) return vote end end - \ No newline at end of file diff --git a/init.rb b/init.rb index 2b2944e..b5e3b2f 100644 --- a/init.rb +++ b/init.rb @@ -1,5 +1,5 @@ # Wiki Extensions plugin for Redmine -# Copyright (C) 2009-2023 Haruyuki Iida +# Copyright (C) 2009-2024 Haruyuki Iida # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -43,7 +43,7 @@ description 'This is a Wiki Extensions plugin for Redmine' url 'http://www.r-labs.org/projects/r-labs/wiki/Wiki_Extensions_en' version '0.9.5' - requires_redmine :version_or_higher => '4.0.0' + requires_redmine :version_or_higher => '6.0.0' project_module :wiki_extensions do permission :wiki_extensions_vote, { :wiki_extensions => [:vote, :show_vote] }, :public => true