Skip to content

Commit 7219cce

Browse files
committed
Merge branch 'devel' of https://github.com/jbox-web/redmine_git_hosting into fix_sub-uri
2 parents 8fd4873 + 14bee3c commit 7219cce

File tree

123 files changed

+380
-754
lines changed

Some content is hidden

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

123 files changed

+380
-754
lines changed

Diff for: .travis.yml

+32-10
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ branches:
1111
- /^feat_.*$/
1212
matrix:
1313
include:
14+
- rvm: 2.2.0
15+
env: REDMINE_VERSION=3.2-stable USE_SVN=true DATABASE_ADAPTER=mysql
16+
gemfile: Gemfile
17+
- rvm: 2.2.0
18+
env: REDMINE_VERSION=3.2-stable USE_SVN=true DATABASE_ADAPTER=postgresql
19+
gemfile: Gemfile
1420
- rvm: 2.2.0
1521
env: REDMINE_VERSION=3.1-stable USE_SVN=true DATABASE_ADAPTER=mysql
1622
gemfile: Gemfile
@@ -24,16 +30,22 @@ matrix:
2430
env: REDMINE_VERSION=3.0-stable USE_SVN=true DATABASE_ADAPTER=postgresql
2531
gemfile: Gemfile
2632
- rvm: 2.2.0
27-
env: REDMINE_VERSION=3.0.6 DATABASE_ADAPTER=mysql
33+
env: REDMINE_VERSION=3.0.7 DATABASE_ADAPTER=mysql
34+
gemfile: Gemfile
35+
- rvm: 2.2.0
36+
env: REDMINE_VERSION=3.0.7 DATABASE_ADAPTER=postgresql
37+
gemfile: Gemfile
38+
- rvm: 2.2.0
39+
env: REDMINE_VERSION=3.1.3 DATABASE_ADAPTER=mysql
2840
gemfile: Gemfile
2941
- rvm: 2.2.0
30-
env: REDMINE_VERSION=3.0.6 DATABASE_ADAPTER=postgresql
42+
env: REDMINE_VERSION=3.1.3 DATABASE_ADAPTER=postgresql
3143
gemfile: Gemfile
3244
- rvm: 2.2.0
33-
env: REDMINE_VERSION=3.1.2 DATABASE_ADAPTER=mysql
45+
env: REDMINE_VERSION=3.2.0 DATABASE_ADAPTER=mysql
3446
gemfile: Gemfile
3547
- rvm: 2.2.0
36-
env: REDMINE_VERSION=3.1.2 DATABASE_ADAPTER=postgresql
48+
env: REDMINE_VERSION=3.2.0 DATABASE_ADAPTER=postgresql
3749
gemfile: Gemfile
3850
env:
3951
global:
@@ -46,20 +58,30 @@ env:
4658
- POSTGRES_DATABASE=redmine
4759
- POSTGRES_USER=postgres
4860
matrix:
61+
- REDMINE_VERSION=3.2-stable USE_SVN=true DATABASE_ADAPTER=mysql
62+
- REDMINE_VERSION=3.2-stable USE_SVN=true DATABASE_ADAPTER=postgresql
4963
- REDMINE_VERSION=3.1-stable USE_SVN=true DATABASE_ADAPTER=mysql
5064
- REDMINE_VERSION=3.1-stable USE_SVN=true DATABASE_ADAPTER=postgresql
5165
- REDMINE_VERSION=3.0-stable USE_SVN=true DATABASE_ADAPTER=mysql
5266
- REDMINE_VERSION=3.0-stable USE_SVN=true DATABASE_ADAPTER=postgresql
5367
- REDMINE_VERSION=2.6-stable USE_SVN=true DATABASE_ADAPTER=mysql
5468
- REDMINE_VERSION=2.6-stable USE_SVN=true DATABASE_ADAPTER=postgresql
5569

56-
- REDMINE_VERSION=3.1.2 DATABASE_ADAPTER=mysql
57-
- REDMINE_VERSION=3.1.2 DATABASE_ADAPTER=postgresql
58-
- REDMINE_VERSION=3.0.6 DATABASE_ADAPTER=mysql
59-
- REDMINE_VERSION=3.0.6 DATABASE_ADAPTER=postgresql
60-
- REDMINE_VERSION=2.6.8 DATABASE_ADAPTER=mysql
61-
- REDMINE_VERSION=2.6.8 DATABASE_ADAPTER=postgresql
70+
- REDMINE_VERSION=3.2.0 DATABASE_ADAPTER=mysql
71+
- REDMINE_VERSION=3.2.0 DATABASE_ADAPTER=postgresql
72+
- REDMINE_VERSION=3.1.3 DATABASE_ADAPTER=mysql
73+
- REDMINE_VERSION=3.1.3 DATABASE_ADAPTER=postgresql
74+
- REDMINE_VERSION=3.0.7 DATABASE_ADAPTER=mysql
75+
- REDMINE_VERSION=3.0.7 DATABASE_ADAPTER=postgresql
76+
- REDMINE_VERSION=2.6.9 DATABASE_ADAPTER=mysql
77+
- REDMINE_VERSION=2.6.9 DATABASE_ADAPTER=postgresql
6278

79+
# - REDMINE_VERSION=3.1.2 DATABASE_ADAPTER=mysql
80+
# - REDMINE_VERSION=3.1.2 DATABASE_ADAPTER=postgresql
81+
# - REDMINE_VERSION=3.0.6 DATABASE_ADAPTER=mysql
82+
# - REDMINE_VERSION=3.0.6 DATABASE_ADAPTER=postgresql
83+
# - REDMINE_VERSION=2.6.8 DATABASE_ADAPTER=mysql
84+
# - REDMINE_VERSION=2.6.8 DATABASE_ADAPTER=postgresql
6385
# - REDMINE_VERSION=3.1.1 DATABASE_ADAPTER=mysql
6486
# - REDMINE_VERSION=3.1.1 DATABASE_ADAPTER=postgresql
6587
# - REDMINE_VERSION=3.0.5 DATABASE_ADAPTER=mysql

Diff for: CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
## CHANGELOG
22

3+
### 1.2.0 - 2015-11-18
4+
5+
* Enhance protected branches permissions support : [#389](https://github.com/jbox-web/redmine_git_hosting/issues/389), [#414](https://github.com/jbox-web/redmine_git_hosting/issues/414)
6+
* Add support for [Gitolite options](http://gitolite.com/gitolite/options.html) : [#415](https://github.com/jbox-web/redmine_git_hosting/issues/415)
7+
* Enhance global repository access : [#465](https://github.com/jbox-web/redmine_git_hosting/issues/465). You can now choose if Redmine has RW access on all repositories.
8+
* Improve validation of plugin settings. Validation errors are now displayed in the view.
9+
* Use our own Rack implementation to render Gitolite hooks
10+
* Fix [push over HTTP](http://redmine-git-hosting.io/troubleshooting/#hook-errors-while-pushing-over-https)
11+
* Cleanup code/API
12+
* Improve coding style
13+
* Display contributors in plugins info page ;)
14+
315
### 1.1.5 - 2015-11-18
416

517
* Fix wrong behavior of GoRedirectorController when project is private

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You can follow announcements [here](http://redmine-git-hosting.io/blog/) or take
1919

2020
## Installation
2121

22-
The installation tutorial is [here](http://redmine-git-hosting.io/get_started/). The migration tutorial is [here](http://redmine-git-hosting.io/how-to/migrate/).
22+
The installation guide is [here](http://redmine-git-hosting.io/get_started/). The migration guide is [here](http://redmine-git-hosting.io/how-to/migrate/).
2323

2424
Read the documentation and more on the [project's website](http://redmine-git-hosting.io/).
2525

Diff for: app/controllers/archived_repositories_controller.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class ArchivedRepositoriesController < RepositoriesController
2-
unloadable
32

43
skip_before_filter :authorize
54
skip_before_filter :find_project_repository, only: :index

Diff for: app/controllers/download_git_revision_controller.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class DownloadGitRevisionController < ApplicationController
2-
unloadable
32

43
include XitoliteRepositoryFinder
54

Diff for: app/controllers/gitolite_public_keys_controller.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class GitolitePublicKeysController < ApplicationController
2-
unloadable
32

43
include RedmineGitHosting::GitoliteAccessor::Methods
54

Diff for: app/controllers/go_redirector_controller.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class GoRedirectorController < ApplicationController
2-
unloadable
32

43
include XitoliteRepositoryFinder
54

Diff for: app/controllers/redmine_git_hosting_controller.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class RedmineGitHostingController < ApplicationController
2-
unloadable
32

43
include XitoliteRepositoryFinder
54

Diff for: app/controllers/repository_deployment_credentials_controller.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class RepositoryDeploymentCredentialsController < RedmineGitHostingController
2-
unloadable
32

43
include RedmineGitHosting::GitoliteAccessor::Methods
54

Diff for: app/controllers/repository_git_config_keys_controller.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class RepositoryGitConfigKeysController < RedmineGitHostingController
2-
unloadable
32

43
include RedmineGitHosting::GitoliteAccessor::Methods
54

Diff for: app/controllers/repository_git_extras_controller.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class RepositoryGitExtrasController < RedmineGitHostingController
2-
unloadable
32

43
include RedmineGitHosting::GitoliteAccessor::Methods
54

Diff for: app/controllers/repository_git_notifications_controller.rb

-70
This file was deleted.

Diff for: app/controllers/repository_mirrors_controller.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class RepositoryMirrorsController < RedmineGitHostingController
2-
unloadable
32

43
before_filter :check_xitolite_permissions
54
before_filter :find_repository_mirror, except: [:index, :new, :create]

Diff for: app/controllers/repository_post_receive_urls_controller.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class RepositoryPostReceiveUrlsController < RedmineGitHostingController
2-
unloadable
32

43
before_filter :check_xitolite_permissions
54
before_filter :find_repository_post_receive_url, except: [:index, :new, :create]

Diff for: app/controllers/repository_protected_branches_controller.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class RepositoryProtectedBranchesController < RedmineGitHostingController
2-
unloadable
32

43
include RedmineGitHosting::GitoliteAccessor::Methods
54

Diff for: app/forms/move_repository_form.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class MoveRepositoryForm
2-
unloadable
32

43
include BaseForm
54

Diff for: app/forms/plugin_settings_form.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class PluginSettingsForm
2-
unloadable
32

43
class << self
54

Diff for: app/helpers/extend_repositories_helper.rb

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ def encoding_field(form, repository)
1010
end
1111

1212

13+
def available_download_format(repository, rev = nil)
14+
%w(zip tar tar.gz).map { |f| [f, download_git_revision_repository_path(repository, rev: rev, download_format: f)] }
15+
end
16+
17+
1318
def create_readme_field(form, repository)
1419
content_tag(:p) do
1520
hidden_field_tag('repository[create_readme]', 'false', id: '') +

Diff for: app/helpers/repository_protected_branches_helper.rb

-11
This file was deleted.

Diff for: app/models/concerns/gitolitable/notifications.rb

+17-9
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,41 @@ module Gitolitable
22
module Notifications
33
extend ActiveSupport::Concern
44

5-
def notifier
6-
@notifier ||= ::GitNotifier.new(self)
5+
def mailing_list
6+
default_list + global_include_list - global_exclude_list
77
end
88

99

1010
def default_list
11-
notifier.default_list
11+
watcher_users.map(&:email_address).map(&:address)
1212
end
1313

1414

15-
def mail_mapping
16-
notifier.mail_mapping
15+
def global_include_list
16+
RedmineGitHosting::Config.gitolite_notify_global_include
1717
end
1818

1919

20-
def mailing_list
21-
notifier.mailing_list
20+
def global_exclude_list
21+
RedmineGitHosting::Config.gitolite_notify_global_exclude
2222
end
2323

2424

2525
def sender_address
26-
notifier.sender_address
26+
if extra.notification_sender.nil? || extra.notification_sender.empty?
27+
RedmineGitHosting::Config.gitolite_notify_global_sender_address
28+
else
29+
extra.notification_sender
30+
end
2731
end
2832

2933

3034
def email_prefix
31-
notifier.email_prefix
35+
if extra.notification_prefix.nil? || extra.notification_prefix.empty?
36+
RedmineGitHosting::Config.gitolite_notify_global_prefix
37+
else
38+
extra.notification_prefix
39+
end
3240
end
3341

3442
end

Diff for: app/models/concerns/gitolitable/users.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def users_for_closed_project
4747

4848

4949
def users
50-
project.member_principals.map(&:user).compact.uniq
50+
project.users_available
5151
end
5252

5353

Diff for: app/models/git_cache.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class GitCache < ActiveRecord::Base
2-
unloadable
32

43
CACHE_ADAPTERS = [
54
['Database', 'database'],

Diff for: app/models/github_comment.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class GithubComment < ActiveRecord::Base
2-
unloadable
32

43
## Relations
54
belongs_to :journal

Diff for: app/models/github_issue.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class GithubIssue < ActiveRecord::Base
2-
unloadable
32

43
## Relations
54
belongs_to :issue

Diff for: app/models/gitolite_public_key.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class GitolitePublicKey < ActiveRecord::Base
2-
unloadable
32

43
TITLE_LENGTH_LIMIT = 60
54

Diff for: app/models/protected_branches_member.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
class ProtectedBranchesMember < ActiveRecord::Base
2-
unloadable
2+
3+
## Attributes
4+
attr_accessible :principal_id, :inherited_by
35

46
## Relations
57
belongs_to :protected_branch, class_name: 'RepositoryProtectedBranche'

Diff for: app/models/repository/xitolite.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
require_dependency 'redmine/scm/adapters/xitolite_adapter'
22

33
class Repository::Xitolite < Repository::Git
4-
unloadable
54

65
# Include Gitolitable concern
76
include Gitolitable
@@ -15,7 +14,6 @@ class Repository::Xitolite < Repository::Git
1514

1615
# Relations
1716
has_one :extra, dependent: :destroy, foreign_key: 'repository_id', class_name: 'RepositoryGitExtra'
18-
has_one :git_notification, dependent: :destroy, foreign_key: 'repository_id', class_name: 'RepositoryGitNotification'
1917
has_many :mirrors, dependent: :destroy, foreign_key: 'repository_id', class_name: 'RepositoryMirror'
2018
has_many :post_receive_urls, dependent: :destroy, foreign_key: 'repository_id', class_name: 'RepositoryPostReceiveUrl'
2119
has_many :deployment_credentials, dependent: :destroy, foreign_key: 'repository_id', class_name: 'RepositoryDeploymentCredential'
@@ -27,6 +25,7 @@ class Repository::Xitolite < Repository::Git
2725
# Additionnal validations
2826
validate :valid_repository_options, on: :create
2927

28+
acts_as_watchable
3029

3130
class << self
3231

Diff for: app/models/repository_deployment_credential.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class RepositoryDeploymentCredential < ActiveRecord::Base
2-
unloadable
32

43
VALID_PERMS = ['R', 'RW+']
54
DEFAULT_PERM = 'RW+'

0 commit comments

Comments
 (0)