Skip to content

Commit

Permalink
Lint/SymbolConversion:
Browse files Browse the repository at this point in the history
Symbol hash key should be quoted for consistency; use "xmlns": instead.

Makes more sense to be consistent than to use a symbol for the xmlns namespace that doesn't contain a colon.
  • Loading branch information
pgwillia committed May 17, 2023
1 parent d9fbd31 commit d06b510
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,5 @@ Style/WordArray:
Performance/TimesMap:
Enabled: false

Lint/SymbolConversion:
EnforcedStyle: consistent
4 changes: 2 additions & 2 deletions app/helpers/oaisys/error_helper.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module Oaisys::ErrorHelper
def error_header(error_code:)
if error_code == :badArgument
{ xmlns: 'http://www.openarchives.org/OAI/2.0/',
{ 'xmlns': 'http://www.openarchives.org/OAI/2.0/',
'xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',
'xsi:schemaLocation': 'http://www.openarchives.org/OAI/2.0/ ' \
'http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd' }
else
{ 'xmlns:dc': 'http://purl.org/dc/elements/1.1/',
'xmlns:oai-id': 'http://www.openarchives.org/OAI/2.0/oai-identifier',
xmlns: 'http://www.openarchives.org/OAI/2.0/',
'xmlns': 'http://www.openarchives.org/OAI/2.0/',
'xmlns:etd_ms': 'http://www.ndltd.org/standards/metadata/etdms/1.0/',
'xmlns:atom': 'http://www.w3.org/2005/Atom',
'xmlns:rdfs': 'http://www.w3.org/2000/01/rdf-schema#',
Expand Down
2 changes: 1 addition & 1 deletion app/views/oaisys/pmh/get_record.xml.builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
xml.push_deferred_attribute('xmlns:dc': 'http://purl.org/dc/elements/1.1/',
'xmlns:oai-id': 'http://www.openarchives.org/OAI/2.0/oai-identifier',
xmlns: 'http://www.openarchives.org/OAI/2.0/',
'xmlns': 'http://www.openarchives.org/OAI/2.0/',
'xmlns:etd_ms': 'http://www.ndltd.org/standards/metadata/etdms/1.0/',
'xmlns:atom': 'http://www.w3.org/2005/Atom',
'xmlns:rdfs': 'http://www.w3.org/2000/01/rdf-schema#',
Expand Down
2 changes: 1 addition & 1 deletion app/views/oaisys/pmh/identify.xml.builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
xml.push_deferred_attribute('xmlns:dc': 'http://purl.org/dc/elements/1.1/',
'xmlns:oai-id': 'http://www.openarchives.org/OAI/2.0/oai-identifier',
xmlns: 'http://www.openarchives.org/OAI/2.0/',
'xmlns': 'http://www.openarchives.org/OAI/2.0/',
'xmlns:etd_ms': 'http://www.ndltd.org/standards/metadata/etdms/1.0/',
'xmlns:atom': 'http://www.w3.org/2005/Atom',
'xmlns:rdfs': 'http://www.w3.org/2000/01/rdf-schema#',
Expand Down
2 changes: 1 addition & 1 deletion app/views/oaisys/pmh/list_identifiers.xml.builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
xml.push_deferred_attribute('xmlns:dc': 'http://purl.org/dc/elements/1.1/',
'xmlns:oai-id': 'http://www.openarchives.org/OAI/2.0/oai-identifier',
xmlns: 'http://www.openarchives.org/OAI/2.0/',
'xmlns': 'http://www.openarchives.org/OAI/2.0/',
'xmlns:etd_ms': 'http://www.ndltd.org/standards/metadata/etdms/1.0/',
'xmlns:atom': 'http://www.w3.org/2005/Atom',
'xmlns:rdfs': 'http://www.w3.org/2000/01/rdf-schema#',
Expand Down
2 changes: 1 addition & 1 deletion app/views/oaisys/pmh/list_metadata_formats.xml.builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
xml.push_deferred_attribute('xmlns:dc': 'http://purl.org/dc/elements/1.1/',
'xmlns:oai-id': 'http://www.openarchives.org/OAI/2.0/oai-identifier',
xmlns: 'http://www.openarchives.org/OAI/2.0/',
'xmlns': 'http://www.openarchives.org/OAI/2.0/',
'xmlns:etd_ms': 'http://www.ndltd.org/standards/metadata/etdms/1.0/',
'xmlns:atom': 'http://www.w3.org/2005/Atom',
'xmlns:rdfs': 'http://www.w3.org/2000/01/rdf-schema#',
Expand Down
2 changes: 1 addition & 1 deletion app/views/oaisys/pmh/list_records.xml.builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
xml.push_deferred_attribute('xmlns:dc': 'http://purl.org/dc/elements/1.1/',
'xmlns:oai-id': 'http://www.openarchives.org/OAI/2.0/oai-identifier',
xmlns: 'http://www.openarchives.org/OAI/2.0/',
'xmlns': 'http://www.openarchives.org/OAI/2.0/',
'xmlns:etd_ms': 'http://www.ndltd.org/standards/metadata/etdms/1.0/',
'xmlns:atom': 'http://www.w3.org/2005/Atom',
'xmlns:rdfs': 'http://www.w3.org/2000/01/rdf-schema#',
Expand Down
2 changes: 1 addition & 1 deletion app/views/oaisys/pmh/list_sets.xml.builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
xml.push_deferred_attribute('xmlns:dc': 'http://purl.org/dc/elements/1.1/',
'xmlns:oai-id': 'http://www.openarchives.org/OAI/2.0/oai-identifier',
xmlns: 'http://www.openarchives.org/OAI/2.0/',
'xmlns': 'http://www.openarchives.org/OAI/2.0/',
'xmlns:etd_ms': 'http://www.ndltd.org/standards/metadata/etdms/1.0/',
'xmlns:atom': 'http://www.w3.org/2005/Atom',
'xmlns:rdfs': 'http://www.w3.org/2000/01/rdf-schema#',
Expand Down

0 comments on commit d06b510

Please sign in to comment.