Skip to content

Commit e9d6f9a

Browse files
authored
Fix typos, grammar errors, and a logic bug in noc_controller (#1600)
Signed-off-by: rafsanneloy <rafsanneloy@gmail.com>
1 parent ddcff63 commit e9d6f9a

38 files changed

+66
-66
lines changed

Bourreau/spec/boutiques/boutiques_tester_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
context 'cluster_command substitution' do
221221

222222
# Test basic command substitution correctness
223-
it "should correctly subsitute cluster_commands with default settings" do
223+
it "should correctly substitute cluster_commands with default settings" do
224224
task = @generateTask.( { a: 'value' } )
225225
expect( task.cluster_commands[0].strip ).to eq( '/minimalApp -a value' )
226226
end
@@ -239,15 +239,15 @@
239239
end
240240

241241
# Test output flag substitution
242-
it "should correctly subsitute cluster_commands with output keys" do
242+
it "should correctly substitute cluster_commands with output keys" do
243243
@descriptor['command-line'] += ' [OUT-KEY]'
244244
@descriptor['output-files'][0].merge!( { 'value-key' => '[OUT-KEY]', 'command-line-flag' => '-o' } )
245245
task = @generateTask.( { a: 'value' } )
246246
expect( task.cluster_commands[0].strip ).to eq( '/minimalApp -a value -o value' )
247247
end
248248

249249
# Test output flag separator substitution
250-
it "should correctly subsitute cluster_commands with output keys and a separator" do
250+
it "should correctly substitute cluster_commands with output keys and a separator" do
251251
@descriptor['command-line'] += ' [OUT-KEY]'
252252
@descriptor['output-files'][0].merge!( {
253253
'value-key' => '[OUT-KEY]',
@@ -258,7 +258,7 @@
258258
end
259259

260260
# Test output flag separator substitution with prior path-template substitution
261-
it "should correctly subsitute cluster_commands with output flag separators and path-template substitutions" do
261+
it "should correctly substitute cluster_commands with output flag separators and path-template substitutions" do
262262
@descriptor['command-line'] += ' [B] [OUT-KEY]'
263263
@descriptor['inputs'] << GenerateJsonInputDefault.('b','Number','Numerical arg')
264264
@descriptor['output-files'][0].merge!( {

BrainPortal/app/controllers/access_profiles_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def update #:nodoc:
100100
end
101101
end
102102

103-
# New users added to the the AP? Adjust their groups
103+
# New users added to the AP? Adjust their groups
104104
added_uids = new_user_ids - old_user_ids
105105
User.find(added_uids).each do |user|
106106
orig_user_gids = user.group_ids
@@ -109,7 +109,7 @@ def update #:nodoc:
109109
Group, orig_user_gids, user.group_ids, current_user)
110110
end
111111

112-
# Some users lost access to the the AP? Adjust their groups
112+
# Some users lost access to the AP? Adjust their groups
113113
removed_uids = old_user_ids - new_user_ids
114114
User.find(removed_uids).each do |user|
115115
orig_user_gids = user.group_ids

BrainPortal/app/controllers/bourreaux_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ def operation_stop_bac_workers(bourreau) #:nodoc:
461461

462462
public
463463

464-
# Define disk usage of remote ressource,
464+
# Define disk usage of remote resource,
465465
# with date filtering if wanted.
466466
def rr_disk_usage
467467
date_filtering = params[:date_range] || {}
@@ -679,14 +679,14 @@ def cleanup_caches
679679

680680
end
681681

682-
# Define remote ressource and users accessible/available by
682+
# Define remote resource and users accessible/available by
683683
# the current user.
684684
def rr_access
685685
@remote_r = RemoteResource.find_all_accessible_by_user(current_user).all.sort { |a,b| a.name <=> b.name }
686686
@users = current_user.available_users.all.sort { |a,b| a.login <=> b.login }
687687
end
688688

689-
# Define which remote resource can acces which data provider.
689+
# Define which remote resource can access which data provider.
690690
def rr_access_dp
691691
@rrs = RemoteResource.find_all_accessible_by_user(current_user).all.sort do |a,b|
692692
(b.online?.to_s <=> a.online?.to_s).nonzero? ||

BrainPortal/app/controllers/noc_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def gather_info(since_when) #:nodoc:
230230
.sum(:value)
231231

232232
# This is used to adjust the color ranges
233-
@num_hours = (Time.now - since_when) / 24.hours; @num_hours = 1.0 if @num_hours < 1
233+
@num_hours = (Time.now - since_when) / 1.hour; @num_hours = 1.0 if @num_hours < 1
234234

235235
# This is used to debug layout issues by generating random numbers
236236
if fake

BrainPortal/app/controllers/portal_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ def swagger
446446
return
447447
end
448448

449-
# FIXME the way we exatrct the version number from the file name is brittle...
449+
# FIXME the way we extract the version number from the file name is brittle...
450450
@spec_version = @specfile.sub("cbrain-","").sub(/-swagger.*/,"")
451451

452452
respond_to do |format|

BrainPortal/app/controllers/quotas_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def new
9696
# Try to find an existing quota record; nils will mean we fetch nothing
9797
@quota = model.where( atts ).first
9898

99-
# If we haven't found an existing quota entry, we intialize a new one.
99+
# If we haven't found an existing quota entry, we initialize a new one.
100100
# It can contain nils for the attributes.
101101
@quota ||= model.new( atts )
102102

@@ -218,7 +218,7 @@ def report_cpu_quotas
218218
.group(:user_id,:remote_resource_id).sum(:value)
219219
end
220220

221-
# These two lamdas transform the hashes above into new hashes
221+
# These two lambdas transform the hashes above into new hashes
222222
# where the top level is a UID (user or bourreau) and the key is
223223
# a hash with a subset of the entries for each. It's darn complicated.
224224
# For help, try this in Ruby shell:
@@ -407,7 +407,7 @@ def guess_size_units(sizestring)
407407

408408
# Tries to turn strings like '2h' into 7200 (for 7200 seconds, etc).
409409
# Supported suffixes are s, h, d, m, w, and y (case insensitive).
410-
# Minutes not supported because of the sad existance of months.
410+
# Minutes not supported because of the sad existence of months.
411411
def guess_time_units(timestring)
412412
match = timestring.match(/\A\s*(\d{1,4}(\.\d{1,2})?)\s*([shdwmy]?)\s*\z/i)
413413
return "" unless match # parsing error

BrainPortal/app/controllers/tasks_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def create #:nodoc:
367367
new_task_params = task_params() # filters and censors
368368

369369
@task = create_initial_task_from_form(new_task_params, params[:tool_id])
370-
@tool_config = @task.tool_config # for acces in view
370+
@tool_config = @task.tool_config # for access in view
371371

372372
# Give a task the ability to do a refresh of its form
373373
commit_name = extract_params_key([ :refresh, :load_preset, :delete_preset, :save_preset ])

BrainPortal/app/controllers/userfiles_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ def change_provider #:nodoc:
11171117
def delete_files #:nodoc:
11181118
filelist = params[:file_ids] || []
11191119

1120-
# Select all accessible files with write acces by the user.
1120+
# Select all accessible files with write access by the user.
11211121
to_delete_ids = Userfile.accessible_for_user(current_user, :access_requested => :write).where(:id => filelist).pluck(:id)
11221122
not_accessible_count = filelist.size - to_delete_ids.size
11231123

@@ -1637,7 +1637,7 @@ def extract_from_archive(archive_file_name, file_type = nil, attributes = {}) #:
16371637
# TODO: FIXME . Not sure how to fix.
16381638
#
16391639
# Note on the name of the method: a previous version tried to
1640-
# create a symlink structure, but that transferred hte values of
1640+
# create a symlink structure, but that transferred the values of
16411641
# all symbolic links internal to the userfiles on LINUX.
16421642
# See also: the -H option of tar on MacOS X which would do the trick,
16431643
# but doesn't exist on LINUX.

BrainPortal/app/helpers/access_report_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ module AccessReportHelper
2525

2626
Revision_info=CbrainFileRevision[__FILE__] #:nodoc:
2727

28-
# Produces a pretty times symbol (used to show unavailable ressources)
28+
# Produces a pretty times symbol (used to show unavailable resources)
2929
def times_icon(color="red")
3030
"<span style=\"color:#{color}\" class=\"bold_icon\">&times;</span>".html_safe
3131
end
3232

33-
# Produces a pretty o symbol (used to show available ressources)
33+
# Produces a pretty o symbol (used to show available resources)
3434
def o_icon(color="green")
3535
"<span style=\"color:#{color}\" class=\"bold_icon\">&#927;</span>".html_safe
3636
end

BrainPortal/app/models/background_activity.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def process_next_item
312312
# This method should not produce too much text,
313313
# even when there are thousands of items in the
314314
# current object; the point is only to let the
315-
# user know what happened when error occured.
315+
# user know what happened when error occurred.
316316
#
317317
# The default behavior is to ignore all blank messages
318318
# or messages that are numbers (for background activities

0 commit comments

Comments
 (0)