Skip to content

Commit

Permalink
Merge pull request #3034 from bgeuken/rspec_package_controller
Browse files Browse the repository at this point in the history
Rspec package controller tests and cleanups
  • Loading branch information
hennevogel committed Apr 27, 2017
2 parents aebc444 + 9bfcdd3 commit cac4058
Show file tree
Hide file tree
Showing 111 changed files with 8,331 additions and 8,243 deletions.
8 changes: 0 additions & 8 deletions src/api/app/controllers/webui/package_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -851,14 +851,6 @@ def update_build_log

set_initial_offset if @offset.zero?

package_object = @project.find_package(params[:package])
# remote package sources are always fine to show
if package_object && !package_object.check_source_access?
flash[:error] = "Could not access revisions"
redirect_back(fallback_location: package_show_path(project: @project, package: package_object.name))
return
end

begin
chunk = get_log_chunk(@project, @package, @repo, @arch, @offset, @offset + @maxsize)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<% if @can_modify %>
<p>
<span class="link_trigger_rebuild hidden">
<%= link_to sprited_text('rebuild', 'Trigger Rebuild'), {action: 'trigger_rebuild', project: @project, package: @package, arch: @arch, repository: @repo}, method: :delete %>
<%= link_to sprited_text('rebuild', 'Trigger Rebuild'), {action: 'trigger_rebuild', project: @project, package: @package, arch: @arch, repository: @repo}, method: :post %>
</span>
<span class="link_abort_build hidden">
<%= link_to "[Abort build]", action: 'abort_build', project: @project, package: @package, arch: @arch, repository: @repo %>
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/views/webui/package/binaries.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<% end %>
<p>
<% if User.current.can_modify_package? @package %>
<%= link_to sprited_text('rebuild', 'Trigger'),{ :controller => :package, :action => :trigger_rebuild, :arch => result['arch'], :project => @project, :package => @package, :repository => @repository }, { :method => :delete} %> rebuild
<%= link_to sprited_text('rebuild', 'Trigger'),{ :controller => :package, :action => :trigger_rebuild, :arch => result['arch'], :project => @project, :package => @package, :repository => @repository }, { :method => :post} %> rebuild

<% if result.get('binarylist')['binary'] %>
<%= link_to sprited_text('drive_burn', 'Delete'), { :controller => :package, :action => :wipe_binaries, :arch => result['arch'], :project => @project, :package => @package, :repository => @repository }, { :method => :delete} %> built binaries
Expand Down
4 changes: 2 additions & 2 deletions src/api/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ def self.public_or_about_path?(request)
post 'package/branch' => :branch, constraints: cons
post 'package/save/:project/:package' => :save, constraints: cons
get 'package/delete_dialog/:project/:package' => :delete_dialog, constraints: cons
post 'package/trigger_services/:project/:package' => :trigger_services, constraints: cons
post 'package/remove/:project/:package' => :remove, constraints: cons
get 'package/add_file/:project/:package' => :add_file, constraints: cons
post 'package/save_file/:project/:package' => :save_file, constraints: cons
Expand All @@ -128,7 +127,8 @@ def self.public_or_about_path?(request)
get 'package/live_build_log/:project/:package/:repository/:arch' => :live_build_log, constraints: cons, as: 'package_live_build_log'
get 'package/update_build_log/:project/:package/:repository/:arch' => :update_build_log, constraints: cons
get 'package/abort_build/:project/:package' => :abort_build, constraints: cons
delete 'package/trigger_rebuild/:project/:package' => :trigger_rebuild, constraints: cons
post 'package/trigger_services/:project/:package' => :trigger_services, constraints: cons
post 'package/trigger_rebuild/:project/:package' => :trigger_rebuild, constraints: cons
delete 'package/wipe_binaries/:project/:package' => :wipe_binaries, constraints: cons
get 'package/devel_project/:project/:package' => :devel_project, constraints: cons
get 'package/buildresult' => :buildresult, constraints: cons
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit cac4058

Please sign in to comment.