couchbase-orm 2.0.6 → 3.0.1
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 +4 -4
- data/RELEASE.md +80 -0
- data/lib/couchbase-orm/base.rb +1 -2
- data/lib/couchbase-orm/changeable.rb +0 -1
- data/lib/couchbase-orm/types/timestamp.rb +4 -4
- data/lib/couchbase-orm/utilities/query_helper.rb +1 -1
- data/lib/couchbase-orm/version.rb +1 -1
- data/spec/type_nested_spec.rb +8 -1
- data/spec/type_spec.rb +5 -0
- metadata +8 -4
- data/CODEOWNERS +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d788fea6a41e9b49ebfeebb3461e5fc732f367778fd7a1346698c67527c235fa
|
|
4
|
+
data.tar.gz: 3970305c914cc190e5d3d900846808f84af4d5963f7cd9ad43a33a29ea9805fa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c72b2140fa1d197630dccc977243e8bcd5d6d903f666bd872afb74e2bdbd807fb45075ff8702b43fb71aec0899b2b44758ce72f4e2da5dbf8c25ad8f3fbb0294
|
|
7
|
+
data.tar.gz: 721421d62ac89010703e4a4c1db16622cbca32fbc79b9cd91f4774037759311c27ec3248372fdeee1e12f6e99368eb553d0fa87b09821831702689409c58bba1
|
data/RELEASE.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Release Process
|
|
2
|
+
|
|
3
|
+
This document describes the process for releasing a new version of couchbase-orm.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- Write access to the repository
|
|
8
|
+
- RubyGems account with push permissions for the gem
|
|
9
|
+
- Clean local master branch
|
|
10
|
+
|
|
11
|
+
## Release Steps
|
|
12
|
+
|
|
13
|
+
### 1. Update Version
|
|
14
|
+
|
|
15
|
+
Edit `lib/couchbase-orm/version.rb` with the new version number:
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
# frozen_string_literal: true, encoding: ASCII-8BIT
|
|
19
|
+
|
|
20
|
+
module CouchbaseOrm
|
|
21
|
+
VERSION = 'X.Y.Z'
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
Commit the change:
|
|
25
|
+
|
|
26
|
+
git add lib/couchbase-orm/version.rb
|
|
27
|
+
git commit -m "Bump version to X.Y.Z"
|
|
28
|
+
git push origin master
|
|
29
|
+
|
|
30
|
+
2. Create Git Tag
|
|
31
|
+
|
|
32
|
+
Tag the release on master:
|
|
33
|
+
|
|
34
|
+
git tag X.Y.Z
|
|
35
|
+
git push origin X.Y.Z
|
|
36
|
+
|
|
37
|
+
3. Verify Clean State
|
|
38
|
+
|
|
39
|
+
Ensure your local master branch is clean and up-to-date:
|
|
40
|
+
|
|
41
|
+
git checkout master
|
|
42
|
+
git pull
|
|
43
|
+
git status # Should show "nothing to commit, working tree clean"
|
|
44
|
+
|
|
45
|
+
4. Build the Gem
|
|
46
|
+
|
|
47
|
+
Build the gem locally:
|
|
48
|
+
|
|
49
|
+
gem build couchbase-orm.gemspec
|
|
50
|
+
|
|
51
|
+
This will create a file like couchbase-orm-X.Y.Z.gem.
|
|
52
|
+
|
|
53
|
+
5. Push to RubyGems
|
|
54
|
+
|
|
55
|
+
Push the built gem to RubyGems (you'll need your OTP code):
|
|
56
|
+
|
|
57
|
+
gem push couchbase-orm-X.Y.Z.gem --otp YOUR_OTP_CODE
|
|
58
|
+
|
|
59
|
+
Note: Replace YOUR_OTP_CODE with your actual one-time password from your authenticator app.
|
|
60
|
+
|
|
61
|
+
6. Verify Release
|
|
62
|
+
|
|
63
|
+
Check that the new version appears on the gem page:
|
|
64
|
+
|
|
65
|
+
https://rubygems.org/gems/couchbase-orm
|
|
66
|
+
|
|
67
|
+
Post-Release
|
|
68
|
+
|
|
69
|
+
- Announce the release if applicable (changelog, team communication, etc.)
|
|
70
|
+
- Update any documentation that references the version number
|
|
71
|
+
|
|
72
|
+
Version Numbering
|
|
73
|
+
|
|
74
|
+
This project follows https://semver.org/:
|
|
75
|
+
|
|
76
|
+
- MAJOR version for incompatible API changes
|
|
77
|
+
- MINOR version for backwards-compatible functionality additions
|
|
78
|
+
- PATCH version for backwards-compatible bug fixes
|
|
79
|
+
|
|
80
|
+
|
data/lib/couchbase-orm/base.rb
CHANGED
|
@@ -33,8 +33,7 @@ module CouchbaseOrm
|
|
|
33
33
|
class Document
|
|
34
34
|
include Inspectable
|
|
35
35
|
include ::ActiveModel::Model
|
|
36
|
-
include
|
|
37
|
-
include Changeable # override some methods from ActiveModel::Dirty (keep it included after)
|
|
36
|
+
include Changeable
|
|
38
37
|
include ::ActiveModel::Attributes
|
|
39
38
|
include ::ActiveModel::Serializers::JSON
|
|
40
39
|
|
|
@@ -3,10 +3,10 @@ module CouchbaseOrm
|
|
|
3
3
|
class Timestamp < ActiveModel::Type::DateTime
|
|
4
4
|
def cast(value)
|
|
5
5
|
return nil if value.nil?
|
|
6
|
-
return Time.at(value) if value.is_a?(Integer) || value.is_a?(Float)
|
|
7
|
-
return Time.at(value.to_i) if value.is_a?(String) && value =~ /^[0-9]+$/
|
|
8
|
-
return value.utc if value.is_a?(Time)
|
|
9
|
-
super(value).utc
|
|
6
|
+
return Time.at(value).floor if value.is_a?(Integer) || value.is_a?(Float)
|
|
7
|
+
return Time.at(value.to_i).floor if value.is_a?(String) && value =~ /^[0-9]+$/
|
|
8
|
+
return value.utc.floor if value.is_a?(Time)
|
|
9
|
+
super(value).utc.floor
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def serialize(value)
|
|
@@ -117,7 +117,7 @@ module CouchbaseOrm
|
|
|
117
117
|
end
|
|
118
118
|
|
|
119
119
|
def serialize_value(key, value_before_type_cast)
|
|
120
|
-
value =
|
|
120
|
+
value =
|
|
121
121
|
if value_before_type_cast.is_a?(Array)
|
|
122
122
|
value_before_type_cast.map do |v|
|
|
123
123
|
attribute_types[key.to_s].serialize(attribute_types[key.to_s].cast(v))
|
data/spec/type_nested_spec.rb
CHANGED
|
@@ -42,6 +42,12 @@ describe CouchbaseOrm::Types::Nested do
|
|
|
42
42
|
obj.others[1].child = SubTypeTest.new(name: "baz")
|
|
43
43
|
obj.save!
|
|
44
44
|
|
|
45
|
+
expect(obj.others[0].name).to eq "foo"
|
|
46
|
+
expect(obj.others[0].tags).to eq ["foo", "bar"]
|
|
47
|
+
expect(obj.others[1].name).to eq "bar"
|
|
48
|
+
expect(obj.others[1].tags).to eq ["bar", "baz"]
|
|
49
|
+
expect(obj.others[1].child.name).to eq "baz"
|
|
50
|
+
|
|
45
51
|
obj = TypeNestedTest.find(obj.id)
|
|
46
52
|
expect(obj.others[0].name).to eq "foo"
|
|
47
53
|
expect(obj.others[0].tags).to eq ["foo", "bar"]
|
|
@@ -116,7 +122,8 @@ describe CouchbaseOrm::Types::Nested do
|
|
|
116
122
|
obj.others[1].name = "baz"
|
|
117
123
|
obj.flags[0] = true
|
|
118
124
|
|
|
119
|
-
obj.save!
|
|
125
|
+
expect { obj.save! }.to_not change { [obj.main.name, obj.others[0].name, obj.others[1].name, obj.flags] }
|
|
126
|
+
|
|
120
127
|
obj = TypeNestedTest.find(obj.id)
|
|
121
128
|
expect(obj.main.name).to eq "bar"
|
|
122
129
|
expect(obj.others[0].name).to eq "bar"
|
data/spec/type_spec.rb
CHANGED
metadata
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: couchbase-orm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 3.0.1
|
|
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
12
|
bindir: bin
|
|
12
13
|
cert_chain: []
|
|
13
|
-
date:
|
|
14
|
+
date: 2025-12-01 00:00:00.000000000 Z
|
|
14
15
|
dependencies:
|
|
15
16
|
- !ruby/object:Gem::Dependency
|
|
16
17
|
name: activemodel
|
|
@@ -209,6 +210,7 @@ dependencies:
|
|
|
209
210
|
- !ruby/object:Gem::Version
|
|
210
211
|
version: '0'
|
|
211
212
|
description: A Couchbase ORM for Rails
|
|
213
|
+
email:
|
|
212
214
|
executables: []
|
|
213
215
|
extensions: []
|
|
214
216
|
extra_rdoc_files: []
|
|
@@ -218,10 +220,10 @@ files:
|
|
|
218
220
|
- ".gitignore"
|
|
219
221
|
- ".rspec"
|
|
220
222
|
- ".travis.yml"
|
|
221
|
-
- CODEOWNERS
|
|
222
223
|
- Gemfile
|
|
223
224
|
- LICENSE
|
|
224
225
|
- README.md
|
|
226
|
+
- RELEASE.md
|
|
225
227
|
- Rakefile
|
|
226
228
|
- ci/run_couchbase.sh
|
|
227
229
|
- couchbase-orm.gemspec
|
|
@@ -352,6 +354,7 @@ metadata:
|
|
|
352
354
|
bug_tracker_uri: https://github.com/Couchbase-Ecosystem/couchbase-ruby-orm/issues
|
|
353
355
|
documentation_uri: https://couchbase-ruby-orm.com/
|
|
354
356
|
homepage_uri: https://github.com/Couchbase-Ecosystem/couchbase-ruby-orm
|
|
357
|
+
post_install_message:
|
|
355
358
|
rdoc_options: []
|
|
356
359
|
require_paths:
|
|
357
360
|
- lib
|
|
@@ -366,7 +369,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
366
369
|
- !ruby/object:Gem::Version
|
|
367
370
|
version: '0'
|
|
368
371
|
requirements: []
|
|
369
|
-
rubygems_version: 3.
|
|
372
|
+
rubygems_version: 3.5.16
|
|
373
|
+
signing_key:
|
|
370
374
|
specification_version: 4
|
|
371
375
|
summary: Couchbase ORM for Rails
|
|
372
376
|
test_files:
|
data/CODEOWNERS
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
* @doctolib/couchbase-guild
|