Review Board 1.5.5

Ticket #419 - Stack trace when downloading Subversion Export File complains about no method "bytesize"

Updated 2 years, 4 months ago

Mike Conley Reviewers
branches/release_0.5 markus_developers
None MarkUs Source Code Repository
get_svn_commands was returning an Array, not a String.  Plus, get_svn_commands didn't take into account the possibility that there would be spaces in Group names.
No regressions with units/functionals.

Wrote 2 new test cases in Assignment_Test - though I'm concerned that I essentially recreated the get_svn_commands method inside the test, just to generate what I'm comparing against... 

Maybe I just need some sleep, but are there any ideas on a better way of doing this?
branches/release_0.5/app/controllers/submissions_controller.rb
Revision 1035 New Change
... 419 lines hidden [Expand]
def download_detailed_csv_report
420
  end
420
  end
421
  
421
  
422
  # See Assignment.get_svn_commands for details
422
  # See Assignment.get_svn_commands for details
423
  def download_svn_export_commands
423
  def download_svn_export_commands
424
    assignment = Assignment.find(params[:id])
424
    assignment = Assignment.find(params[:id])
425
    string = assignment.get_svn_commands
425
    svn_commands = assignment.get_svn_commands
426
    send_data string, :disposition => 'attachment', :type => 'text/plain', :filename => "#{assignment.short_identifier}_svn_exports"
426
    send_data svn_commands.join("\n"), :disposition => 'attachment', :type => 'text/plain', :filename => "#{assignment.short_identifier}_svn_exports"
427
  end
427
  end
428

   
428

   
429
  # See Assignment.get_svn_commands for details
429
  # See Assignment.get_svn_commands for details
430
  def download_svn_repo_list
430
  def download_svn_repo_list
431
    assignment = Assignment.find(params[:id])
431
    assignment = Assignment.find(params[:id])
... 11 lines hidden [Expand]
branches/release_0.5/app/models/assignment.rb
Revision 1035 New Change
 
branches/release_0.5/test/unit/assignment_test.rb
Revision 1035 New Change
 
  1. branches/release_0.5/app/controllers/submissions_controller.rb: Loading...
  2. branches/release_0.5/app/models/assignment.rb: Loading...
  3. branches/release_0.5/test/unit/assignment_test.rb: Loading...