Skip to content
This repository was archived by the owner on Oct 16, 2025. It is now read-only.

Commit f02b96d

Browse files
committed
rubocop updates
1 parent 39874a9 commit f02b96d

13 files changed

Lines changed: 68 additions & 65 deletions

File tree

mysql-ruby-lambda/.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Naming/AccessorMethodName:
1919
Enabled: false
2020
Style/NestedTernaryOperator:
2121
Enabled: false
22-
Naming/PredicateName:
22+
Naming/PredicatePrefix:
2323
Enabled: false
2424

2525
Layout/MultilineMethodCallIndentation:

mysql-ruby-lambda/Gemfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ GEM
99
remote: https://rubygems.org/
1010
specs:
1111
ast (2.4.3)
12-
json (2.12.0)
12+
json (2.12.2)
1313
language_server-protocol (3.17.0.5)
1414
lint_roller (1.1.0)
1515
mysql2 (0.5.6)
@@ -21,18 +21,18 @@ GEM
2121
racc (1.8.1)
2222
rainbow (3.1.1)
2323
regexp_parser (2.10.0)
24-
rubocop (1.75.5)
24+
rubocop (1.77.0)
2525
json (~> 2.3)
2626
language_server-protocol (~> 3.17.0.2)
2727
lint_roller (~> 1.1.0)
2828
parallel (~> 1.10)
2929
parser (>= 3.3.0.2)
3030
rainbow (>= 2.2.2, < 4.0)
3131
regexp_parser (>= 2.9.3, < 3.0)
32-
rubocop-ast (>= 1.44.0, < 2.0)
32+
rubocop-ast (>= 1.45.1, < 2.0)
3333
ruby-progressbar (~> 1.7)
3434
unicode-display_width (>= 2.4.0, < 4.0)
35-
rubocop-ast (1.44.1)
35+
rubocop-ast (1.45.1)
3636
parser (>= 3.3.7.2)
3737
prism (~> 1.4)
3838
ruby-progressbar (1.13.0)
@@ -49,4 +49,4 @@ DEPENDENCIES
4949
uc3-ssm!
5050

5151
BUNDLED WITH
52-
2.6.8
52+
2.6.9

src-admintool/.rubocop.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ Naming/AccessorMethodName:
1919
Enabled: false
2020
Style/NestedTernaryOperator:
2121
Enabled: false
22-
Naming/PredicateName:
22+
Naming/PredicatePrefix:
23+
Enabled: false
24+
Naming/PredicateMethod:
2325
Enabled: false
2426

2527
Layout/MultilineMethodCallIndentation:

src-admintool/Gemfile.lock

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ GEM
99
remote: https://rubygems.org/
1010
specs:
1111
ast (2.4.3)
12-
aws-eventstream (1.3.2)
13-
aws-partitions (1.1103.0)
14-
aws-sdk-core (3.224.0)
12+
aws-eventstream (1.4.0)
13+
aws-partitions (1.1124.0)
14+
aws-sdk-core (3.226.2)
1515
aws-eventstream (~> 1, >= 1.3.0)
1616
aws-partitions (~> 1, >= 1.992.0)
1717
aws-sigv4 (~> 1.9)
1818
base64
1919
jmespath (~> 1, >= 1.6.1)
2020
logger
21-
aws-sdk-kms (1.101.0)
22-
aws-sdk-core (~> 3, >= 3.216.0)
21+
aws-sdk-kms (1.106.0)
22+
aws-sdk-core (~> 3, >= 3.225.0)
2323
aws-sigv4 (~> 1.5)
24-
aws-sdk-s3 (1.186.0)
25-
aws-sdk-core (~> 3, >= 3.216.0)
24+
aws-sdk-s3 (1.191.0)
25+
aws-sdk-core (~> 3, >= 3.225.0)
2626
aws-sdk-kms (~> 1)
2727
aws-sigv4 (~> 1.5)
28-
aws-sigv4 (1.11.0)
28+
aws-sigv4 (1.12.1)
2929
aws-eventstream (~> 1, >= 1.0.2)
30-
base64 (0.2.0)
30+
base64 (0.3.0)
3131
jmespath (1.6.2)
32-
json (2.12.0)
32+
json (2.12.2)
3333
language_server-protocol (3.17.0.5)
3434
lint_roller (1.1.0)
3535
logger (1.7.0)
@@ -42,18 +42,18 @@ GEM
4242
racc (1.8.1)
4343
rainbow (3.1.1)
4444
regexp_parser (2.10.0)
45-
rubocop (1.75.5)
45+
rubocop (1.77.0)
4646
json (~> 2.3)
4747
language_server-protocol (~> 3.17.0.2)
4848
lint_roller (~> 1.1.0)
4949
parallel (~> 1.10)
5050
parser (>= 3.3.0.2)
5151
rainbow (>= 2.2.2, < 4.0)
5252
regexp_parser (>= 2.9.3, < 3.0)
53-
rubocop-ast (>= 1.44.0, < 2.0)
53+
rubocop-ast (>= 1.45.1, < 2.0)
5454
ruby-progressbar (~> 1.7)
5555
unicode-display_width (>= 2.4.0, < 4.0)
56-
rubocop-ast (1.44.1)
56+
rubocop-ast (1.45.1)
5757
parser (>= 3.3.7.2)
5858
prism (~> 1.4)
5959
ruby-progressbar (1.13.0)
@@ -73,4 +73,4 @@ DEPENDENCIES
7373
uc3-ssm!
7474

7575
BUNDLED WITH
76-
2.6.8
76+
2.6.9

src-admintool/queries/audit_ucb_query.rb

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,37 @@ def get_sql
2323
a.status as audit_status,
2424
case
2525
when a.status in ('size-mismatch','digest-mismatch', 'unverified') then 'Audit Failed'
26-
when ifnull(verified, o.modified) < date_add(o.modified, interval #{@wait_hours} hour) and o.modified > date_add(now(), interval -#{@wait_hours} hour) then 'Reset Later'
27-
when a.status = 'verified' and ifnull(verified, o.modified) < date_add(o.modified, interval #{@wait_hours} hour) then 'Reset Needed'
26+
when ifnull(verified, o.modified) < date_add(o.modified, interval #{@wait_hours} hour)
27+
and o.modified > date_add(now(), interval -#{@wait_hours} hour)
28+
then 'Reset Later'
29+
when a.status = 'verified'
30+
and ifnull(verified, o.modified) < date_add(o.modified, interval #{@wait_hours} hour)
31+
then 'Reset Needed'
2832
when a.status = 'verified' then 'Audited'
2933
else 'In Progress'
3034
end as category,
3135
case
3236
when a.status in ('size-mismatch','digest-mismatch', 'unverified') then 'FAIL'
33-
when ifnull(verified, o.modified) < date_add(o.modified, interval #{@wait_hours} hour) and o.modified > date_add(now(), interval -#{@wait_hours} hour) then 'INFO'
34-
when a.status = 'verified' and ifnull(verified, o.modified) < date_add(o.modified, interval #{@wait_hours} hour) then 'WARN'
37+
when ifnull(verified, o.modified) < date_add(o.modified, interval #{@wait_hours} hour)
38+
and o.modified > date_add(now(), interval -#{@wait_hours} hour)
39+
then 'INFO'
40+
when a.status = 'verified'
41+
and ifnull(verified, o.modified) < date_add(o.modified, interval #{@wait_hours} hour)
42+
then 'WARN'
3543
when a.status = 'verified' then 'PASS'
3644
else 'INFO'
3745
end as status
38-
from
46+
from
3947
inv.inv_objects o
4048
right join
41-
inv.inv_audits a
42-
on
43-
a.inv_object_id = o.id
44-
and
49+
inv.inv_audits a
50+
on
51+
a.inv_object_id = o.id
52+
and
4553
a.inv_node_id = 16 /*sdsc node*/
46-
where
54+
where
4755
o.inv_owner_id=14 /*ucb owner*/
48-
and
56+
and
4957
o.modified > date_add(now(), interval -#{@days.to_i} day)
5058
group by
5159
o.id,

src-admintool/queries/change_token_query.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def get_sql
2929
where
3030
f.pathname = 'system/provenance_manifest.xml'
3131
group by
32-
c.mnemonic
32+
c.mnemonic
3333
;
3434
}
3535
end
@@ -39,6 +39,6 @@ def get_headers(_results)
3939
end
4040

4141
def get_types(_results)
42-
['mnemonic', 'datetime', 'datetime', 'datetime', 'datetime', 'dataint', 'bytes']
42+
%w[mnemonic datetime datetime datetime datetime dataint bytes]
4343
end
4444
end

src-admintool/queries/collections_by_time_cumulative_query.rb

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,7 @@ def get_sql
7171
and
7272
#{verify_files_col(@col)} > 0
7373
#{
74-
if @source == 'producer'
75-
" and source='producer'"
76-
else
77-
''
78-
end
74+
" and source='producer'" if @source == 'producer'
7975
}
8076
) + (
8177
select
@@ -91,11 +87,7 @@ def get_sql
9187
and
9288
date_added >= date_add(now(), interval - 730 day)
9389
#{
94-
if @source == 'producer'
95-
" and source='producer'"
96-
else
97-
''
98-
end
90+
" and source='producer'" if @source == 'producer'
9991
}
10092
)
10193
as sumval

src-admintool/queries/collections_by_time_query.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,7 @@ def get_sql
9090
and
9191
#{verify_files_col(@col)} > 0
9292
#{
93-
if @source == 'producer'
94-
" and source='producer'"
95-
else
96-
''
97-
end
93+
" and source='producer'" if @source == 'producer'
9894
}
9995
) as sumval
10096
from

src-admintool/queries/idlist_query.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ def get_sql
3636
select
3737
trim(substring_index(o.erc_where, ';', -1)) doi,
3838
o.ark,
39-
(
40-
select substring_index(c.mnemonic,'_', 1)
39+
(
40+
select substring_index(c.mnemonic,'_', 1)
4141
from inv.inv_collections c
42-
inner join inv.inv_collections_inv_objects icio
43-
on icio.inv_collection_id=c.id
42+
inner join inv.inv_collections_inv_objects icio
43+
on icio.inv_collection_id=c.id
4444
where icio.inv_object_id=o.id
45-
limit 1
45+
limit 1
4646
) as campus,
4747
date(created),
4848
}

src-colladmin/.rubocop.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ Naming/AccessorMethodName:
1919
Enabled: false
2020
Style/NestedTernaryOperator:
2121
Enabled: false
22-
Naming/PredicateName:
22+
Naming/PredicatePrefix:
23+
Enabled: false
24+
Naming/PredicateMethod:
2325
Enabled: false
24-
2526
Layout/MultilineMethodCallIndentation:
2627
EnforcedStyle: indented
2728
Layout/ParameterAlignment:

0 commit comments

Comments
 (0)