couchbase-orm 3.0.1 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d788fea6a41e9b49ebfeebb3461e5fc732f367778fd7a1346698c67527c235fa
4
- data.tar.gz: 3970305c914cc190e5d3d900846808f84af4d5963f7cd9ad43a33a29ea9805fa
3
+ metadata.gz: 87ca9e5d5883671444a8c9d6a9fec5191da2d44818b8f95e0511cb379715d4d3
4
+ data.tar.gz: ea7e8e4fe8586958f478a0ac004719b1c4d2c873fa1168974900cd33859e1479
5
5
  SHA512:
6
- metadata.gz: c72b2140fa1d197630dccc977243e8bcd5d6d903f666bd872afb74e2bdbd807fb45075ff8702b43fb71aec0899b2b44758ce72f4e2da5dbf8c25ad8f3fbb0294
7
- data.tar.gz: 721421d62ac89010703e4a4c1db16622cbca32fbc79b9cd91f4774037759311c27ec3248372fdeee1e12f6e99368eb553d0fa87b09821831702689409c58bba1
6
+ metadata.gz: 11e6a97c5f7b08549ce024a0a406d131fab9934efffa9bd410a7328f23bd39d55620b5e6ddc81c257bb78295804c3abaabd80cee41395e35b87d3b2cf902af34
7
+ data.tar.gz: be34bdf6a52ade5558ec6fb50c07570f694731bd422c34d135a0560ae2f14f86c10a5e4bd7226964636d9a6f04ccd7a763d68e231042f6750df390079f3b5b31
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Couchbase ORM for Rails
2
2
 
3
3
  ## Documentation
4
- https://couchbase-ruby-orm.com
4
+ https://www.couchbase-ruby-orm.com
5
5
 
6
6
  ## Installation
7
7
  Add this line to your application's Gemfile:
@@ -117,7 +117,7 @@ The following types have been tested :
117
117
  - See <https://docs.couchbase.com/couchbase-lite/current/c/field-level-encryption.html>
118
118
  - **Important**: CouchbaseOrm does not perform encryption/decryption - your application must encrypt data before storing it
119
119
  - Values must be Base64-encoded strings containing pre-encrypted ciphertext
120
- - See the [encryption documentation](https://couchbase-ruby-orm.com/docs/tutorial-ruby-couchbase-orm/encryption) for details
120
+ - See the [encryption documentation](https://www.couchbase-ruby-orm.com/docs/tutorial-ruby-couchbase-orm/encryption) for details
121
121
  - :array (see below)
122
122
  - :nested (see below)
123
123
 
@@ -9,7 +9,7 @@ Gem::Specification.new do |gem|
9
9
  gem.metadata = {
10
10
  "source_code_uri" => "https://github.com/Couchbase-Ecosystem/couchbase-ruby-orm",
11
11
  "bug_tracker_uri" => "https://github.com/Couchbase-Ecosystem/couchbase-ruby-orm/issues",
12
- "documentation_uri" => "https://couchbase-ruby-orm.com/",
12
+ "documentation_uri" => "https://www.couchbase-ruby-orm.com/",
13
13
  "homepage_uri" => "https://github.com/Couchbase-Ecosystem/couchbase-ruby-orm"
14
14
  }
15
15
  gem.summary = 'Couchbase ORM for Rails'
@@ -30,6 +30,26 @@ const config: Config = {
30
30
  locales: ['en'],
31
31
  },
32
32
 
33
+ // OneTrust Cookies Consent Notice for couchbase.com
34
+ headTags: [
35
+ {
36
+ tagName: 'script',
37
+ attributes: {
38
+ src: 'https://cdn.cookielaw.org/scripttemplates/otSDKStub.js',
39
+ type: 'text/javascript',
40
+ charset: 'UTF-8',
41
+ 'data-domain-script': '748511ff-10bf-44bf-88b8-36382e5b5fd9',
42
+ },
43
+ },
44
+ {
45
+ tagName: 'script',
46
+ attributes: {
47
+ type: 'text/javascript',
48
+ },
49
+ innerHTML: 'function OptanonWrapper() {}',
50
+ },
51
+ ],
52
+
33
53
  presets: [
34
54
  [
35
55
  'classic',
@@ -43,6 +63,13 @@ const config: Config = {
43
63
  theme: {
44
64
  customCss: require.resolve('./src/css/custom.css'),
45
65
  },
66
+ googleTagManager: {
67
+ containerId: 'GTM-MVPNN2',
68
+ },
69
+ gtag: {
70
+ trackingID: 'G-CVKKEY0D6B',
71
+ anonymizeIP: true,
72
+ },
46
73
  } satisfies Preset.Options,
47
74
  ],
48
75
  ],
@@ -15,8 +15,8 @@
15
15
  "typecheck": "tsc"
16
16
  },
17
17
  "dependencies": {
18
- "@docusaurus/core": "3.4.0",
19
- "@docusaurus/preset-classic": "3.4.0",
18
+ "@docusaurus/core": "^3.4.0",
19
+ "@docusaurus/preset-classic": "^3.4.0",
20
20
  "@mdx-js/react": "^3.0.1",
21
21
  "clsx": "^2.1.1",
22
22
  "prism-react-renderer": "^2.3.1",
@@ -24,9 +24,9 @@
24
24
  "react-dom": "^18.3.1"
25
25
  },
26
26
  "devDependencies": {
27
- "@docusaurus/module-type-aliases": "3.4.0",
28
- "@docusaurus/tsconfig": "3.4.0",
29
- "@docusaurus/types": "3.4.0",
27
+ "@docusaurus/module-type-aliases": "^3.4.0",
28
+ "@docusaurus/tsconfig": "^3.4.0",
29
+ "@docusaurus/types": "^3.4.0",
30
30
  "typescript": "~5.4.5"
31
31
  },
32
32
  "browserslist": {
@@ -43,5 +43,11 @@
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=18.0"
46
+ },
47
+ "overrides": {
48
+ "webpack": "~5.91.0"
49
+ },
50
+ "resolutions": {
51
+ "webpack": "~5.91.0"
46
52
  }
47
53
  }
@@ -1 +1 @@
1
- couchbase-ruby-orm.com
1
+ www.couchbase-ruby-orm.com
@@ -113,7 +113,7 @@ module CouchbaseOrm
113
113
  def delete_all
114
114
  CouchbaseOrm::logger.debug{ "Delete all: #{self}" }
115
115
  ids = query.to_a
116
- CouchbaseOrm::Connection.bucket.default_collection.remove_multi(ids) unless ids.empty?
116
+ @model.bucket.default_collection.remove_multi(ids) unless ids.empty?
117
117
  end
118
118
 
119
119
  def where(string_cond=nil, **conds)
@@ -217,7 +217,7 @@ module CouchbaseOrm
217
217
  end
218
218
  if value.is_a?(Hash)
219
219
  value.map do |k, v|
220
- "#{key}.#{k} = #{v}"
220
+ "#{key}.#{k} = #{@model.quote(v) || 'NULL'}"
221
221
  end.join(", ") + for_clause
222
222
  else
223
223
  "#{key} = #{@model.quote(value)}#{for_clause}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true, encoding: ASCII-8BIT
2
2
 
3
3
  module CouchbaseOrm
4
- VERSION = '3.0.1'
4
+ VERSION = '3.0.3'
5
5
  end
@@ -357,6 +357,32 @@ describe CouchbaseOrm::Relation do
357
357
  expect(m3.reload.children.map(&:age)).to eq([50, 20])
358
358
  end
359
359
 
360
+ it "should update nested hash attributes with string values" do
361
+ m1 = RelationModel.create!(age: 10, children: [NestedRelationModel.new(age: 10, name: "Tom"), NestedRelationModel.new(age: 20, name: "Jerry")])
362
+ m2 = RelationModel.create!(age: 20, children: [NestedRelationModel.new(age: 15, name: "Tom"), NestedRelationModel.new(age: 20, name: "Jerry")])
363
+
364
+ RelationModel.where(age: 20).update_all(child: {name: "Updated", _for: :children, _when: {child: {name: "Tom"}}})
365
+
366
+ expect(m1.reload.children.map(&:name)).to eq(["Tom", "Jerry"])
367
+ expect(m2.reload.children.map(&:name)).to eq(["Updated", "Jerry"])
368
+ end
369
+
370
+ it "should update nested hash attributes with nil values" do
371
+ m1 = RelationModel.create!(age: 20, children: [NestedRelationModel.new(age: 10, name: "Tom"), NestedRelationModel.new(age: 20, name: "Jerry")])
372
+
373
+ RelationModel.where(age: 20).update_all(child: {name: nil, _for: :children, _when: {child: {name: "Tom"}}})
374
+
375
+ expect(m1.reload.children.map(&:name)).to eq([nil, "Jerry"])
376
+ end
377
+
378
+ it "should properly quote string values containing special characters in hash updates" do
379
+ m1 = RelationModel.create!(age: 20, children: [NestedRelationModel.new(age: 10, name: "Tom"), NestedRelationModel.new(age: 20, name: "Jerry")])
380
+
381
+ RelationModel.where(age: 20).update_all(child: {name: "it's a test", _for: :children, _when: {child: {name: "Tom"}}})
382
+
383
+ expect(m1.reload.children.map(&:name)).to eq(["it's a test", "Jerry"])
384
+ end
385
+
360
386
  it "should update nested attributes with a path in a for clause" do
361
387
  m1 = RelationModel.create!(
362
388
  pathelement: PathRelationModel.new(
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: couchbase-orm
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen von Takach
8
8
  - Gauthier Monserand
9
9
  - Pierre Merlin
10
10
  - Julien Burnet-Fauche
11
- autorequire:
11
+ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2025-12-01 00:00:00.000000000 Z
14
+ date: 2026-06-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activemodel
@@ -210,7 +210,7 @@ dependencies:
210
210
  - !ruby/object:Gem::Version
211
211
  version: '0'
212
212
  description: A Couchbase ORM for Rails
213
- email:
213
+ email:
214
214
  executables: []
215
215
  extensions: []
216
216
  extra_rdoc_files: []
@@ -352,9 +352,9 @@ licenses:
352
352
  metadata:
353
353
  source_code_uri: https://github.com/Couchbase-Ecosystem/couchbase-ruby-orm
354
354
  bug_tracker_uri: https://github.com/Couchbase-Ecosystem/couchbase-ruby-orm/issues
355
- documentation_uri: https://couchbase-ruby-orm.com/
355
+ documentation_uri: https://www.couchbase-ruby-orm.com/
356
356
  homepage_uri: https://github.com/Couchbase-Ecosystem/couchbase-ruby-orm
357
- post_install_message:
357
+ post_install_message:
358
358
  rdoc_options: []
359
359
  require_paths:
360
360
  - lib
@@ -369,8 +369,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
369
369
  - !ruby/object:Gem::Version
370
370
  version: '0'
371
371
  requirements: []
372
- rubygems_version: 3.5.16
373
- signing_key:
372
+ rubygems_version: 3.0.3.1
373
+ signing_key:
374
374
  specification_version: 4
375
375
  summary: Couchbase ORM for Rails
376
376
  test_files: