@smbcloud / cli / commits / f26c254

Update smbcloud-model gem to version 0.3.31 and improve publish docs

Expanded publishing instructions in docs/gems.md for clarity. Synced Cargo.lock, Gemfile.lock, and version.rb to smbcloud-model 0.3.31. Signed-off-by: Seto <setoelkahfi@gmail.com>

Seto committed Mar 23, 2026 at 21:12 UTC f26c254cbdf4307d1cba360bfb2299a14f52c835
4 files changed +78 -12
docs/gems.md
+73 -9
@@ -1,12 +1,76 @@
1 -# Publish gem
1 +# Publishing the `smbcloud-model` gem
2
3 -To publish the gem with native extension, there are multiple steps to do.
3 +The gem wraps the `smbcloud-model` Rust crate via a native extension. Publishing requires coordinating the Rust crate release and the gem release in order.
4
5 -## Build the gem
5 +## Prerequisites
6
7 -- Make sure to publish the cli first since it will publish the `smbcloud-model` crate as well, which the gem depends on.
8 -- Update the Cargo dependency in `gems/model/ext/model/Cargo.toml`.
9 -- Build the gem: `bundle exec rake compile`.
10 -- Update the gem version in the `gem/model/lib/model/version.rb`. Just use the same version as the `smbcloud-model` crate.
11 -- Compile or build the gem directly: `bundle exec rake compile` or ` bundle exec rake buid`.
12 -- Then publish the gem: `gem push pkg/smbcloud-model-{version}.gem`.
7 +- [Rust toolchain](https://rustup.rs) installed
8 +- `bundler` and `gem` CLI available
9 +- RubyGems account with push access to `smbcloud-model`
10 +
11 +---
12 +
13 +## Steps
14 +
15 +### 1. Publish the Rust crate
16 +
17 +Publish `smbcloud-model` to crates.io first. The gem's native extension depends on it.
18 +
19 +```sh
20 +cargo publish -p smbcloud-model
21 +```
22 +
23 +### 2. Update the Cargo dependency
24 +
25 +Switch `gems/model/ext/model/Cargo.toml` from the local path to the published version:
26 +
27 +```toml
28 +# Before (development)
29 +smbcloud-model = { path = "./../../../../crates/smbcloud-model" }
30 +
31 +# After (release) — match the version just published
32 +smbcloud-model = "0.3"
33 +```
34 +
35 +### 3. Sync the gem version
36 +
37 +Set `gems/model/lib/model/version.rb` to match the `smbcloud-model` crate version:
38 +
39 +```ruby
40 +module Model
41 + VERSION = '0.3.31'
42 +end
43 +```
44 +
45 +### 4. Compile the native extension
46 +
47 +```sh
48 +cd gems/model
49 +bundle exec rake compile
50 +```
51 +
52 +### 5. Build the gem
53 +
54 +```sh
55 +bundle exec rake build
56 +```
57 +
58 +This produces `pkg/smbcloud-model-<version>.gem`.
59 +
60 +### 6. Publish the gem
61 +
62 +```sh
63 +gem push pkg/smbcloud-model-<version>.gem
64 +```
65 +
66 +---
67 +
68 +## Development workflow
69 +
70 +To work against the local crate instead of the published one, use the path dependency:
71 +
72 +```toml
73 +smbcloud-model = { path = "./../../../../crates/smbcloud-model" }
74 +```
75 +
76 +Remember to revert this before publishing.
gems/model/Cargo.lock
+3 -1
@@ -634,7 +634,9 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
634
635 [[package]]
636 name = "smbcloud-model"
637 -version = "0.3.27"
637 +version = "0.3.31"
638 +source = "registry+https://github.com/rust-lang/crates.io-index"
639 +checksum = "f7c3a98cf1cf811f62668298ef53d9b3f41b93e22064f7c5178f11187d3797a1"
640 dependencies = [
641 "chrono",
642 "log",
gems/model/Gemfile.lock
+1 -1
@@ -1,7 +1,7 @@
1 PATH
2 remote: .
3 specs:
4 - smbcloud-model (0.3.27)
4 + smbcloud-model (0.3.31)
5 rb_sys (~> 0.9.91)
6
7 GEM
gems/model/lib/model/version.rb
+1 -1
@@ -1,5 +1,5 @@
1 # frozen_string_literal: true
2
3 module Model
4 - VERSION = '0.3.27'
4 + VERSION = '0.3.31'
5 end