diff --git a/Gemfile.lock b/Gemfile.lock index 368a9fc..ba7cbb7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -25,7 +25,7 @@ GEM temple (>= 0.8.2) thor tilt - json (2.12.2) + json (2.15.2) language_server-protocol (3.17.0.5) lint_roller (1.1.0) logger (1.7.0) @@ -37,14 +37,14 @@ GEM ougai (2.0.0) oj (~> 3.10) parallel (1.27.0) - parser (3.3.8.0) + parser (3.3.9.0) ast (~> 2.4.1) racc pg (1.5.9) pg_query (6.1.0) google-protobuf (>= 3.25.3) prettier_print (1.2.1) - prism (1.4.0) + prism (1.6.0) pry (0.15.2) coderay (~> 1.1) method_source (~> 1.0) @@ -53,7 +53,7 @@ GEM rake (13.3.0) rbs (3.9.4) logger - regexp_parser (2.10.0) + regexp_parser (2.11.3) rspec (3.13.1) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) @@ -67,7 +67,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.4) - rubocop (1.76.0) + rubocop (1.81.6) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -75,10 +75,10 @@ GEM parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.45.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.45.0) + rubocop-ast (1.47.1) parser (>= 3.3.7.2) prism (~> 1.4) rubocop-packaging (0.6.0) @@ -110,9 +110,9 @@ GEM temple (0.10.3) thor (1.4.0) tilt (2.6.0) - unicode-display_width (3.1.4) - unicode-emoji (~> 4.0, >= 4.0.4) - unicode-emoji (4.0.4) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.1.0) PLATFORMS arm64-darwin-22 diff --git a/lib/pg_easy_replicate/stats.rb b/lib/pg_easy_replicate/stats.rb index ba0f91d..06fbf9c 100644 --- a/lib/pg_easy_replicate/stats.rb +++ b/lib/pg_easy_replicate/stats.rb @@ -122,7 +122,7 @@ def all_tables_replicating?(group_name) .with_object(Hash.new(0)) do |state, counts| counts[state[:replication_state]] += 1 end - result.keys.uniq.count == 1 && + result.keys.uniq.one? && result.keys.first == REPLICATION_STATE_MAP["r"] end diff --git a/pg_easy_replicate.gemspec b/pg_easy_replicate.gemspec index b86e1ab..535d1d0 100644 --- a/pg_easy_replicate.gemspec +++ b/pg_easy_replicate.gemspec @@ -15,11 +15,13 @@ Gem::Specification.new do |spec| spec.license = "MIT" spec.required_ruby_version = ">= 3.0.0" - spec.metadata["homepage_uri"] = spec.homepage - spec.metadata["source_code_uri"] = spec.homepage - spec.metadata[ - "changelog_uri" - ] = "https://github.com/shayonj/pg_easy_replicate/blob/main/CODE_OF_CONDUCT.md" + spec.metadata = { + "homepage_uri" => spec.homepage, + "source_code_uri" => spec.homepage, + "changelog_uri" => + "https://github.com/shayonj/pg_easy_replicate/blob/main/CODE_OF_CONDUCT.md", + "rubygems_mfa_required" => "true" + } # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git. @@ -36,7 +38,6 @@ Gem::Specification.new do |spec| spec.bindir = "bin" spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.metadata = { "rubygems_mfa_required" => "true" } spec.add_dependency("ougai", "~> 2.0.0") spec.add_dependency("pg", "~> 1.5.3")