Skip to content

Commit 160fd14

Browse files
committed
Update rubocop rules
1 parent 65137de commit 160fd14

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Rakefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ end
2727
desc "Compile binary extension"
2828
task :compile do
2929
require 'tempfile'
30-
Dir.chdir(Dir.tmpdir) do
30+
Dir.chdir(Dir.tmpdir) do # rubocop:disable ThreadSafety/DirChdir
3131
sh "ruby '#{File.join(__dir__, 'ext', 'extconf.rb')}'"
3232
end
3333
end
@@ -52,9 +52,9 @@ end
5252

5353
desc "Encode git revision into 'ext/extconf.rb' template (dependency of 'build' task)"
5454
task :render_git_revision do
55-
library_revision = Dir.chdir(__dir__) { `git rev-parse HEAD`.strip }
56-
core_revision = Dir.chdir(File.join(__dir__, 'ext', 'couchbase')) { `git rev-parse HEAD`.strip }
57-
core_describe = Dir.chdir(File.join(__dir__, 'ext', 'couchbase')) do
55+
library_revision = Dir.chdir(__dir__) { `git rev-parse HEAD`.strip } # rubocop:disable ThreadSafety/DirChdir
56+
core_revision = Dir.chdir(File.join(__dir__, 'ext', 'couchbase')) { `git rev-parse HEAD`.strip } # rubocop:disable ThreadSafety/DirChdir
57+
core_describe = Dir.chdir(File.join(__dir__, 'ext', 'couchbase')) do # rubocop:disable ThreadSafety/DirChdir
5858
`git fetch --tags >/dev/null 2>&1`
5959
`git describe --long --always HEAD`.strip
6060
end

bin/jenkins/repackage-extension.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def bundle(target_dir)
5151
end
5252

5353
if first_gemspec
54-
Dir.chdir(first_gemspec.full_gem_path) do
54+
Dir.chdir(first_gemspec.full_gem_path) do # rubocop:disable ThreadSafety/DirChdir
5555
File.write("lib/couchbase/libcouchbase.rb", <<-RUBY)
5656
begin
5757
require_relative "\#{RUBY_VERSION[/(\\d+\\.\\d+)/]}/libcouchbase"
@@ -101,7 +101,7 @@ def repackage(gemspec)
101101
# build new gem
102102
output_gem = nil
103103

104-
Dir.chdir gemspec.full_gem_path do
104+
Dir.chdir gemspec.full_gem_path do # rubocop:disable ThreadSafety/DirChdir
105105
output_gem = Gem::Package.build(gemspec, true)
106106
end
107107

lib/couchbase/logger.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def self.log_level
4646

4747
# Return logger associated with the library
4848
def self.logger
49-
@logger # rubocop:disable ThreadSafety/InstanceVariableInClassMethod
49+
@logger # rubocop:disable ThreadSafety/ClassInstanceVariable
5050
end
5151

5252
# Associate logger with the library
@@ -67,8 +67,8 @@ def self.logger
6767
#
6868
# @since 3.4.0
6969
def self.set_logger(logger, adapter_class: nil, verbose: false, level: :info)
70-
@logger = logger # rubocop:disable ThreadSafety/InstanceVariableInClassMethod
71-
if @logger.nil? # rubocop:disable ThreadSafety/InstanceVariableInClassMethod
70+
@logger = logger # rubocop:disable ThreadSafety/ClassInstanceVariable
71+
if @logger.nil? # rubocop:disable ThreadSafety/ClassInstanceVariable
7272
Backend.install_logger_shim(nil)
7373
return
7474
end

0 commit comments

Comments
 (0)