Skip to content

Commit 7f26e47

Browse files
committed
Merge branch 'redmine5'
2 parents aa74f68 + 3796efb commit 7f26e47

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+200
-167
lines changed

.github/workflows/brakeman.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Run Brakeman
22

3-
on: [push]
3+
on:
4+
- push
5+
- pull_request
46

57
jobs:
68
build:
@@ -23,7 +25,7 @@ jobs:
2325
- name: Setup Ruby
2426
uses: ruby/setup-ruby@v1
2527
with:
26-
ruby-version: 2.6
28+
ruby-version: 3.1
2729
bundler-cache: true
2830

2931
- name: Setup gems

.github/workflows/rubocop.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Run RuboCop
22

3-
on: [push]
3+
on:
4+
- push
5+
- pull_request
46

57
jobs:
68
build:
@@ -23,7 +25,7 @@ jobs:
2325
- name: Setup Ruby
2426
uses: ruby/setup-ruby@v1
2527
with:
26-
ruby-version: 2.6
28+
ruby-version: 3.1
2729
bundler-cache: true
2830

2931
- name: Setup gems

.github/workflows/stylelint.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Run StyleLint
22

3-
on: [push]
3+
on:
4+
- push
5+
- pull_request
46

57
jobs:
68
build:
@@ -11,6 +13,6 @@ jobs:
1113
- uses: actions/checkout@v2
1214
- uses: actions/setup-node@v2
1315
with:
14-
node-version: '14'
16+
node-version: '16'
1517
- run: yarn install
1618
- run: node_modules/.bin/stylelint "assets/stylesheets/*.css"

.github/workflows/test.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: Test
2+
23
on:
3-
push:
4-
pull_request:
4+
- push
5+
- pull_request
56

67
jobs:
78
test:
@@ -10,16 +11,9 @@ jobs:
1011

1112
strategy:
1213
matrix:
13-
ruby: ['2.7', '2.6', '3.0']
14-
redmine: ['4.1-stable', '4.2-stable', 'master']
14+
ruby: ['2.7', '3.0', '3.1']
15+
redmine: ['5.0-stable', 'master']
1516
db: ['postgres', 'mysql']
16-
exclude:
17-
- ruby: 2.7
18-
redmine: 4.1-stable
19-
- ruby: '3.0'
20-
redmine: 4.1-stable
21-
- ruby: '3.0'
22-
redmine: 4.2-stable
2317
fail-fast: false
2418

2519
services:
@@ -77,7 +71,10 @@ jobs:
7771
- name: Checkout redmine_sidekiq
7872
uses: actions/checkout@v2
7973
with:
80-
repository: ogom/redmine_sidekiq
74+
# TODO Switch back to the original repo, once https://github.com/ogom/redmine_sidekiq/pull/16 is released
75+
# repository: ogom/redmine_sidekiq
76+
repository: dosyfier/redmine_sidekiq
77+
ref: fix-rails-6
8178
path: redmine/plugins/redmine_sidekiq
8279

8380
- name: Checkout gitolite
@@ -100,6 +97,7 @@ jobs:
10097
libmysqlclient-dev
10198
libssh2-1
10299
libssh2-1-dev
100+
pkg-config
103101
subversion
104102
105103
- name: Setup Ruby
@@ -132,6 +130,7 @@ jobs:
132130
working-directory: redmine
133131
run: |
134132
bundle config set --local without 'development'
133+
bundle config build.rugged --with-ssh
135134
bundle install --jobs=4 --retry=3
136135
137136
- name: Run Redmine rake tasks

.rubocop.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,11 @@ Layout/SpaceBeforeBrackets:
124124
Rails/EnvironmentVariableAccess:
125125
Enabled: true
126126
AllowReads: true
127+
128+
# Hrack::Server requires the `initialize` method
129+
Style/RedundantInitialize:
130+
Enabled: false
131+
132+
# Because our unit tests assert that
133+
Rails/RedundantPresenceValidationOnBelongsTo:
134+
Enabled: false

Gemfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# frozen_string_literal: true
22

3+
source 'https://rubygems.org'
4+
35
# Gitolite Admin repository management
4-
gem 'gitolite-rugged', git: 'https://github.com/jbox-web/gitolite-rugged.git', tag: '1.4.0'
6+
gem 'gitolite-rugged', git: 'https://github.com/jbox-web/gitolite-rugged.git', tag: '1.5.0'
57

68
# Ruby/Rack Git Smart-HTTP Server Handler
79
gem 'gitlab-grack', '~> 2.0.0', git: 'https://github.com/jbox-web/grack.git', require: 'grack', branch: 'fix_gemfile'
@@ -16,9 +18,7 @@ gem 'hiredis'
1618
gem 'redis'
1719

1820
# Markdown rendering
19-
gem 'deckar01-task_list'
2021
gem 'escape_utils'
21-
gem 'html-pipeline', '~> 2.13.2'
2222
gem 'rinku'
2323

2424
# Syntaxic coloration

app/controllers/concerns/xitolite_repository_finder.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ def find_xitolite_repository_by_path
1616
repo_path = "#{params[:repo_path]}.git"
1717
repository = Repository::Xitolite.find_by_path repo_path, loose: true
1818
if repository.nil?
19-
RedmineGitHosting.logger.error "GoRedirector : repository not found at path : '#{repo_path}'," \
20-
' exiting!'
19+
RedmineGitHosting.logger.error "GoRedirector : repository not found at path : '#{repo_path}', " \
20+
'exiting!'
2121
render_404
2222
elsif !repository.go_access_available?
23-
RedmineGitHosting.logger.error "GoRedirector : GoAccess is disabled for this repository '#{repository.gitolite_repository_name}'," \
24-
' exiting!'
23+
RedmineGitHosting.logger.error "GoRedirector : GoAccess is disabled for this repository '#{repository.gitolite_repository_name}', " \
24+
'exiting!'
2525
render_403
2626
else
2727
RedmineGitHosting.logger.info "GoRedirector : access granted for repository '#{repository.gitolite_repository_name}'"

app/overrides/repositories/navigation.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@
55
insert_before: 'erb[loud]:contains("label_statistics")',
66
original: '88f120e99075ba3246901c6e970ca671d7166855',
77
text: '<%= call_hook(:view_repositories_navigation, repository: @repository) %>'
8+
9+
module Repositories
10+
module Navigation
11+
end
12+
end

app/overrides/repositories/show.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@
1111
insert_before: 'erb[silent]:contains("html_title")',
1212
original: '2a0a09659d76066b896016c72527d479c69463ec',
1313
partial: 'hooks/show_repositories_sidebar'
14+
15+
module Repositories
16+
module Show
17+
end
18+
end

app/views/settings/redmine_git_hosting/_gitolite_config_test.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@ fieldset.box.tabular
9292
br
9393
fieldset.box.tabular
9494
legend = l :label_path_directories
95-
pre == (ENV['PATH']).gsub(/:/, '<br/>')
95+
pre == ENV.fetch('PATH', nil).gsub(/:/, '<br/>')

0 commit comments

Comments
 (0)