diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b74997a4b..885856b3f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ # These pre-commit hooks mirror the Github CI, so running them locally will catch errors earlier. repos: - repo: https://github.com/rubocop/rubocop - rev: v1.77.0 + rev: v1.79.2 hooks: - id: rubocop - repo: https://github.com/syntaqx/git-hooks diff --git a/lib/crew_lockfile.rb b/lib/crew_lockfile.rb index 097436340..ad2eba31a 100644 --- a/lib/crew_lockfile.rb +++ b/lib/crew_lockfile.rb @@ -416,13 +416,13 @@ unless defined?($__crew_lockfile__) || defined?(CrewLockfile) nil end begin - return((Time.now - File.stat(@path).mtime) < @max_age) + return ((Time.now - File.stat(@path).mtime) < @max_age) rescue Errno::ENOENT return false end else exist = File.exist?(@path) - return(exist ? true : nil) + return (exist ? true : nil) end end @@ -518,7 +518,7 @@ unless defined?($__crew_lockfile__) || defined?(CrewLockfile) ensure File.umask umask if umask end - return(block_given? ? begin; yield f; ensure; f.close; end : f) + return (block_given? ? begin; yield f; ensure; f.close; end : f) end def touch(path)