Skip to content

Commit

Permalink
enable additional rubocop rule
Browse files Browse the repository at this point in the history
  • Loading branch information
terrywbrady committed Jan 17, 2024
1 parent c49debe commit 6ef2da1
Show file tree
Hide file tree
Showing 22 changed files with 149 additions and 131 deletions.
17 changes: 8 additions & 9 deletions cognito-lambda-nonvpc/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,14 @@ Style/ConditionalAssignment:
Style/ClassVars:
Enabled: false

# Rubocop errors out when the following are added: https://github.com/rubocop/rubocop/issues/12548
#Layout/FirstArrayElementIndentation:
# Enabled: true
#Layout/FirstArrayElementLineBreak:
# Enabled: true
#Layout/ArrayAlignment:
# EnforcedStyle: with_fixed_indentation
#Layout/MultilineArrayBraceLayout:
# EnforcedStyle: new_line
Layout/FirstArrayElementIndentation:
Enabled: true
Layout/FirstArrayElementLineBreak:
Enabled: true
Layout/ArrayAlignment:
EnforcedStyle: with_fixed_indentation
Layout/MultilineArrayBraceLayout:
EnforcedStyle: new_line

Layout/FirstHashElementIndentation:
Enabled: true
Expand Down
12 changes: 6 additions & 6 deletions cognito-lambda-nonvpc/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ GEM
specs:
ast (2.4.2)
aws-eventstream (1.3.0)
aws-partitions (1.876.0)
aws-partitions (1.881.0)
aws-sdk-cognitoidentityprovider (1.85.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sigv4 (~> 1.1)
aws-sdk-core (3.190.1)
aws-sdk-core (3.190.3)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
Expand All @@ -18,18 +18,18 @@ GEM
json (2.7.1)
language_server-protocol (3.17.0.3)
parallel (1.24.0)
parser (3.2.2.4)
parser (3.3.0.4)
ast (~> 2.4.1)
racc
racc (1.7.3)
rainbow (3.1.1)
regexp_parser (2.8.3)
regexp_parser (2.9.0)
rexml (3.2.6)
rubocop (1.59.0)
rubocop (1.60.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.4)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
Expand Down
17 changes: 8 additions & 9 deletions mysql-ruby-lambda/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,14 @@ Style/ConditionalAssignment:
Style/ClassVars:
Enabled: false

# Rubocop errors out when the following are added: https://github.com/rubocop/rubocop/issues/12548
#Layout/FirstArrayElementIndentation:
# Enabled: true
#Layout/FirstArrayElementLineBreak:
# Enabled: true
#Layout/ArrayAlignment:
# EnforcedStyle: with_fixed_indentation
#Layout/MultilineArrayBraceLayout:
# EnforcedStyle: new_line
Layout/FirstArrayElementIndentation:
Enabled: true
Layout/FirstArrayElementLineBreak:
Enabled: true
Layout/ArrayAlignment:
EnforcedStyle: with_fixed_indentation
Layout/MultilineArrayBraceLayout:
EnforcedStyle: new_line

Layout/FirstHashElementIndentation:
Enabled: true
Expand Down
12 changes: 6 additions & 6 deletions mysql-ruby-lambda/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ GEM
specs:
ast (2.4.2)
aws-eventstream (1.3.0)
aws-partitions (1.876.0)
aws-sdk-core (3.190.1)
aws-partitions (1.881.0)
aws-sdk-core (3.190.3)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
Expand All @@ -30,18 +30,18 @@ GEM
logger (1.6.0)
mysql2 (0.5.5)
parallel (1.24.0)
parser (3.2.2.4)
parser (3.3.0.4)
ast (~> 2.4.1)
racc
racc (1.7.3)
rainbow (3.1.1)
regexp_parser (2.8.3)
regexp_parser (2.9.0)
rexml (3.2.6)
rubocop (1.59.0)
rubocop (1.60.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.4)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
Expand Down
17 changes: 8 additions & 9 deletions simulate-lambda-alb/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,14 @@ Style/ConditionalAssignment:
Style/ClassVars:
Enabled: false

# Rubocop errors out when the following are added: https://github.com/rubocop/rubocop/issues/12548
#Layout/FirstArrayElementIndentation:
# Enabled: true
#Layout/FirstArrayElementLineBreak:
# Enabled: true
#Layout/ArrayAlignment:
# EnforcedStyle: with_fixed_indentation
#Layout/MultilineArrayBraceLayout:
# EnforcedStyle: new_line
Layout/FirstArrayElementIndentation:
Enabled: true
Layout/FirstArrayElementLineBreak:
Enabled: true
Layout/ArrayAlignment:
EnforcedStyle: with_fixed_indentation
Layout/MultilineArrayBraceLayout:
EnforcedStyle: new_line

Layout/FirstHashElementIndentation:
Enabled: true
Expand Down
8 changes: 4 additions & 4 deletions simulate-lambda-alb/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ GEM
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
parallel (1.24.0)
parser (3.2.2.4)
parser (3.3.0.4)
ast (~> 2.4.1)
racc
racc (1.7.3)
Expand All @@ -18,13 +18,13 @@ GEM
base64 (>= 0.1.0)
rack (~> 2.2, >= 2.2.4)
rainbow (3.1.1)
regexp_parser (2.8.3)
regexp_parser (2.9.0)
rexml (3.2.6)
rubocop (1.59.0)
rubocop (1.60.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.4)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
Expand Down
17 changes: 8 additions & 9 deletions src-admintool/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,14 @@ Style/ConditionalAssignment:
Style/ClassVars:
Enabled: false

# Rubocop errors out when the following are added: https://github.com/rubocop/rubocop/issues/12548
#Layout/FirstArrayElementIndentation:
# Enabled: true
#Layout/FirstArrayElementLineBreak:
# Enabled: true
#Layout/ArrayAlignment:
# EnforcedStyle: with_fixed_indentation
#Layout/MultilineArrayBraceLayout:
# EnforcedStyle: new_line
Layout/FirstArrayElementIndentation:
Enabled: true
Layout/FirstArrayElementLineBreak:
Enabled: true
Layout/ArrayAlignment:
EnforcedStyle: with_fixed_indentation
Layout/MultilineArrayBraceLayout:
EnforcedStyle: new_line

Layout/FirstHashElementIndentation:
Enabled: true
Expand Down
14 changes: 7 additions & 7 deletions src-admintool/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ GEM
specs:
ast (2.4.2)
aws-eventstream (1.3.0)
aws-partitions (1.876.0)
aws-sdk-core (3.190.1)
aws-partitions (1.881.0)
aws-sdk-core (3.190.3)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.75.0)
aws-sdk-kms (1.76.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.142.0)
Expand All @@ -37,18 +37,18 @@ GEM
logger (1.6.0)
mysql2 (0.5.5)
parallel (1.24.0)
parser (3.2.2.4)
parser (3.3.0.4)
ast (~> 2.4.1)
racc
racc (1.7.3)
rainbow (3.1.1)
regexp_parser (2.8.3)
regexp_parser (2.9.0)
rexml (3.2.6)
rubocop (1.59.0)
rubocop (1.60.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.4)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
Expand Down
6 changes: 4 additions & 2 deletions src-admintool/queries/admin_objects_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ def get_sql
end

def get_headers(_results)
['Obj Id', 'Obj Ark', 'Coll/Own Ark', 'Owner', 'OwnerArk', 'Collections', 'Type', 'Role', 'Aggregate Role', 'Name',
'Created', 'Status']
[
'Obj Id', 'Obj Ark', 'Coll/Own Ark', 'Owner', 'OwnerArk', 'Collections', 'Type', 'Role', 'Aggregate Role', 'Name',
'Created', 'Status'
]
end

def get_types(_results)
Expand Down
6 changes: 4 additions & 2 deletions src-admintool/queries/nodes_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ def get_sql
end

def get_headers(_results)
['Node Number', 'Description', 'Total Obj', 'Primary Obj', 'Secondary Obj', 'File Count', 'Billable Size',
'Allocation', 'Status']
[
'Node Number', 'Description', 'Total Obj', 'Primary Obj', 'Secondary Obj', 'File Count', 'Billable Size',
'Allocation', 'Status'
]
end

def get_types(_results)
Expand Down
6 changes: 4 additions & 2 deletions src-admintool/queries/objects_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ def get_obj_limit_query
end

def get_headers(_results)
['Object Id', 'Ark', 'Title', 'Author', 'Local Id (erc_where)', 'Version', 'Coll Id', 'Collection', 'File Count',
'Billable Size', 'Modified']
[
'Object Id', 'Ark', 'Title', 'Author', 'Local Id (erc_where)', 'Version', 'Coll Id', 'Collection', 'File Count',
'Billable Size', 'Modified'
]
end

def get_types(_results)
Expand Down
6 changes: 4 additions & 2 deletions src-admintool/queries/replic_failed_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ def init_status
end

def get_headers(_results)
['Category', 'Object Id', 'Ark', 'Version', 'Obj Created', 'Replic Start', 'Bytes', 'Rep Status', 'Fail Nodes',
'Status']
[
'Category', 'Object Id', 'Ark', 'Version', 'Obj Created', 'Replic Start', 'Bytes', 'Rep Status', 'Fail Nodes',
'Status'
]
end

def get_types(_results)
Expand Down
6 changes: 4 additions & 2 deletions src-admintool/queries/replic_initiated_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,10 @@ def init_status
end

def get_headers(_results)
['Category', 'Object Id', 'Ark', 'Version', 'Obj Created', 'Replic Start', 'Bytes', 'Sec Count', 'Ver Min',
'Ver Max', 'Status']
[
'Category', 'Object Id', 'Ark', 'Version', 'Obj Created', 'Replic Start', 'Bytes', 'Sec Count', 'Ver Min',
'Ver Max', 'Status'
]
end

def get_types(_results)
Expand Down
6 changes: 4 additions & 2 deletions src-admintool/queries/ui_test_cases_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ def get_title
def get_sql
sample = 3
sql = ''.dup
list = %w[merritt_demo escholarship ucb_lib_cal_cultures ucb_lib_dcpp ucb_lib_metcalf ucb_lib_jar ucb_lib_prechmat
ucb_lib_stone_rubbings]
list = %w[
merritt_demo escholarship ucb_lib_cal_cultures ucb_lib_dcpp ucb_lib_metcalf ucb_lib_jar ucb_lib_prechmat
ucb_lib_stone_rubbings
]
list.each do |coll|
sql << 'union ' unless sql.empty?
sql << %{
Expand Down
17 changes: 8 additions & 9 deletions src-colladmin/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,14 @@ Style/ConditionalAssignment:
Style/ClassVars:
Enabled: false

# Rubocop errors out when the following are added: https://github.com/rubocop/rubocop/issues/12548
#Layout/FirstArrayElementIndentation:
# Enabled: true
#Layout/FirstArrayElementLineBreak:
# Enabled: true
#Layout/ArrayAlignment:
# EnforcedStyle: with_fixed_indentation
#Layout/MultilineArrayBraceLayout:
# EnforcedStyle: new_line
Layout/FirstArrayElementIndentation:
Enabled: true
Layout/FirstArrayElementLineBreak:
Enabled: true
Layout/ArrayAlignment:
EnforcedStyle: with_fixed_indentation
Layout/MultilineArrayBraceLayout:
EnforcedStyle: new_line

Layout/FirstHashElementIndentation:
Enabled: true
Expand Down
16 changes: 8 additions & 8 deletions src-colladmin/actions/ingest_collection_locks_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ def table_rows(_body)
p = plist[prof]
hc = @held_counts.fetch(prof, 0)
arr.append([
prof,
p[:collid],
p[:name],
p[:locked] ? 'Locked' : '',
"#{p[:locked] ? 'unlock' : 'lock'},#{prof}",
hc,
hc.positive? ? prof : ''
])
prof,
p[:collid],
p[:name],
p[:locked] ? 'Locked' : '',
"#{p[:locked] ? 'unlock' : 'lock'},#{prof}",
hc,
hc.positive? ? prof : ''
])
end
arr
end
Expand Down
3 changes: 2 additions & 1 deletion src-colladmin/actions/opensearch_describe_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def initialize(config, action, path, myparams)
file = 'import/filebeat/fields.json'
@title = "Merritt OpenSearch Fields (#{File.ctime(file).to_s[0..15]})"
@fields = JSON.parse(File.read(file))
#load_registry
# load_registry
end

def load_registry
Expand Down Expand Up @@ -65,6 +65,7 @@ def table_rows(_body)
@fields.each do |val|
name = val.fetch('name', '')
next if name =~ /\.keyword$/

type = val.fetch('type', '')
rows.append([name, type, 'PASS'])
end
Expand Down
6 changes: 4 additions & 2 deletions src-colladmin/lib/merritt_ldap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ def load
end

def load_users
attr = %i[dn objectclass mail sn tzregion cn arkid givenname userpassword displayname uid
ds-pwp-last-login-time]
attr = %i[
dn objectclass mail sn tzregion cn arkid givenname userpassword displayname uid
ds-pwp-last-login-time
]
@ldap.search(base: user_base, attributes: attr) do |entry|
user = LdapUser.new(entry)
next if user.uid.empty?
Expand Down
Loading

0 comments on commit 6ef2da1

Please sign in to comment.