Skip to content

Commit

Permalink
Merge pull request ixti#224 from ixti/fix-redmine-4.2
Browse files Browse the repository at this point in the history
Fix redmine 4.2
  • Loading branch information
ixti authored Apr 12, 2021
2 parents 1c2e829 + e366eca commit 2c0c66c
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 73 deletions.
84 changes: 84 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
version: 2.1

jobs:
test:
parameters:
database:
type: string
redmine:
type: string
ruby:
type: string
docker:
- image: circleci/ruby:<< parameters.ruby >>
environment:
RAILS_ENV: test
- image: circleci/postgres:13.2
environment:
POSTGRES_USER: postgres
POSTGRES_DB: redmine
POSTGRES_PASSWORD: supers3kretdonthacklel
- image: circleci/mysql:8.0.23
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_USER: redmineuser
MYSQL_DATABASE: redmine
MYSQL_PASSWORD: supers3kretdonthacklel
MYSQL_ROOT_PASSWORD: supers3kretdonthacklel
steps:
- checkout
- run: |
set -ex
git clone https://github.com/redmine/redmine.git --branch << parameters.redmine >> --depth 1 redmine
ln -s $PWD $PWD/redmine/plugins/redmine_tags
cp config/database-<< parameters.database >>-test.yml redmine/config/database.yml
- restore_cache:
keys:
- redmine-<< parameters.database >>-<< parameters.redmine >>-<< parameters.ruby >>
- run: |
set -ex
cd redmine
bundle config jobs 4
bundle config retry 3
bundle config path vendor/bundle
bundle install
- save_cache:
key: redmine-<< parameters.database >>-<< parameters.redmine >>-<< parameters.ruby >>
paths:
- redmine/vendor/bundle
- run: |
set -ex
cd redmine
mv plugins/redmine_tags .
bundle exec rake db:create db:migrate
mv redmine_tags plugins/
bundle exec rake redmine:plugins:migrate NAME=redmine_tags
bundle exec rake redmine:plugins:test NAME=redmine_tags
workflows:
test:
jobs:
- test:
matrix:
parameters:
database: ['mysql', 'postgres']
redmine: ['4.2.0', '4.2-stable', '4.1.2', '4.1-stable']
ruby: ['2.7.3', '2.6.7', '2.5.9']
exclude:
- database: 'mysql'
redmine: '4.1.2'
ruby: '2.7.3'
- database: 'mysql'
redmine: '4.1-stable'
ruby: '2.7.3'
- database: 'postgres'
redmine: '4.1.2'
ruby: '2.7.3'
- database: 'postgres'
redmine: '4.1-stable'
ruby: '2.7.3'
1 change: 1 addition & 0 deletions .ruby-gemset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
redmine-tags
51 changes: 0 additions & 51 deletions .travis.yml

This file was deleted.

19 changes: 0 additions & 19 deletions Makefile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# http://about.travis-ci.org/docs/user/database-setup/#MySQL
test:
adapter: mysql2
host: 127.0.0.1
database: redmine
username: travis
encoding: utf8
username: redmineuser
password: supers3kretdonthacklel
encoding: utf8mb4
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# http://about.travis-ci.org/docs/user/database-setup/#PostgreSQL
test:
adapter: postgresql
host: localhost
database: redmine
username: postgres
password: supers3kretdonthacklel
3 changes: 2 additions & 1 deletion lib/redmine_tags/patches/api_template_handler_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ def self.included(base)
base.extend(ClassMethods)
base.class_eval do
class << self
alias_method_chain :call, :redmine_tags
alias_method :call_without_redmine_tags, :call
alias_method :call, :call_with_redmine_tags
end
end
end
Expand Down

0 comments on commit 2c0c66c

Please sign in to comment.