Skip to content

Commit 1d2b706

Browse files
committed
Update core to 1.3.0
1 parent cdaf596 commit 1d2b706

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

Rakefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,16 @@ task :render_git_revision do
5858
`git fetch --tags >/dev/null 2>&1`
5959
`git describe --long --always HEAD`.strip
6060
end
61+
core_timestamp = Dir.chdir(File.join(__dir__, 'ext', 'couchbase')) do # rubocop:disable ThreadSafety/DirChdir
62+
`git log --max-count=1 --no-patch --format=%cd --date=format:%Y-%m-%dT%H:%M:%S HEAD`.strip
63+
end
64+
6165
File.open(File.join(__dir__, "ext", "cache", "extconf_include.rb"), "a+") do |io|
6266
io.puts(<<~REVISIONS)
6367
cmake_flags << "-DEXT_GIT_REVISION=#{library_revision}"
6468
cmake_flags << "-DCOUCHBASE_CXX_CLIENT_GIT_REVISION=#{core_revision}"
6569
cmake_flags << "-DCOUCHBASE_CXX_CLIENT_GIT_DESCRIBE=#{core_describe}"
70+
cmake_flags << "-DCOUCHBASE_CXX_CLIENT_BUILD_TIMESTAMP=#{core_timestamp}"
6671
REVISIONS
6772
end
6873
end

ext/couchbase

test/crud_test.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,8 @@ def test_projection_preserve_array_indexes
629629

630630
def test_insert_get_projection_18_fields
631631
doc_id = uniq_id(:project_too_many_fields)
632-
doc = (1..18).each_with_object({}) do |n, obj|
633-
obj["field#{n}"] = n
632+
doc = (1..18).to_h do |n|
633+
["field#{n}", n]
634634
end
635635

636636
res = @collection.insert(doc_id, doc)
@@ -640,17 +640,17 @@ def test_insert_get_projection_18_fields
640640
options = Options::Get.new
641641
options.project((1..17).map { |n| "field#{n}" })
642642
res = @collection.get(doc_id, options)
643-
expected = (1..17).each_with_object({}) do |n, obj|
644-
obj["field#{n}"] = n
643+
expected = (1..17).to_h do |n|
644+
["field#{n}", n]
645645
end
646646

647647
assert_equal(expected, res.content, "expected result do not include field18")
648648
end
649649

650650
def test_upsert_get_projection_16_fields_and_expiry
651651
doc_id = uniq_id(:project_too_many_fields)
652-
doc = (1..18).each_with_object({}) do |n, obj|
653-
obj["field#{n}"] = n
652+
doc = (1..18).to_h do |n|
653+
["field#{n}", n]
654654
end
655655

656656
options = Options::Upsert.new
@@ -663,8 +663,8 @@ def test_upsert_get_projection_16_fields_and_expiry
663663
options.project((1..16).map { |n| "field#{n}" })
664664
options.with_expiry = true
665665
res = @collection.get(doc_id, options)
666-
expected = (1..16).each_with_object({}) do |n, obj|
667-
obj["field#{n}"] = n
666+
expected = (1..16).to_h do |n|
667+
["field#{n}", n]
668668
end
669669

670670
assert_equal(expected, res.content, "expected result do not include field17, field18")

0 commit comments

Comments
 (0)