Skip to content

Commit 77d0fd2

Browse files
committed
Update CI config: add Redmine 6 and drop support of Redmine 4
1 parent f3e18bc commit 77d0fd2

File tree

7 files changed

+18
-15
lines changed

7 files changed

+18
-15
lines changed

.github/workflows/5_1_3.yml renamed to .github/workflows/5_1_5.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: Tests 5.1.3
1+
name: Tests 5.1.5
22

33
env:
44
PLUGIN_NAME: redmine_datetime_custom_field
5-
REDMINE_VERSION: 5.1.3
5+
REDMINE_VERSION: 5.1.5
66
RAILS_ENV: test
77

88
on:

.github/workflows/4_2_11.yml renamed to .github/workflows/6_0_2.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: Tests 4.2.11
1+
name: Tests 6.0.2
22

33
env:
44
PLUGIN_NAME: redmine_datetime_custom_field
5-
REDMINE_VERSION: 4.2.11
5+
REDMINE_VERSION: 6.0.2
66
RAILS_ENV: test
77

88
on:
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
ruby: ['2.7']
19+
ruby: ['3.3']
2020
db: ['postgres']
2121
fail-fast: false
2222

@@ -89,12 +89,9 @@ jobs:
8989
- name: Prepare Redmine source
9090
working-directory: redmine
9191
run: |
92-
# TODO Remove the following line when https://www.redmine.org/issues/40551 is fixed
93-
sed -i -e 's/.*mocha.*/ gem "mocha", "2.1.0"/' Gemfile # Fix core tests not compatible with Mocha 2.2.0
9492
sed -i '/rubocop/d' Gemfile
9593
rm -f .rubocop*
9694
cp plugins/redmine_base_rspec/spec/support/database-${{ matrix.db }}.yml config/database.yml
97-
echo 'gem "builder", "~> 3.2.4"' >> Gemfile
9895
9996
- name: Install Ruby dependencies
10097
working-directory: redmine

.github/workflows/master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
ruby: ['3.2']
19+
ruby: ['3.3']
2020
db: ['postgres']
2121
fail-fast: false
2222

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ Note that this plugin has a dependency. You have to install this other plugin:
1212

1313
|Plugin branch| Redmine Version | Test Status |
1414
|-------------|-----------------|-------------------|
15-
|master | 4.2.11 | [![4.2.11][1]][5] |
16-
|master | 5.1.3 | [![5.1.3][2]][5] |
15+
|master | 6.0.2 | [![6.0.2][1]][5] |
16+
|master | 5.1.5 | [![5.1.5][2]][5] |
1717
|master | master | [![master][4]][5] |
1818

19-
[1]: https://github.com/nanego/redmine_datetime_custom_field/actions/workflows/4_2_11.yml/badge.svg
20-
[2]: https://github.com/nanego/redmine_datetime_custom_field/actions/workflows/5_1_3.yml/badge.svg
19+
[1]: https://github.com/nanego/redmine_datetime_custom_field/actions/workflows/6_0_2.yml/badge.svg
20+
[2]: https://github.com/nanego/redmine_datetime_custom_field/actions/workflows/5_1_5.yml/badge.svg
2121
[4]: https://github.com/nanego/redmine_datetime_custom_field/actions/workflows/master.yml/badge.svg
2222
[5]: https://github.com/nanego/redmine_datetime_custom_field/actions

init.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,10 @@
1313

1414
# Custom patches
1515
require_relative 'lib/redmine_datetime_custom_field/hooks'
16+
17+
# Support for Redmine 5
18+
if Redmine::VERSION::MAJOR < 6
19+
class ApplicationRecord < ActiveRecord::Base
20+
self.abstract_class = true
21+
end
22+
end

lib/redmine_datetime_custom_field/custom_field_patch.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ module CustomFieldPatch
55
def self.included(base)
66
base.send(:include, InstanceMethods)
77
base.class_eval do
8-
unloadable
98
safe_attributes 'show_hours', 'show_shortcut'
109
end
1110
end

lib/redmine_datetime_custom_field/query_patch.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
module RedmineDatetimeCustomField::QueryPatch
55
end
66

7-
class Query < ActiveRecord::Base
7+
class Query < ApplicationRecord
88

99
def validate_query_filters
1010
filters.each_key do |field|

0 commit comments

Comments
 (0)