Resourcified repositories for CRUD operations to prepare for multiple SCM per project (#779).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8648 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
6f462d373f
commit
fb1a2fd7cd
@ -176,7 +176,6 @@ class ProjectsController < ApplicationController
|
|||||||
@issue_category ||= IssueCategory.new
|
@issue_category ||= IssueCategory.new
|
||||||
@member ||= @project.members.new
|
@member ||= @project.members.new
|
||||||
@trackers = Tracker.all
|
@trackers = Tracker.all
|
||||||
@repository ||= @project.repository
|
|
||||||
@wiki ||= @project.wiki
|
@wiki ||= @project.wiki
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -24,44 +24,45 @@ class InvalidRevisionParam < Exception; end
|
|||||||
|
|
||||||
class RepositoriesController < ApplicationController
|
class RepositoriesController < ApplicationController
|
||||||
menu_item :repository
|
menu_item :repository
|
||||||
menu_item :settings, :only => :edit
|
menu_item :settings, :only => [:new, :create, :edit, :update, :destroy, :committers]
|
||||||
default_search_scope :changesets
|
default_search_scope :changesets
|
||||||
|
|
||||||
before_filter :find_repository, :except => :edit
|
before_filter :find_project_by_project_id, :only => [:new, :create]
|
||||||
before_filter :find_project, :only => :edit
|
before_filter :check_repository_uniqueness, :only => [:new, :create]
|
||||||
|
before_filter :find_repository, :only => [:edit, :update, :destroy, :committers]
|
||||||
|
before_filter :find_project_repository, :except => [:new, :create, :edit, :update, :destroy, :committers]
|
||||||
before_filter :authorize
|
before_filter :authorize
|
||||||
accept_rss_auth :revisions
|
accept_rss_auth :revisions
|
||||||
|
|
||||||
rescue_from Redmine::Scm::Adapters::CommandFailed, :with => :show_error_command_failed
|
rescue_from Redmine::Scm::Adapters::CommandFailed, :with => :show_error_command_failed
|
||||||
|
|
||||||
|
def new
|
||||||
|
scm = params[:repository_scm] || Redmine::Scm::Base.all.first
|
||||||
|
@repository = Repository.factory(scm)
|
||||||
|
@repository.project = @project
|
||||||
|
render :layout => !request.xhr?
|
||||||
|
end
|
||||||
|
|
||||||
|
def create
|
||||||
|
@repository = Repository.factory(params[:repository_scm], params[:repository])
|
||||||
|
@repository.project = @project
|
||||||
|
if request.post? && @repository.save
|
||||||
|
redirect_to settings_project_path(@project, :tab => 'repositories')
|
||||||
|
else
|
||||||
|
render :action => 'new'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@repository = @project.repository
|
end
|
||||||
if !@repository && !params[:repository_scm].blank?
|
|
||||||
@repository = Repository.factory(params[:repository_scm])
|
def update
|
||||||
@repository.project = @project if @repository
|
@repository.attributes = params[:repository]
|
||||||
end
|
@repository.project = @project
|
||||||
if request.post? && @repository
|
if request.put? && @repository.save
|
||||||
p1 = params[:repository]
|
redirect_to settings_project_path(@project, :tab => 'repositories')
|
||||||
p = {}
|
else
|
||||||
p_extra = {}
|
render :action => 'edit'
|
||||||
p1.each do |k, v|
|
|
||||||
if k =~ /^extra_/
|
|
||||||
p_extra[k] = v
|
|
||||||
else
|
|
||||||
p[k] = v
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@repository.attributes = p
|
|
||||||
@repository.merge_extra_info(p_extra)
|
|
||||||
@repository.save
|
|
||||||
end
|
|
||||||
render(:update) do |page|
|
|
||||||
page.replace_html "tab-content-repository",
|
|
||||||
:partial => 'projects/settings/repository'
|
|
||||||
if @repository && !@project.repository
|
|
||||||
@project.reload # needed to reload association
|
|
||||||
page.replace_html "main-menu", render_main_menu(@project)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -76,16 +77,13 @@ class RepositoriesController < ApplicationController
|
|||||||
# Build a hash with repository usernames as keys and corresponding user ids as values
|
# Build a hash with repository usernames as keys and corresponding user ids as values
|
||||||
@repository.committer_ids = params[:committers].values.inject({}) {|h, c| h[c.first] = c.last; h}
|
@repository.committer_ids = params[:committers].values.inject({}) {|h, c| h[c.first] = c.last; h}
|
||||||
flash[:notice] = l(:notice_successful_update)
|
flash[:notice] = l(:notice_successful_update)
|
||||||
redirect_to :action => 'committers', :id => @project
|
redirect_to settings_project_path(@project, :tab => 'repositories')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
@repository.destroy
|
@repository.destroy if request.delete?
|
||||||
redirect_to :controller => 'projects',
|
redirect_to settings_project_path(@project, :tab => 'repositories')
|
||||||
:action => 'settings',
|
|
||||||
:id => @project,
|
|
||||||
:tab => 'repository'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@ -250,9 +248,23 @@ class RepositoriesController < ApplicationController
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def find_repository
|
||||||
|
@repository = Repository.find(params[:id])
|
||||||
|
@project = @repository.project
|
||||||
|
rescue ActiveRecord::RecordNotFound
|
||||||
|
render_404
|
||||||
|
end
|
||||||
|
|
||||||
|
# TODO: remove it when multiple SCM support is added
|
||||||
|
def check_repository_uniqueness
|
||||||
|
if @project.repository
|
||||||
|
redirect_to settings_project_path(@project, :tab => 'repositories')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
REV_PARAM_RE = %r{\A[a-f0-9]*\Z}i
|
REV_PARAM_RE = %r{\A[a-f0-9]*\Z}i
|
||||||
|
|
||||||
def find_repository
|
def find_project_repository
|
||||||
@project = Project.find(params[:id])
|
@project = Project.find(params[:id])
|
||||||
@repository = @project.repository
|
@repository = @project.repository
|
||||||
(render_404; return false) unless @repository
|
(render_404; return false) unless @repository
|
||||||
|
@ -30,7 +30,7 @@ module ProjectsHelper
|
|||||||
{:name => 'versions', :action => :manage_versions, :partial => 'projects/settings/versions', :label => :label_version_plural},
|
{:name => 'versions', :action => :manage_versions, :partial => 'projects/settings/versions', :label => :label_version_plural},
|
||||||
{:name => 'categories', :action => :manage_categories, :partial => 'projects/settings/issue_categories', :label => :label_issue_category_plural},
|
{:name => 'categories', :action => :manage_categories, :partial => 'projects/settings/issue_categories', :label => :label_issue_category_plural},
|
||||||
{:name => 'wiki', :action => :manage_wiki, :partial => 'projects/settings/wiki', :label => :label_wiki},
|
{:name => 'wiki', :action => :manage_wiki, :partial => 'projects/settings/wiki', :label => :label_wiki},
|
||||||
{:name => 'repository', :action => :manage_repository, :partial => 'projects/settings/repository', :label => :label_repository},
|
{:name => 'repositories', :action => :manage_repository, :partial => 'projects/settings/repositories', :label => :label_repository},
|
||||||
{:name => 'boards', :action => :manage_boards, :partial => 'projects/settings/boards', :label => :label_board_plural},
|
{:name => 'boards', :action => :manage_boards, :partial => 'projects/settings/boards', :label => :label_board_plural},
|
||||||
{:name => 'activities', :action => :manage_project_activities, :partial => 'projects/settings/activities', :label => :enumeration_activities}
|
{:name => 'activities', :action => :manage_project_activities, :partial => 'projects/settings/activities', :label => :enumeration_activities}
|
||||||
]
|
]
|
||||||
|
@ -139,13 +139,10 @@ module RepositoriesHelper
|
|||||||
options_for_select(scm_options, repository.class.name.demodulize),
|
options_for_select(scm_options, repository.class.name.demodulize),
|
||||||
:disabled => (repository && !repository.new_record?),
|
:disabled => (repository && !repository.new_record?),
|
||||||
:onchange => remote_function(
|
:onchange => remote_function(
|
||||||
:url => {
|
:url => new_project_repository_path(@project),
|
||||||
:controller => 'repositories',
|
:method => :get,
|
||||||
:action => 'edit',
|
:update => 'content',
|
||||||
:id => @project
|
:with => "Form.serialize(this.form)")
|
||||||
},
|
|
||||||
:method => :get,
|
|
||||||
:with => "Form.serialize(this.form)")
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -48,6 +48,26 @@ class Repository < ActiveRecord::Base
|
|||||||
super(attr_name, *args)
|
super(attr_name, *args)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
alias :attributes_without_extra_info= :attributes=
|
||||||
|
def attributes=(new_attributes, guard_protected_attributes = true)
|
||||||
|
return if new_attributes.nil?
|
||||||
|
attributes = new_attributes.dup
|
||||||
|
attributes.stringify_keys!
|
||||||
|
|
||||||
|
p = {}
|
||||||
|
p_extra = {}
|
||||||
|
attributes.each do |k, v|
|
||||||
|
if k =~ /^extra_/
|
||||||
|
p_extra[k] = v
|
||||||
|
else
|
||||||
|
p[k] = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
send :attributes_without_extra_info=, p, guard_protected_attributes
|
||||||
|
merge_extra_info(p_extra)
|
||||||
|
end
|
||||||
|
|
||||||
# Removes leading and trailing whitespace
|
# Removes leading and trailing whitespace
|
||||||
def url=(arg)
|
def url=(arg)
|
||||||
write_attribute(:url, arg ? arg.to_s.strip : nil)
|
write_attribute(:url, arg ? arg.to_s.strip : nil)
|
||||||
|
36
app/views/projects/settings/_repositories.html.erb
Normal file
36
app/views/projects/settings/_repositories.html.erb
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<% if @project.repository %>
|
||||||
|
<table class="list">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><%= l(:label_scm) %></th>
|
||||||
|
<th><%= l(:label_repository) %></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% repository = @project.repository %>
|
||||||
|
<tr class="<%= cycle 'odd', 'even' %>">
|
||||||
|
<td><%=h repository.scm_name %></td>
|
||||||
|
<td><%=h repository.url %></td>
|
||||||
|
<td class="buttons">
|
||||||
|
<% if User.current.allowed_to?(:manage_repository, @project) %>
|
||||||
|
<%= link_to(l(:label_user_plural), committers_repository_path(repository),
|
||||||
|
:class => 'icon icon-user') %>
|
||||||
|
<%= link_to(l(:button_edit), edit_repository_path(repository),
|
||||||
|
:class => 'icon icon-edit') %>
|
||||||
|
<%= link_to(l(:button_delete), repository_path(repository),
|
||||||
|
:confirm => l(:text_are_you_sure),
|
||||||
|
:method => :delete,
|
||||||
|
:class => 'icon icon-del') %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<% else %>
|
||||||
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if @project.repository.nil? && User.current.allowed_to?(:manage_repository, @project) %>
|
||||||
|
<p><%= link_to l(:label_repository_new), new_project_repository_path(@project), :class => 'icon icon-add' %></p>
|
||||||
|
<% end %>
|
22
app/views/repositories/_form.html.erb
Normal file
22
app/views/repositories/_form.html.erb
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<%= error_messages_for 'repository' %>
|
||||||
|
|
||||||
|
<div class="box tabular">
|
||||||
|
<p>
|
||||||
|
<%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %>
|
||||||
|
<% if @repository && ! @repository.class.scm_available %>
|
||||||
|
<br />
|
||||||
|
<em><%= content_tag 'span', l(:text_scm_command_not_available), :class => 'error' %></em>
|
||||||
|
<% end %>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<% button_disabled = true %>
|
||||||
|
<% if @repository %>
|
||||||
|
<% button_disabled = ! @repository.class.scm_available %>
|
||||||
|
<%= repository_field_tags(f, @repository)%>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<%= submit_tag(@repository.new_record? ? l(:button_create) : l(:button_save), :disabled => button_disabled) %>
|
||||||
|
<%= link_to l(:button_cancel), settings_project_path(@project, :tab => 'repositories') %>
|
||||||
|
</p>
|
5
app/views/repositories/edit.html.erb
Normal file
5
app/views/repositories/edit.html.erb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<h2><%= l(:label_repository) %></h2>
|
||||||
|
|
||||||
|
<% labelled_form_for :repository, @repository, :url => repository_path(@path), :html => {:method => :put} do |f| %>
|
||||||
|
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||||
|
<% end %>
|
5
app/views/repositories/new.html.erb
Normal file
5
app/views/repositories/new.html.erb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<h2><%= l(:label_repository_new) %></h2>
|
||||||
|
|
||||||
|
<% labelled_form_for :repository, @repository, :url => project_repositories_path(@project) do |f| %>
|
||||||
|
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||||
|
<% end %>
|
@ -1011,3 +1011,4 @@ ar:
|
|||||||
zero: 0 قضية
|
zero: 0 قضية
|
||||||
one: 1 قضية
|
one: 1 قضية
|
||||||
other: "%{count} قضايا"
|
other: "%{count} قضايا"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1009,3 +1009,4 @@ bg:
|
|||||||
description_date_range_interval: Изберете диапазон чрез задаване на начална и крайна дати
|
description_date_range_interval: Изберете диапазон чрез задаване на начална и крайна дати
|
||||||
description_date_from: Въведете начална дата
|
description_date_from: Въведете начална дата
|
||||||
description_date_to: Въведете крайна дата
|
description_date_to: Въведете крайна дата
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1025,3 +1025,4 @@ bs:
|
|||||||
zero: 0 aktivnost
|
zero: 0 aktivnost
|
||||||
one: 1 aktivnost
|
one: 1 aktivnost
|
||||||
other: "%{count} aktivnosti"
|
other: "%{count} aktivnosti"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1013,3 +1013,4 @@ ca:
|
|||||||
zero: 0 assumpte
|
zero: 0 assumpte
|
||||||
one: 1 assumpte
|
one: 1 assumpte
|
||||||
other: "%{count} assumptes"
|
other: "%{count} assumptes"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1014,3 +1014,4 @@ cs:
|
|||||||
zero: 0 Úkol
|
zero: 0 Úkol
|
||||||
one: 1 Úkol
|
one: 1 Úkol
|
||||||
other: "%{count} Úkoly"
|
other: "%{count} Úkoly"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1028,3 +1028,4 @@ da:
|
|||||||
zero: 0 sag
|
zero: 0 sag
|
||||||
one: 1 sag
|
one: 1 sag
|
||||||
other: "%{count} sager"
|
other: "%{count} sager"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1031,3 +1031,4 @@ de:
|
|||||||
zero: 0 ticket
|
zero: 0 ticket
|
||||||
one: 1 ticket
|
one: 1 ticket
|
||||||
other: "%{count} tickets"
|
other: "%{count} tickets"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1011,3 +1011,4 @@ el:
|
|||||||
zero: 0 Θέμα
|
zero: 0 Θέμα
|
||||||
one: 1 Θέμα
|
one: 1 Θέμα
|
||||||
other: "%{count} Θέματα"
|
other: "%{count} Θέματα"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1013,3 +1013,4 @@ en-GB:
|
|||||||
zero: 0 issue
|
zero: 0 issue
|
||||||
one: 1 issue
|
one: 1 issue
|
||||||
other: "%{count} issues"
|
other: "%{count} issues"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -650,6 +650,7 @@ en:
|
|||||||
label_not_contains: doesn't contain
|
label_not_contains: doesn't contain
|
||||||
label_day_plural: days
|
label_day_plural: days
|
||||||
label_repository: Repository
|
label_repository: Repository
|
||||||
|
label_repository_new: New repository
|
||||||
label_repository_plural: Repositories
|
label_repository_plural: Repositories
|
||||||
label_browse: Browse
|
label_browse: Browse
|
||||||
label_modification: "%{count} change"
|
label_modification: "%{count} change"
|
||||||
|
@ -1048,3 +1048,4 @@ es:
|
|||||||
zero: 0 petición
|
zero: 0 petición
|
||||||
one: 1 petición
|
one: 1 petición
|
||||||
other: "%{count} peticiones"
|
other: "%{count} peticiones"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1014,3 +1014,4 @@ eu:
|
|||||||
zero: 0 zeregina
|
zero: 0 zeregina
|
||||||
one: 1 zeregina
|
one: 1 zeregina
|
||||||
other: "%{count} zereginak"
|
other: "%{count} zereginak"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1013,3 +1013,4 @@ fa:
|
|||||||
zero: 0 پیامد
|
zero: 0 پیامد
|
||||||
one: 1 پیامد
|
one: 1 پیامد
|
||||||
other: "%{count} پیامد"
|
other: "%{count} پیامد"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1032,3 +1032,4 @@ fi:
|
|||||||
zero: 0 tapahtuma
|
zero: 0 tapahtuma
|
||||||
one: 1 tapahtuma
|
one: 1 tapahtuma
|
||||||
other: "%{count} tapahtumat"
|
other: "%{count} tapahtumat"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -640,6 +640,7 @@ fr:
|
|||||||
label_not_contains: ne contient pas
|
label_not_contains: ne contient pas
|
||||||
label_day_plural: jours
|
label_day_plural: jours
|
||||||
label_repository: Dépôt
|
label_repository: Dépôt
|
||||||
|
label_repository_new: Nouveau dépôt
|
||||||
label_repository_plural: Dépôts
|
label_repository_plural: Dépôts
|
||||||
label_browse: Parcourir
|
label_browse: Parcourir
|
||||||
label_modification: "%{count} modification"
|
label_modification: "%{count} modification"
|
||||||
|
@ -1022,3 +1022,4 @@ gl:
|
|||||||
zero: 0 petición
|
zero: 0 petición
|
||||||
one: 1 petición
|
one: 1 petición
|
||||||
other: "%{count} peticións"
|
other: "%{count} peticións"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1016,3 +1016,4 @@ he:
|
|||||||
zero: 0 נושא
|
zero: 0 נושא
|
||||||
one: 1 נושא
|
one: 1 נושא
|
||||||
other: "%{count} נושאים"
|
other: "%{count} נושאים"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1017,3 +1017,4 @@ hr:
|
|||||||
zero: 0 predmet
|
zero: 0 predmet
|
||||||
one: 1 predmet
|
one: 1 predmet
|
||||||
other: "%{count} predmeti"
|
other: "%{count} predmeti"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1030,3 +1030,4 @@
|
|||||||
zero: 0 feladat
|
zero: 0 feladat
|
||||||
one: 1 feladat
|
one: 1 feladat
|
||||||
other: "%{count} feladatok"
|
other: "%{count} feladatok"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1017,3 +1017,4 @@ id:
|
|||||||
zero: 0 masalah
|
zero: 0 masalah
|
||||||
one: 1 masalah
|
one: 1 masalah
|
||||||
other: "%{count} masalah"
|
other: "%{count} masalah"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1012,3 +1012,4 @@ it:
|
|||||||
zero: 0 segnalazione
|
zero: 0 segnalazione
|
||||||
one: 1 segnalazione
|
one: 1 segnalazione
|
||||||
other: "%{count} segnalazioni"
|
other: "%{count} segnalazioni"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1041,3 +1041,4 @@ ja:
|
|||||||
zero: 0 チケット
|
zero: 0 チケット
|
||||||
one: 1 チケット
|
one: 1 チケット
|
||||||
other: "%{count} チケット"
|
other: "%{count} チケット"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1063,3 +1063,4 @@ ko:
|
|||||||
zero: 0 일감
|
zero: 0 일감
|
||||||
one: 1 일감
|
one: 1 일감
|
||||||
other: "%{count} 일감"
|
other: "%{count} 일감"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1071,3 +1071,4 @@ lt:
|
|||||||
zero: 0 darbas
|
zero: 0 darbas
|
||||||
one: 1 darbas
|
one: 1 darbas
|
||||||
other: "%{count} darbai"
|
other: "%{count} darbai"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1005,3 +1005,4 @@ lv:
|
|||||||
zero: 0 uzdevums
|
zero: 0 uzdevums
|
||||||
one: 1 uzdevums
|
one: 1 uzdevums
|
||||||
other: "%{count} uzdevumi"
|
other: "%{count} uzdevumi"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1011,3 +1011,4 @@ mk:
|
|||||||
zero: 0 Задача
|
zero: 0 Задача
|
||||||
one: 1 Задача
|
one: 1 Задача
|
||||||
other: "%{count} Задачи"
|
other: "%{count} Задачи"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1011,3 +1011,4 @@ mn:
|
|||||||
zero: 0 Асуудал
|
zero: 0 Асуудал
|
||||||
one: 1 Асуудал
|
one: 1 Асуудал
|
||||||
other: "%{count} Асуудлууд"
|
other: "%{count} Асуудлууд"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -993,3 +993,4 @@ nl:
|
|||||||
zero: 0 issue
|
zero: 0 issue
|
||||||
one: 1 issue
|
one: 1 issue
|
||||||
other: "%{count} issues"
|
other: "%{count} issues"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1001,3 +1001,4 @@
|
|||||||
zero: 0 sak
|
zero: 0 sak
|
||||||
one: 1 sak
|
one: 1 sak
|
||||||
other: "%{count} saker"
|
other: "%{count} saker"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1028,3 +1028,4 @@ pl:
|
|||||||
zero: 0 zagadnienie
|
zero: 0 zagadnienie
|
||||||
one: 1 zagadnienie
|
one: 1 zagadnienie
|
||||||
other: "%{count} zagadnienia"
|
other: "%{count} zagadnienia"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1034,3 +1034,4 @@ pt-BR:
|
|||||||
zero: 0 tarefa
|
zero: 0 tarefa
|
||||||
one: 1 tarefa
|
one: 1 tarefa
|
||||||
other: "%{count} tarefas"
|
other: "%{count} tarefas"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1016,3 +1016,4 @@ pt:
|
|||||||
zero: 0 tarefa
|
zero: 0 tarefa
|
||||||
one: 1 tarefa
|
one: 1 tarefa
|
||||||
other: "%{count} tarefas"
|
other: "%{count} tarefas"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1003,3 +1003,4 @@ ro:
|
|||||||
zero: 0 tichet
|
zero: 0 tichet
|
||||||
one: 1 tichet
|
one: 1 tichet
|
||||||
other: "%{count} tichete"
|
other: "%{count} tichete"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1124,3 +1124,4 @@ ru:
|
|||||||
zero: 0 Задача
|
zero: 0 Задача
|
||||||
one: 1 Задача
|
one: 1 Задача
|
||||||
other: "%{count} Задачи"
|
other: "%{count} Задачи"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1006,3 +1006,4 @@ sk:
|
|||||||
zero: 0 Úloha
|
zero: 0 Úloha
|
||||||
one: 1 Úloha
|
one: 1 Úloha
|
||||||
other: "%{count} Úlohy"
|
other: "%{count} Úlohy"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1011,3 +1011,4 @@ sl:
|
|||||||
zero: 0 zahtevek
|
zero: 0 zahtevek
|
||||||
one: 1 zahtevek
|
one: 1 zahtevek
|
||||||
other: "%{count} zahtevki"
|
other: "%{count} zahtevki"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1011,3 +1011,4 @@ sr-YU:
|
|||||||
zero: 0 problem
|
zero: 0 problem
|
||||||
one: 1 problem
|
one: 1 problem
|
||||||
other: "%{count} problemi"
|
other: "%{count} problemi"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1012,3 +1012,4 @@ sr:
|
|||||||
zero: 0 Проблем
|
zero: 0 Проблем
|
||||||
one: 1 Проблем
|
one: 1 Проблем
|
||||||
other: "%{count} Проблеми"
|
other: "%{count} Проблеми"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1052,3 +1052,4 @@ sv:
|
|||||||
zero: 0 Ärende
|
zero: 0 Ärende
|
||||||
one: 1 Ärende
|
one: 1 Ärende
|
||||||
other: "%{count} Ärenden"
|
other: "%{count} Ärenden"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1008,3 +1008,4 @@ th:
|
|||||||
zero: 0 ปัญหา
|
zero: 0 ปัญหา
|
||||||
one: 1 ปัญหา
|
one: 1 ปัญหา
|
||||||
other: "%{count} ปัญหา"
|
other: "%{count} ปัญหา"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1030,3 +1030,4 @@ tr:
|
|||||||
zero: 0 İş
|
zero: 0 İş
|
||||||
one: 1 İş
|
one: 1 İş
|
||||||
other: "%{count} İşler"
|
other: "%{count} İşler"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1008,3 +1008,4 @@ uk:
|
|||||||
zero: 0 Питання
|
zero: 0 Питання
|
||||||
one: 1 Питання
|
one: 1 Питання
|
||||||
other: "%{count} Питання"
|
other: "%{count} Питання"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1062,3 +1062,4 @@ vi:
|
|||||||
zero: 0 vấn đề
|
zero: 0 vấn đề
|
||||||
one: 1 vấn đề
|
one: 1 vấn đề
|
||||||
other: "%{count} vấn đề"
|
other: "%{count} vấn đề"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1091,3 +1091,4 @@
|
|||||||
zero: 0 問題
|
zero: 0 問題
|
||||||
one: 1 問題
|
one: 1 問題
|
||||||
other: "%{count} 問題清單"
|
other: "%{count} 問題清單"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -1013,3 +1013,4 @@ zh:
|
|||||||
zero: 0 问题
|
zero: 0 问题
|
||||||
one: 1 问题
|
one: 1 问题
|
||||||
other: "%{count} 问题"
|
other: "%{count} 问题"
|
||||||
|
label_repository_new: New repository
|
||||||
|
@ -176,6 +176,8 @@ ActionController::Routing::Routes.draw do |map|
|
|||||||
project.resources :issue_categories, :shallow => true
|
project.resources :issue_categories, :shallow => true
|
||||||
project.resources :documents, :shallow => true, :member => {:add_attachment => :post}
|
project.resources :documents, :shallow => true, :member => {:add_attachment => :post}
|
||||||
project.resources :boards
|
project.resources :boards
|
||||||
|
project.resources :repositories, :shallow => true, :except => [:index, :show],
|
||||||
|
:member => {:committers => [:get, :post]}
|
||||||
|
|
||||||
project.wiki_start_page 'wiki', :controller => 'wiki', :action => 'show', :conditions => {:method => :get}
|
project.wiki_start_page 'wiki', :controller => 'wiki', :action => 'show', :conditions => {:method => :get}
|
||||||
project.wiki_index 'wiki/index', :controller => 'wiki', :action => 'index', :conditions => {:method => :get}
|
project.wiki_index 'wiki/index', :controller => 'wiki', :action => 'index', :conditions => {:method => :get}
|
||||||
@ -272,16 +274,6 @@ ActionController::Routing::Routes.draw do |map|
|
|||||||
repositories.connect 'projects/:id/repository/revision',
|
repositories.connect 'projects/:id/repository/revision',
|
||||||
:action => 'revision',
|
:action => 'revision',
|
||||||
:conditions => {:method => [:get, :post]}
|
:conditions => {:method => [:get, :post]}
|
||||||
|
|
||||||
repositories.connect 'projects/:id/repository/committers',
|
|
||||||
:action => 'committers',
|
|
||||||
:conditions => {:method => [:get, :post]}
|
|
||||||
repositories.connect 'projects/:id/repository/edit',
|
|
||||||
:action => 'edit',
|
|
||||||
:conditions => {:method => [:get, :post]}
|
|
||||||
repositories.connect 'projects/:id/repository/destroy',
|
|
||||||
:action => 'destroy',
|
|
||||||
:conditions => {:method => :post}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# additional routes for having the file name at the end of url
|
# additional routes for having the file name at the end of url
|
||||||
|
@ -124,7 +124,7 @@ Redmine::AccessControl.map do |map|
|
|||||||
end
|
end
|
||||||
|
|
||||||
map.project_module :repository do |map|
|
map.project_module :repository do |map|
|
||||||
map.permission :manage_repository, {:repositories => [:edit, :committers, :destroy]}, :require => :member
|
map.permission :manage_repository, {:repositories => [:new, :create, :edit, :update, :committers, :destroy]}, :require => :member
|
||||||
map.permission :browse_repository, :repositories => [:show, :browse, :entry, :annotate, :changes, :diff, :stats, :graph]
|
map.permission :browse_repository, :repositories => [:show, :browse, :entry, :annotate, :changes, :diff, :stats, :graph]
|
||||||
map.permission :view_changesets, :repositories => [:show, :revisions, :revision]
|
map.permission :view_changesets, :repositories => [:show, :revisions, :revision]
|
||||||
map.permission :commit_access, {}
|
map.permission :commit_access, {}
|
||||||
|
@ -51,8 +51,8 @@ namespace :test do
|
|||||||
(supported_scms - [:subversion, :mercurial]).each do |scm|
|
(supported_scms - [:subversion, :mercurial]).each do |scm|
|
||||||
desc "Creates a test #{scm} repository"
|
desc "Creates a test #{scm} repository"
|
||||||
task scm => :create_dir do
|
task scm => :create_dir do
|
||||||
# system "gunzip < test/fixtures/repositories/#{scm}_repository.tar.gz | tar -xv -C tmp/test"
|
system "gunzip < test/fixtures/repositories/#{scm}_repository.tar.gz | tar -xv -C tmp/test"
|
||||||
system "tar -xvz -C tmp/test -f test/fixtures/repositories/#{scm}_repository.tar.gz"
|
#system "tar -xvz -C tmp/test -f test/fixtures/repositories/#{scm}_repository.tar.gz"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
4
test/fixtures/enabled_modules.yml
vendored
4
test/fixtures/enabled_modules.yml
vendored
@ -99,3 +99,7 @@ enabled_modules_025:
|
|||||||
name: news
|
name: news
|
||||||
project_id: 2
|
project_id: 2
|
||||||
id: 25
|
id: 25
|
||||||
|
enabled_modules_026:
|
||||||
|
name: repository
|
||||||
|
project_id: 2
|
||||||
|
id: 26
|
||||||
|
@ -37,15 +37,14 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
if File.directory?(REPOSITORY_PATH)
|
if File.directory?(REPOSITORY_PATH)
|
||||||
def test_get_edit
|
def test_get_new
|
||||||
@request.session[:user_id] = 1
|
@request.session[:user_id] = 1
|
||||||
@project.repository.destroy
|
@project.repository.destroy
|
||||||
xhr :get, :edit, :id => 'subproject1', :repository_scm => 'Bazaar'
|
get :new, :project_id => 'subproject1', :repository_scm => 'Bazaar'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_equal 'text/javascript', @response.content_type
|
assert_template 'new'
|
||||||
assert_kind_of Repository::Bazaar, assigns(:repository)
|
assert_kind_of Repository::Bazaar, assigns(:repository)
|
||||||
assert assigns(:repository).new_record?
|
assert assigns(:repository).new_record?
|
||||||
assert_select_rjs :replace_html, 'tab-content-repository'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_browse_root
|
def test_browse_root
|
||||||
@ -157,10 +156,11 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase
|
|||||||
@request.session[:user_id] = 1 # admin
|
@request.session[:user_id] = 1 # admin
|
||||||
assert_equal 0, @repository.changesets.count
|
assert_equal 0, @repository.changesets.count
|
||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
@project.reload
|
|
||||||
assert @repository.changesets.count > 0
|
assert @repository.changesets.count > 0
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
assert_difference 'Repository.count', -1 do
|
||||||
|
delete :destroy, :id => @repository.id
|
||||||
|
end
|
||||||
assert_response 302
|
assert_response 302
|
||||||
@project.reload
|
@project.reload
|
||||||
assert_nil @project.repository
|
assert_nil @project.repository
|
||||||
@ -168,26 +168,18 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase
|
|||||||
|
|
||||||
def test_destroy_invalid_repository
|
def test_destroy_invalid_repository
|
||||||
@request.session[:user_id] = 1 # admin
|
@request.session[:user_id] = 1 # admin
|
||||||
assert_equal 0, @repository.changesets.count
|
@project.repository.destroy
|
||||||
@repository.fetch_changesets
|
@repository = Repository::Bazaar.create!(
|
||||||
@project.reload
|
|
||||||
assert @repository.changesets.count > 0
|
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
|
||||||
assert_response 302
|
|
||||||
@project.reload
|
|
||||||
assert_nil @project.repository
|
|
||||||
|
|
||||||
@repository = Repository::Bazaar.create(
|
|
||||||
:project => @project,
|
:project => @project,
|
||||||
:url => "/invalid",
|
:url => "/invalid",
|
||||||
:log_encoding => 'UTF-8')
|
:log_encoding => 'UTF-8')
|
||||||
assert @repository
|
|
||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
@repository.reload
|
@repository.reload
|
||||||
assert_equal 0, @repository.changesets.count
|
assert_equal 0, @repository.changesets.count
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
assert_difference 'Repository.count', -1 do
|
||||||
|
delete :destroy, :id => @repository.id
|
||||||
|
end
|
||||||
assert_response 302
|
assert_response 302
|
||||||
@project.reload
|
@project.reload
|
||||||
assert_nil @project.repository
|
assert_nil @project.repository
|
||||||
|
@ -22,7 +22,7 @@ require 'repositories_controller'
|
|||||||
class RepositoriesController; def rescue_action(e) raise e end; end
|
class RepositoriesController; def rescue_action(e) raise e end; end
|
||||||
|
|
||||||
class RepositoriesControllerTest < ActionController::TestCase
|
class RepositoriesControllerTest < ActionController::TestCase
|
||||||
fixtures :projects, :users, :roles, :members, :member_roles,
|
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules,
|
||||||
:repositories, :issues, :issue_statuses, :changesets, :changes,
|
:repositories, :issues, :issue_statuses, :changesets, :changes,
|
||||||
:issue_categories, :enumerations, :custom_fields, :custom_values, :trackers
|
:issue_categories, :enumerations, :custom_fields, :custom_values, :trackers
|
||||||
|
|
||||||
@ -33,6 +33,82 @@ class RepositoriesControllerTest < ActionController::TestCase
|
|||||||
User.current = nil
|
User.current = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_new
|
||||||
|
@request.session[:user_id] = 1
|
||||||
|
get :new, :project_id => 'subproject1'
|
||||||
|
assert_response :success
|
||||||
|
assert_template 'new'
|
||||||
|
assert_kind_of Repository::Subversion, assigns(:repository)
|
||||||
|
assert assigns(:repository).new_record?
|
||||||
|
assert_tag 'input', :attributes => {:name => 'repository[url]'}
|
||||||
|
end
|
||||||
|
|
||||||
|
# TODO: remove it when multiple SCM support is added
|
||||||
|
def test_new_with_existing_repository
|
||||||
|
@request.session[:user_id] = 1
|
||||||
|
get :new, :project_id => 'ecookbook'
|
||||||
|
assert_response 302
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_create
|
||||||
|
@request.session[:user_id] = 1
|
||||||
|
assert_difference 'Repository.count' do
|
||||||
|
post :create, :project_id => 'subproject1',
|
||||||
|
:repository_scm => 'Subversion',
|
||||||
|
:repository => {:url => 'file:///test'}
|
||||||
|
end
|
||||||
|
assert_response 302
|
||||||
|
repository = Repository.first(:order => 'id DESC')
|
||||||
|
assert_kind_of Repository::Subversion, repository
|
||||||
|
assert_equal 'file:///test', repository.url
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_create_with_failure
|
||||||
|
@request.session[:user_id] = 1
|
||||||
|
assert_no_difference 'Repository.count' do
|
||||||
|
post :create, :project_id => 'subproject1',
|
||||||
|
:repository_scm => 'Subversion',
|
||||||
|
:repository => {:url => 'invalid'}
|
||||||
|
end
|
||||||
|
assert_response :success
|
||||||
|
assert_template 'new'
|
||||||
|
assert_kind_of Repository::Subversion, assigns(:repository)
|
||||||
|
assert assigns(:repository).new_record?
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_edit
|
||||||
|
@request.session[:user_id] = 1
|
||||||
|
get :edit, :id => 11
|
||||||
|
assert_response :success
|
||||||
|
assert_template 'edit'
|
||||||
|
assert_equal Repository.find(11), assigns(:repository)
|
||||||
|
assert_tag 'input', :attributes => {:name => 'repository[url]', :value => 'svn://localhost/test'}
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_update
|
||||||
|
@request.session[:user_id] = 1
|
||||||
|
put :update, :id => 11, :repository => {:password => 'test_update'}
|
||||||
|
assert_response 302
|
||||||
|
assert_equal 'test_update', Repository.find(11).password
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_update_with_failure
|
||||||
|
@request.session[:user_id] = 1
|
||||||
|
put :update, :id => 11, :repository => {:password => 'x'*260}
|
||||||
|
assert_response :success
|
||||||
|
assert_template 'edit'
|
||||||
|
assert_equal Repository.find(11), assigns(:repository)
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_destroy
|
||||||
|
@request.session[:user_id] = 1
|
||||||
|
assert_difference 'Repository.count', -1 do
|
||||||
|
delete :destroy, :id => 11
|
||||||
|
end
|
||||||
|
assert_response 302
|
||||||
|
assert_nil Repository.find_by_id(11)
|
||||||
|
end
|
||||||
|
|
||||||
def test_revisions
|
def test_revisions
|
||||||
get :revisions, :id => 1
|
get :revisions, :id => 1
|
||||||
assert_response :success
|
assert_response :success
|
||||||
@ -71,7 +147,7 @@ class RepositoriesControllerTest < ActionController::TestCase
|
|||||||
assert_equal 'image/svg+xml', @response.content_type
|
assert_equal 'image/svg+xml', @response.content_type
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_committers
|
def test_get_committers
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
# add a commit with an unknown user
|
# add a commit with an unknown user
|
||||||
Changeset.create!(
|
Changeset.create!(
|
||||||
@ -82,7 +158,7 @@ class RepositoriesControllerTest < ActionController::TestCase
|
|||||||
:comments => 'Committed by foo.'
|
:comments => 'Committed by foo.'
|
||||||
)
|
)
|
||||||
|
|
||||||
get :committers, :id => 1
|
get :committers, :id => 10
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_template 'committers'
|
assert_template 'committers'
|
||||||
|
|
||||||
@ -99,7 +175,7 @@ class RepositoriesControllerTest < ActionController::TestCase
|
|||||||
:descendant => { :tag => 'option', :attributes => { :selected => 'selected' }}}
|
:descendant => { :tag => 'option', :attributes => { :selected => 'selected' }}}
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_map_committers
|
def test_post_committers
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
# add a commit with an unknown user
|
# add a commit with an unknown user
|
||||||
c = Changeset.create!(
|
c = Changeset.create!(
|
||||||
@ -110,8 +186,8 @@ class RepositoriesControllerTest < ActionController::TestCase
|
|||||||
:comments => 'Committed by foo.'
|
:comments => 'Committed by foo.'
|
||||||
)
|
)
|
||||||
assert_no_difference "Changeset.count(:conditions => 'user_id = 3')" do
|
assert_no_difference "Changeset.count(:conditions => 'user_id = 3')" do
|
||||||
post :committers, :id => 1, :committers => { '0' => ['foo', '2'], '1' => ['dlopper', '3']}
|
post :committers, :id => 10, :committers => { '0' => ['foo', '2'], '1' => ['dlopper', '3']}
|
||||||
assert_redirected_to '/projects/ecookbook/repository/committers'
|
assert_response 302
|
||||||
assert_equal User.find(2), c.reload.user
|
assert_equal User.find(2), c.reload.user
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -43,15 +43,14 @@ class RepositoriesCvsControllerTest < ActionController::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
if File.directory?(REPOSITORY_PATH)
|
if File.directory?(REPOSITORY_PATH)
|
||||||
def test_get_edit
|
def test_get_new
|
||||||
@request.session[:user_id] = 1
|
@request.session[:user_id] = 1
|
||||||
@project.repository.destroy
|
@project.repository.destroy
|
||||||
xhr :get, :edit, :id => 'subproject1', :repository_scm => 'Cvs'
|
get :new, :project_id => 'subproject1', :repository_scm => 'Cvs'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_equal 'text/javascript', @response.content_type
|
assert_template 'new'
|
||||||
assert_kind_of Repository::Cvs, assigns(:repository)
|
assert_kind_of Repository::Cvs, assigns(:repository)
|
||||||
assert assigns(:repository).new_record?
|
assert assigns(:repository).new_record?
|
||||||
assert_select_rjs :replace_html, 'tab-content-repository'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_browse_root
|
def test_browse_root
|
||||||
@ -247,7 +246,9 @@ class RepositoriesCvsControllerTest < ActionController::TestCase
|
|||||||
@project.reload
|
@project.reload
|
||||||
assert_equal NUM_REV, @repository.changesets.count
|
assert_equal NUM_REV, @repository.changesets.count
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
assert_difference 'Repository.count', -1 do
|
||||||
|
delete :destroy, :id => @repository.id
|
||||||
|
end
|
||||||
assert_response 302
|
assert_response 302
|
||||||
@project.reload
|
@project.reload
|
||||||
assert_nil @project.repository
|
assert_nil @project.repository
|
||||||
@ -255,28 +256,20 @@ class RepositoriesCvsControllerTest < ActionController::TestCase
|
|||||||
|
|
||||||
def test_destroy_invalid_repository
|
def test_destroy_invalid_repository
|
||||||
@request.session[:user_id] = 1 # admin
|
@request.session[:user_id] = 1 # admin
|
||||||
assert_equal 0, @repository.changesets.count
|
@project.repository.destroy
|
||||||
@repository.fetch_changesets
|
@repository = Repository::Cvs.create!(
|
||||||
@project.reload
|
|
||||||
assert_equal NUM_REV, @repository.changesets.count
|
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
|
||||||
assert_response 302
|
|
||||||
@project.reload
|
|
||||||
assert_nil @project.repository
|
|
||||||
|
|
||||||
@repository = Repository::Cvs.create(
|
|
||||||
:project => Project.find(PRJ_ID),
|
:project => Project.find(PRJ_ID),
|
||||||
:root_url => "/invalid",
|
:root_url => "/invalid",
|
||||||
:url => MODULE_NAME,
|
:url => MODULE_NAME,
|
||||||
:log_encoding => 'UTF-8'
|
:log_encoding => 'UTF-8'
|
||||||
)
|
)
|
||||||
assert @repository
|
|
||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
@project.reload
|
@project.reload
|
||||||
assert_equal 0, @repository.changesets.count
|
assert_equal 0, @repository.changesets.count
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
assert_difference 'Repository.count', -1 do
|
||||||
|
delete :destroy, :id => @repository.id
|
||||||
|
end
|
||||||
assert_response 302
|
assert_response 302
|
||||||
@project.reload
|
@project.reload
|
||||||
assert_nil @project.repository
|
assert_nil @project.repository
|
||||||
|
@ -39,15 +39,14 @@ class RepositoriesDarcsControllerTest < ActionController::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
if File.directory?(REPOSITORY_PATH)
|
if File.directory?(REPOSITORY_PATH)
|
||||||
def test_get_edit
|
def test_get_new
|
||||||
@request.session[:user_id] = 1
|
@request.session[:user_id] = 1
|
||||||
@project.repository.destroy
|
@project.repository.destroy
|
||||||
xhr :get, :edit, :id => 'subproject1', :repository_scm => 'Darcs'
|
get :new, :project_id => 'subproject1', :repository_scm => 'Darcs'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_equal 'text/javascript', @response.content_type
|
assert_template 'new'
|
||||||
assert_kind_of Repository::Darcs, assigns(:repository)
|
assert_kind_of Repository::Darcs, assigns(:repository)
|
||||||
assert assigns(:repository).new_record?
|
assert assigns(:repository).new_record?
|
||||||
assert_select_rjs :replace_html, 'tab-content-repository'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_browse_root
|
def test_browse_root
|
||||||
@ -130,7 +129,9 @@ class RepositoriesDarcsControllerTest < ActionController::TestCase
|
|||||||
@project.reload
|
@project.reload
|
||||||
assert_equal NUM_REV, @repository.changesets.count
|
assert_equal NUM_REV, @repository.changesets.count
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
assert_difference 'Repository.count', -1 do
|
||||||
|
delete :destroy, :id => @repository.id
|
||||||
|
end
|
||||||
assert_response 302
|
assert_response 302
|
||||||
@project.reload
|
@project.reload
|
||||||
assert_nil @project.repository
|
assert_nil @project.repository
|
||||||
@ -138,27 +139,19 @@ class RepositoriesDarcsControllerTest < ActionController::TestCase
|
|||||||
|
|
||||||
def test_destroy_invalid_repository
|
def test_destroy_invalid_repository
|
||||||
@request.session[:user_id] = 1 # admin
|
@request.session[:user_id] = 1 # admin
|
||||||
assert_equal 0, @repository.changesets.count
|
@project.repository.destroy
|
||||||
@repository.fetch_changesets
|
@repository = Repository::Darcs.create!(
|
||||||
@project.reload
|
|
||||||
assert_equal NUM_REV, @repository.changesets.count
|
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
|
||||||
assert_response 302
|
|
||||||
@project.reload
|
|
||||||
assert_nil @project.repository
|
|
||||||
|
|
||||||
@repository = Repository::Darcs.create(
|
|
||||||
:project => @project,
|
:project => @project,
|
||||||
:url => "/invalid",
|
:url => "/invalid",
|
||||||
:log_encoding => 'UTF-8'
|
:log_encoding => 'UTF-8'
|
||||||
)
|
)
|
||||||
assert @repository
|
|
||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
@project.reload
|
@project.reload
|
||||||
assert_equal 0, @repository.changesets.count
|
assert_equal 0, @repository.changesets.count
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
assert_difference 'Repository.count', -1 do
|
||||||
|
delete :destroy, :id => @repository.id
|
||||||
|
end
|
||||||
assert_response 302
|
assert_response 302
|
||||||
@project.reload
|
@project.reload
|
||||||
assert_nil @project.repository
|
assert_nil @project.repository
|
||||||
|
@ -41,15 +41,14 @@ class RepositoriesFilesystemControllerTest < ActionController::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
if File.directory?(REPOSITORY_PATH)
|
if File.directory?(REPOSITORY_PATH)
|
||||||
def test_get_edit
|
def test_get_new
|
||||||
@request.session[:user_id] = 1
|
@request.session[:user_id] = 1
|
||||||
@project.repository.destroy
|
@project.repository.destroy
|
||||||
xhr :get, :edit, :id => 'subproject1', :repository_scm => 'Filesystem'
|
get :new, :project_id => 'subproject1', :repository_scm => 'Filesystem'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_equal 'text/javascript', @response.content_type
|
assert_template 'new'
|
||||||
assert_kind_of Repository::Filesystem, assigns(:repository)
|
assert_kind_of Repository::Filesystem, assigns(:repository)
|
||||||
assert assigns(:repository).new_record?
|
assert assigns(:repository).new_record?
|
||||||
assert_select_rjs :replace_html, 'tab-content-repository'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_browse_root
|
def test_browse_root
|
||||||
@ -126,7 +125,9 @@ class RepositoriesFilesystemControllerTest < ActionController::TestCase
|
|||||||
def test_destroy_valid_repository
|
def test_destroy_valid_repository
|
||||||
@request.session[:user_id] = 1 # admin
|
@request.session[:user_id] = 1 # admin
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
assert_difference 'Repository.count', -1 do
|
||||||
|
delete :destroy, :id => @repository.id
|
||||||
|
end
|
||||||
assert_response 302
|
assert_response 302
|
||||||
@project.reload
|
@project.reload
|
||||||
assert_nil @project.repository
|
assert_nil @project.repository
|
||||||
@ -134,20 +135,16 @@ class RepositoriesFilesystemControllerTest < ActionController::TestCase
|
|||||||
|
|
||||||
def test_destroy_invalid_repository
|
def test_destroy_invalid_repository
|
||||||
@request.session[:user_id] = 1 # admin
|
@request.session[:user_id] = 1 # admin
|
||||||
|
@project.repository.destroy
|
||||||
get :destroy, :id => PRJ_ID
|
@repository = Repository::Filesystem.create!(
|
||||||
assert_response 302
|
:project => @project,
|
||||||
@project.reload
|
|
||||||
assert_nil @project.repository
|
|
||||||
|
|
||||||
@repository = Repository::Filesystem.create(
|
|
||||||
:project => Project.find(PRJ_ID),
|
|
||||||
:url => "/invalid",
|
:url => "/invalid",
|
||||||
:path_encoding => ''
|
:path_encoding => ''
|
||||||
)
|
)
|
||||||
assert @repository
|
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
assert_difference 'Repository.count', -1 do
|
||||||
|
delete :destroy, :id => @repository.id
|
||||||
|
end
|
||||||
assert_response 302
|
assert_response 302
|
||||||
@project.reload
|
@project.reload
|
||||||
assert_nil @project.repository
|
assert_nil @project.repository
|
||||||
|
@ -58,15 +58,14 @@ class RepositoriesGitControllerTest < ActionController::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
if File.directory?(REPOSITORY_PATH)
|
if File.directory?(REPOSITORY_PATH)
|
||||||
def test_get_edit
|
def test_get_new
|
||||||
@request.session[:user_id] = 1
|
@request.session[:user_id] = 1
|
||||||
@project.repository.destroy
|
@project.repository.destroy
|
||||||
xhr :get, :edit, :id => 'subproject1', :repository_scm => 'Git'
|
get :new, :project_id => 'subproject1', :repository_scm => 'Git'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_equal 'text/javascript', @response.content_type
|
assert_template 'new'
|
||||||
assert_kind_of Repository::Git, assigns(:repository)
|
assert_kind_of Repository::Git, assigns(:repository)
|
||||||
assert assigns(:repository).new_record?
|
assert assigns(:repository).new_record?
|
||||||
assert_select_rjs :replace_html, 'tab-content-repository'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_browse_root
|
def test_browse_root
|
||||||
@ -424,7 +423,9 @@ class RepositoriesGitControllerTest < ActionController::TestCase
|
|||||||
@project.reload
|
@project.reload
|
||||||
assert_equal NUM_REV, @repository.changesets.count
|
assert_equal NUM_REV, @repository.changesets.count
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
assert_difference 'Repository.count', -1 do
|
||||||
|
delete :destroy, :id => @repository.id
|
||||||
|
end
|
||||||
assert_response 302
|
assert_response 302
|
||||||
@project.reload
|
@project.reload
|
||||||
assert_nil @project.repository
|
assert_nil @project.repository
|
||||||
@ -432,27 +433,19 @@ class RepositoriesGitControllerTest < ActionController::TestCase
|
|||||||
|
|
||||||
def test_destroy_invalid_repository
|
def test_destroy_invalid_repository
|
||||||
@request.session[:user_id] = 1 # admin
|
@request.session[:user_id] = 1 # admin
|
||||||
assert_equal 0, @repository.changesets.count
|
@project.repository.destroy
|
||||||
@repository.fetch_changesets
|
@repository = Repository::Git.create!(
|
||||||
@project.reload
|
|
||||||
assert_equal NUM_REV, @repository.changesets.count
|
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
|
||||||
assert_response 302
|
|
||||||
@project.reload
|
|
||||||
assert_nil @project.repository
|
|
||||||
|
|
||||||
@repository = Repository::Git.create(
|
|
||||||
:project => @project,
|
:project => @project,
|
||||||
:url => "/invalid",
|
:url => "/invalid",
|
||||||
:path_encoding => 'ISO-8859-1'
|
:path_encoding => 'ISO-8859-1'
|
||||||
)
|
)
|
||||||
assert @repository
|
|
||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
@repository.reload
|
@repository.reload
|
||||||
assert_equal 0, @repository.changesets.count
|
assert_equal 0, @repository.changesets.count
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
assert_difference 'Repository.count', -1 do
|
||||||
|
delete :destroy, :id => @repository.id
|
||||||
|
end
|
||||||
assert_response 302
|
assert_response 302
|
||||||
@project.reload
|
@project.reload
|
||||||
assert_nil @project.repository
|
assert_nil @project.repository
|
||||||
|
@ -60,15 +60,14 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase
|
|||||||
def test_fake; assert true end
|
def test_fake; assert true end
|
||||||
elsif File.directory?(REPOSITORY_PATH)
|
elsif File.directory?(REPOSITORY_PATH)
|
||||||
|
|
||||||
def test_get_edit
|
def test_get_new
|
||||||
@request.session[:user_id] = 1
|
@request.session[:user_id] = 1
|
||||||
@project.repository.destroy
|
@project.repository.destroy
|
||||||
xhr :get, :edit, :id => 'subproject1', :repository_scm => 'Mercurial'
|
get :new, :project_id => 'subproject1', :repository_scm => 'Mercurial'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_equal 'text/javascript', @response.content_type
|
assert_template 'new'
|
||||||
assert_kind_of Repository::Mercurial, assigns(:repository)
|
assert_kind_of Repository::Mercurial, assigns(:repository)
|
||||||
assert assigns(:repository).new_record?
|
assert assigns(:repository).new_record?
|
||||||
assert_select_rjs :replace_html, 'tab-content-repository'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_show_root
|
def test_show_root
|
||||||
@ -469,10 +468,11 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase
|
|||||||
@request.session[:user_id] = 1 # admin
|
@request.session[:user_id] = 1 # admin
|
||||||
assert_equal 0, @repository.changesets.count
|
assert_equal 0, @repository.changesets.count
|
||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
@project.reload
|
|
||||||
assert_equal NUM_REV, @repository.changesets.count
|
assert_equal NUM_REV, @repository.changesets.count
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
assert_difference 'Repository.count', -1 do
|
||||||
|
delete :destroy, :id => @repository.id
|
||||||
|
end
|
||||||
assert_response 302
|
assert_response 302
|
||||||
@project.reload
|
@project.reload
|
||||||
assert_nil @project.repository
|
assert_nil @project.repository
|
||||||
@ -480,27 +480,18 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase
|
|||||||
|
|
||||||
def test_destroy_invalid_repository
|
def test_destroy_invalid_repository
|
||||||
@request.session[:user_id] = 1 # admin
|
@request.session[:user_id] = 1 # admin
|
||||||
assert_equal 0, @repository.changesets.count
|
@project.repository.destroy
|
||||||
@repository.fetch_changesets
|
@repository = Repository::Mercurial.create!(
|
||||||
@project.reload
|
|
||||||
assert_equal NUM_REV, @repository.changesets.count
|
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
|
||||||
assert_response 302
|
|
||||||
@project.reload
|
|
||||||
assert_nil @project.repository
|
|
||||||
|
|
||||||
@repository = Repository::Mercurial.create(
|
|
||||||
:project => Project.find(PRJ_ID),
|
:project => Project.find(PRJ_ID),
|
||||||
:url => "/invalid",
|
:url => "/invalid",
|
||||||
:path_encoding => 'ISO-8859-1'
|
:path_encoding => 'ISO-8859-1'
|
||||||
)
|
)
|
||||||
assert @repository
|
|
||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
@project.reload
|
|
||||||
assert_equal 0, @repository.changesets.count
|
assert_equal 0, @repository.changesets.count
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
assert_difference 'Repository.count', -1 do
|
||||||
|
delete :destroy, :id => @repository.id
|
||||||
|
end
|
||||||
assert_response 302
|
assert_response 302
|
||||||
@project.reload
|
@project.reload
|
||||||
assert_nil @project.repository
|
assert_nil @project.repository
|
||||||
|
@ -38,40 +38,14 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
if repository_configured?('subversion')
|
if repository_configured?('subversion')
|
||||||
def test_get_edit
|
def test_new
|
||||||
@request.session[:user_id] = 1
|
@request.session[:user_id] = 1
|
||||||
@project.repository.destroy
|
@project.repository.destroy
|
||||||
xhr :get, :edit, :id => 'subproject1', :repository_scm => 'Subversion'
|
get :new, :project_id => 'subproject1', :repository_scm => 'Subversion'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_equal 'text/javascript', @response.content_type
|
assert_template 'new'
|
||||||
assert_kind_of Repository::Subversion, assigns(:repository)
|
assert_kind_of Repository::Subversion, assigns(:repository)
|
||||||
assert assigns(:repository).new_record?
|
assert assigns(:repository).new_record?
|
||||||
assert_select_rjs :replace_html, 'tab-content-repository'
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_post_edit
|
|
||||||
@request.session[:user_id] = 1
|
|
||||||
@project.repository.destroy
|
|
||||||
assert_difference 'Repository.count' do
|
|
||||||
xhr :post, :edit, :id => 'subproject1', :repository_scm => 'Subversion', :repository => {:url => 'file:///svn/path'}
|
|
||||||
end
|
|
||||||
assert_response :success
|
|
||||||
assert_equal 'text/javascript', @response.content_type
|
|
||||||
assert_kind_of Repository::Subversion, assigns(:repository)
|
|
||||||
assert !assigns(:repository).new_record?
|
|
||||||
assert_select_rjs :replace_html, 'tab-content-repository'
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_post_edit_existing_repository
|
|
||||||
@request.session[:user_id] = 1
|
|
||||||
assert_no_difference 'Repository.count' do
|
|
||||||
xhr :post, :edit, :id => 'subproject1', :repository_scm => 'Subversion', :repository => {:password => 'newpassword'}
|
|
||||||
end
|
|
||||||
assert_response :success
|
|
||||||
assert_equal 'text/javascript', @response.content_type
|
|
||||||
assert_kind_of Repository::Subversion, assigns(:repository)
|
|
||||||
assert_select_rjs :replace_html, 'tab-content-repository'
|
|
||||||
assert_equal 'newpassword', Project.find('subproject1').repository.password
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_show
|
def test_show
|
||||||
@ -381,10 +355,11 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase
|
|||||||
@request.session[:user_id] = 1 # admin
|
@request.session[:user_id] = 1 # admin
|
||||||
assert_equal 0, @repository.changesets.count
|
assert_equal 0, @repository.changesets.count
|
||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
@project.reload
|
|
||||||
assert_equal NUM_REV, @repository.changesets.count
|
assert_equal NUM_REV, @repository.changesets.count
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
assert_difference 'Repository.count', -1 do
|
||||||
|
delete :destroy, :id => @repository.id
|
||||||
|
end
|
||||||
assert_response 302
|
assert_response 302
|
||||||
@project.reload
|
@project.reload
|
||||||
assert_nil @project.repository
|
assert_nil @project.repository
|
||||||
@ -392,25 +367,16 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase
|
|||||||
|
|
||||||
def test_destroy_invalid_repository
|
def test_destroy_invalid_repository
|
||||||
@request.session[:user_id] = 1 # admin
|
@request.session[:user_id] = 1 # admin
|
||||||
assert_equal 0, @repository.changesets.count
|
@project.repository.destroy
|
||||||
@repository.fetch_changesets
|
@repository = Repository::Subversion.create!(
|
||||||
@project.reload
|
|
||||||
assert_equal NUM_REV, @repository.changesets.count
|
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
|
||||||
assert_response 302
|
|
||||||
@project.reload
|
|
||||||
assert_nil @project.repository
|
|
||||||
|
|
||||||
@repository = Repository::Subversion.create(
|
|
||||||
:project => @project,
|
:project => @project,
|
||||||
:url => "file:///invalid")
|
:url => "file:///invalid")
|
||||||
assert @repository
|
|
||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
@project.reload
|
|
||||||
assert_equal 0, @repository.changesets.count
|
assert_equal 0, @repository.changesets.count
|
||||||
|
|
||||||
get :destroy, :id => PRJ_ID
|
assert_difference 'Repository.count', -1 do
|
||||||
|
delete :destroy, :id => @repository.id
|
||||||
|
end
|
||||||
assert_response 302
|
assert_response 302
|
||||||
@project.reload
|
@project.reload
|
||||||
assert_nil @project.repository
|
assert_nil @project.repository
|
||||||
|
@ -84,13 +84,13 @@ class SysControllerTest < ActionController::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_fetch_changesets
|
def test_fetch_changesets
|
||||||
Repository::Subversion.any_instance.expects(:fetch_changesets).returns(true)
|
Repository::Subversion.any_instance.expects(:fetch_changesets).twice.returns(true)
|
||||||
get :fetch_changesets
|
get :fetch_changesets
|
||||||
assert_response :success
|
assert_response :success
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_fetch_changesets_one_project
|
def test_fetch_changesets_one_project
|
||||||
Repository::Subversion.any_instance.expects(:fetch_changesets).returns(true)
|
Repository::Subversion.any_instance.expects(:fetch_changesets).once.returns(true)
|
||||||
get :fetch_changesets, :id => 'ecookbook'
|
get :fetch_changesets, :id => 'ecookbook'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
end
|
end
|
||||||
|
@ -24,19 +24,47 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
|
|||||||
assert_equal %w[path to file.c], @path_hash[:param]
|
assert_equal %w[path to file.c], @path_hash[:param]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_repositories_resources
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'get',
|
||||||
|
:path => "/projects/redmine/repositories/new" },
|
||||||
|
{ :controller => 'repositories', :action => 'new', :project_id => 'redmine' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'post',
|
||||||
|
:path => "/projects/redmine/repositories" },
|
||||||
|
{ :controller => 'repositories', :action => 'create', :project_id => 'redmine' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'get',
|
||||||
|
:path => "/repositories/1/edit" },
|
||||||
|
{ :controller => 'repositories', :action => 'edit', :id => '1' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'put',
|
||||||
|
:path => "/repositories/1" },
|
||||||
|
{ :controller => 'repositories', :action => 'update', :id => '1' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'delete',
|
||||||
|
:path => "/repositories/1" },
|
||||||
|
{ :controller => 'repositories', :action => 'destroy', :id => '1' }
|
||||||
|
)
|
||||||
|
["get", "post"].each do |method|
|
||||||
|
assert_routing(
|
||||||
|
{ :method => method,
|
||||||
|
:path => "/repositories/1/committers" },
|
||||||
|
{ :controller => 'repositories', :action => 'committers', :id => '1' }
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def test_repositories
|
def test_repositories
|
||||||
assert_routing(
|
assert_routing(
|
||||||
{ :method => 'get',
|
{ :method => 'get',
|
||||||
:path => "/projects/redmine/repository" },
|
:path => "/projects/redmine/repository" },
|
||||||
{ :controller => 'repositories', :action => 'show', :id => 'redmine' }
|
{ :controller => 'repositories', :action => 'show', :id => 'redmine' }
|
||||||
)
|
)
|
||||||
["get", "post"].each do |method|
|
|
||||||
assert_routing(
|
|
||||||
{ :method => method,
|
|
||||||
:path => "/projects/redmine/repository/edit" },
|
|
||||||
{ :controller => 'repositories', :action => 'edit', :id => 'redmine' }
|
|
||||||
)
|
|
||||||
end
|
|
||||||
assert_routing(
|
assert_routing(
|
||||||
{ :method => 'get',
|
{ :method => 'get',
|
||||||
:path => "/projects/redmine/repository/statistics" },
|
:path => "/projects/redmine/repository/statistics" },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user