Skip to content

Commit

Permalink
Merge pull request #15310 from eduardoj/fix/typo_existens
Browse files Browse the repository at this point in the history
Fix existens typos in code comments
  • Loading branch information
hennevogel committed Dec 6, 2023
2 parents e6a640a + b578048 commit bd44595
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/api/app/models/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def self.get_by_project_and_name(project_name_or_object, package_name, opts = {}
package
end

# to check existens of a project (local or remote)
# to check existence of a project (local or remote)
def self.exists_by_project_and_name(project, package, opts = {})
exists_by_project_and_name_defaults = { follow_project_links: true, allow_remote_packages: false, follow_multibuild: false }
opts = exists_by_project_and_name_defaults.merge(opts)
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def has_dod_elements?(request_data)
end

def validate_repository_xml_attribute(request_data, project_name)
# Check used repo pathes for existens and read access permissions
# Check used repo pathes for existence and read access permissions
request_data.elements('repository') do |repository|
repository.elements('path') do |element|
# permissions check
Expand Down
4 changes: 2 additions & 2 deletions src/api/lib/xpath_engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def parse_predicate(root, stack)
parse_predicate(root, stack[0])
stack.shift
elsif qtype.nil? || qtype == :qname
# just a plain existens test
# just a plain existence test
xpath_func_boolean(root, stack)
else
parse_predicate(root, qtype)
Expand Down Expand Up @@ -606,7 +606,7 @@ def xpath_func_not(root, expr)

case expr.first
when :attribute
# existens check to an attribute
# existence check to an attribute
# (is defined as opposite of boolean())
# https://www.w3.org/TR/xpath-functions-31/#func-not
cond = evaluate_expr(expr, root)
Expand Down
2 changes: 1 addition & 1 deletion src/api/test/functional/channel_maintenance_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ def test_large_channel_test
assert_response :success
assert_xml_tag tag: 'collection', attributes: { matches: '2' }

# node existens check does not need a boolean()
# node existence check does not need a boolean()
get '/search/channel/binary?match=updatefor[@project="BaseDistro"+and+@product="fixed"]+and+target/disabled'
assert_response :success
assert_xml_tag tag: 'collection', attributes: { matches: '2' }
Expand Down

0 comments on commit bd44595

Please sign in to comment.