From 754f2f9773c4d608f4070cf941a5e7c2d95f7b79 Mon Sep 17 00:00:00 2001 From: Sergey Avseyev Date: Wed, 11 Mar 2026 16:45:03 -0700 Subject: [PATCH] Update core to 1.3.0 --- .rubocop.yml | 3 +++ Rakefile | 5 +++++ ext/couchbase | 2 +- test/crud_test.rb | 16 ++++++++-------- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index d1ea73a5..fcda3591 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -52,3 +52,6 @@ Style/TrailingCommaInArguments: Layout/FirstHashElementIndentation: EnforcedStyle: consistent + +Style/OneClassPerFile: + Enabled: false diff --git a/Rakefile b/Rakefile index 0594c795..55f09585 100644 --- a/Rakefile +++ b/Rakefile @@ -58,11 +58,16 @@ task :render_git_revision do `git fetch --tags >/dev/null 2>&1` `git describe --long --always HEAD`.strip end + core_timestamp = Dir.chdir(File.join(__dir__, 'ext', 'couchbase')) do # rubocop:disable ThreadSafety/DirChdir + `git log --max-count=1 --no-patch --format=%cd --date=format:%Y-%m-%dT%H:%M:%S HEAD`.strip + end + File.open(File.join(__dir__, "ext", "cache", "extconf_include.rb"), "a+") do |io| io.puts(<<~REVISIONS) cmake_flags << "-DEXT_GIT_REVISION=#{library_revision}" cmake_flags << "-DCOUCHBASE_CXX_CLIENT_GIT_REVISION=#{core_revision}" cmake_flags << "-DCOUCHBASE_CXX_CLIENT_GIT_DESCRIBE=#{core_describe}" + cmake_flags << "-DCOUCHBASE_CXX_CLIENT_BUILD_TIMESTAMP=#{core_timestamp}" REVISIONS end end diff --git a/ext/couchbase b/ext/couchbase index 5e53e402..88f58209 160000 --- a/ext/couchbase +++ b/ext/couchbase @@ -1 +1 @@ -Subproject commit 5e53e402e236e37510fd32f27d6903814636917b +Subproject commit 88f58209058891a04af5f99bd4c7d9a8dea2ae5f diff --git a/test/crud_test.rb b/test/crud_test.rb index 0e0de8b3..2647b37b 100644 --- a/test/crud_test.rb +++ b/test/crud_test.rb @@ -629,8 +629,8 @@ def test_projection_preserve_array_indexes def test_insert_get_projection_18_fields doc_id = uniq_id(:project_too_many_fields) - doc = (1..18).each_with_object({}) do |n, obj| - obj["field#{n}"] = n + doc = (1..18).to_h do |n| + ["field#{n}", n] end res = @collection.insert(doc_id, doc) @@ -640,8 +640,8 @@ def test_insert_get_projection_18_fields options = Options::Get.new options.project((1..17).map { |n| "field#{n}" }) res = @collection.get(doc_id, options) - expected = (1..17).each_with_object({}) do |n, obj| - obj["field#{n}"] = n + expected = (1..17).to_h do |n| + ["field#{n}", n] end assert_equal(expected, res.content, "expected result do not include field18") @@ -649,8 +649,8 @@ def test_insert_get_projection_18_fields def test_upsert_get_projection_16_fields_and_expiry doc_id = uniq_id(:project_too_many_fields) - doc = (1..18).each_with_object({}) do |n, obj| - obj["field#{n}"] = n + doc = (1..18).to_h do |n| + ["field#{n}", n] end options = Options::Upsert.new @@ -663,8 +663,8 @@ def test_upsert_get_projection_16_fields_and_expiry options.project((1..16).map { |n| "field#{n}" }) options.with_expiry = true res = @collection.get(doc_id, options) - expected = (1..16).each_with_object({}) do |n, obj| - obj["field#{n}"] = n + expected = (1..16).to_h do |n| + ["field#{n}", n] end assert_equal(expected, res.content, "expected result do not include field17, field18")