Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Boudes
mastodon
Commits
d2dcb6c4
Unverified
Commit
d2dcb6c4
authored
2 years ago
by
Nick Schonning
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Autofix Rubocop Style/UnpackFirst (#23741)
parent
5116347e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.rubocop_todo.yml
+0
-7
0 additions, 7 deletions
.rubocop_todo.yml
app/models/concerns/account_interactions.rb
+2
-2
2 additions, 2 deletions
app/models/concerns/account_interactions.rb
lib/paperclip/gif_transcoder.rb
+2
-2
2 additions, 2 deletions
lib/paperclip/gif_transcoder.rb
with
4 additions
and
11 deletions
.rubocop_todo.yml
+
0
−
7
View file @
d2dcb6c4
...
...
@@ -2617,10 +2617,3 @@ Style/SymbolArray:
Style/SymbolProc
:
Exclude
:
-
'
spec/lib/request_spec.rb'
# Offense count: 4
# This cop supports safe autocorrection (--autocorrect).
Style/UnpackFirst
:
Exclude
:
-
'
app/models/concerns/account_interactions.rb'
-
'
lib/paperclip/gif_transcoder.rb'
This diff is collapsed.
Click to expand it.
app/models/concerns/account_interactions.rb
+
2
−
2
View file @
d2dcb6c4
...
...
@@ -278,7 +278,7 @@ module AccountInteractions
followers
.
where
(
Account
.
arel_table
[
:uri
].
matches
(
"
#{
Account
.
sanitize_sql_like
(
url_prefix
)
}
/%"
,
false
,
true
)).
or
(
followers
.
where
(
uri:
url_prefix
)).
pluck_each
(
:uri
)
do
|
uri
|
Xorcist
.
xor!
(
digest
,
Digest
::
SHA256
.
digest
(
uri
))
end
digest
.
unpack
(
'H*'
)
[
0
]
digest
.
unpack
1
(
'H*'
)
end
end
...
...
@@ -288,7 +288,7 @@ module AccountInteractions
followers
.
where
(
domain:
nil
).
pluck_each
(
:username
)
do
|
username
|
Xorcist
.
xor!
(
digest
,
Digest
::
SHA256
.
digest
(
ActivityPub
::
TagManager
.
instance
.
uri_for_username
(
username
)))
end
digest
.
unpack
(
'H*'
)
[
0
]
digest
.
unpack
1
(
'H*'
)
end
end
...
...
This diff is collapsed.
Click to expand it.
lib/paperclip/gif_transcoder.rb
+
2
−
2
View file @
d2dcb6c4
...
...
@@ -57,7 +57,7 @@ class GifReader
end
# Skip lzw min code size
raise
InvalidValue
unless
s
.
read
(
1
).
unpack
(
'C'
)
[
0
]
>=
2
raise
InvalidValue
unless
s
.
read
(
1
).
unpack
1
(
'C'
)
>=
2
# Skip image data sub-blocks
skip_sub_blocks!
(
s
)
...
...
@@ -77,7 +77,7 @@ class GifReader
private
def
skip_extension_block!
(
file
)
if
EXTENSION_LABELS
.
include?
(
file
.
read
(
1
).
unpack
(
'C'
)
[
0
]
)
if
EXTENSION_LABELS
.
include?
(
file
.
read
(
1
).
unpack
1
(
'C'
))
block_size
,
=
file
.
read
(
1
).
unpack
(
'C'
)
file
.
seek
(
block_size
,
IO
::
SEEK_CUR
)
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment