Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to redmine 4.x #47

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 19 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,27 @@ services:
- postgresql

rvm:
- 2.2.0
- 2.2.2
- 2.3
- 2.4
- 2.5
- 2.6

gemfile:
- $REDMINE_PATH/Gemfile

env:
- REDMINE_VER=3.1.6 DB=mysql
- REDMINE_VER=3.2.3 DB=mysql
- REDMINE_VER=3.3.0 DB=mysql

- REDMINE_VER=3.1.6 DB=postgresql
- REDMINE_VER=3.2.3 DB=postgresql
- REDMINE_VER=3.3.0 DB=postgresql
- REDMINE_VER=4.0.0 DB=mysql
- REDMINE_VER=4.0.1 DB=mysql
- REDMINE_VER=4.0.2 DB=mysql
- REDMINE_VER=4.0.3 DB=mysql
- REDMINE_VER=4.0.4 DB=mysql

- REDMINE_VER=4.0.0 DB=postgresql
- REDMINE_VER=4.0.1 DB=postgresql
- REDMINE_VER=4.0.2 DB=postgresql
- REDMINE_VER=4.0.3 DB=postgresql
- REDMINE_VER=4.0.4 DB=postgresql

before_install:
- export PLUGIN_NAME=redmine_custom_reports
Expand All @@ -28,9 +36,9 @@ before_install:
- cd $REDMINE_PATH

before_script:
- bundle exec rake db:create
- bundle exec rake db:migrate
- bundle exec rake redmine:plugins:migrate
- bundle exec rails db:create
- bundle exec rails db:migrate
- bundle exec rails redmine:plugins:migrate

script:
- bundle exec ruby plugins/$PLUGIN_NAME/test/**/*_test.rb
Expand Down
10 changes: 5 additions & 5 deletions app/controllers/custom_reports_controller.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
class CustomReportsController < ApplicationController
unloadable

before_filter :find_project_by_project_id
before_filter :authorize
before_filter :find_custom_reports, only: [:index, :show, :new, :edit]
before_filter :find_custom_report, only: [:show, :edit, :update, :destroy]
before_filter :authorize_to_manage, only: [:edit, :update, :destroy]
before_action :find_project_by_project_id
before_action :authorize
before_action :find_custom_reports, only: [:index, :show, :new, :edit]
before_action :find_custom_report, only: [:show, :edit, :update, :destroy]
before_action :authorize_to_manage, only: [:edit, :update, :destroy]

helper :queries
include QueriesHelper
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20121212125001_create_custom_reports.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateCustomReports < ActiveRecord::Migration
class CreateCustomReports < ActiveRecord::Migration[4.2]
def self.up
unless table_exists? :custom_reports
create_table :custom_reports do |t|
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20121212125002_create_custom_report_series.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateCustomReportSeries < ActiveRecord::Migration
class CreateCustomReportSeries < ActiveRecord::Migration[4.2]
def self.up
unless table_exists? :custom_report_series
create_table :custom_report_series do |t|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RemoveFiltersFromCustomReports < ActiveRecord::Migration
class RemoveFiltersFromCustomReports < ActiveRecord::Migration[4.2]
def self.up
if column_exists? :custom_reports, :filters
remove_column :custom_reports, :filters
Expand Down
2 changes: 1 addition & 1 deletion lib/redmine_custom_reports.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ActionDispatch::Callbacks.to_prepare do
ActiveSupport::Reloader.to_prepare do

# Requiring plugin's controller and model
require_dependency 'custom_report'
Expand Down