ratatui_ruby 0.3.0 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e4a0958532fe7b493fcf0d9ee971bbc94194f5ff03fd420f895197597dac1c8
4
- data.tar.gz: 480c3a5a467d478626a12c739064f894952e23d7a4574d0ad73a21dcc7b80ff5
3
+ metadata.gz: 6c258db0dbb30641f2813c23f6212a3e6e3ee56c8aa3b56a428e67d4b97bcae1
4
+ data.tar.gz: 7dbbec9b16667b25a148bff938ea3448611689f04dae722a24600d6ebc29d9ef
5
5
  SHA512:
6
- metadata.gz: 28f9f71581859a3ddaecb62df012e942fa3617dfcac1634af88e84b676b13802d3bb0bf7443ebba96f2bc1a00f503e86b8a2e2d3d6f613864d35b7002d432dac
7
- data.tar.gz: f08716e00372054fcbee63e44ecb39e692ec2cc0b23d6e5596243b6df5c248274bf5b750b376d004644d8cf7a91993bde3e7c5dc980856befe84e0ce680de7b5
6
+ metadata.gz: 9d395bce840eb550abf6f91567c1ca1952c6b7e184749c3bd7db3188d71f97a9c876af535d71cf21606e28aa23e780f5294595b54baf1640620743d8de8ef664
7
+ data.tar.gz: 385435bf381ba2602f8e306c74cb8842416c1bb39100cd576abedf9c0cf3421c79d688a58abd1b8a1b4915caaae781288d490a02077f3fbc04a161b891583add
data/.builds/ruby-3.2.yml CHANGED
@@ -16,7 +16,7 @@ packages:
16
16
  - clang-dev
17
17
  - git
18
18
  artifacts:
19
- - ratatui_ruby/pkg/ratatui_ruby-0.3.0.gem
19
+ - ratatui_ruby/pkg/ratatui_ruby-0.3.1.gem
20
20
  sources:
21
21
  - https://git.sr.ht/~kerrick/ratatui_ruby
22
22
  tasks:
@@ -31,7 +31,7 @@ tasks:
31
31
  sed -i 's/ruby = .*/ruby = "3.2"/' mise.toml
32
32
  mise install
33
33
  mise x -- pip install reuse
34
- mise x -- gem install bundler:2.6.9
34
+ mise x -- gem install bundler:4.0.3
35
35
  mise reshim
36
36
  mise x -- bundle config set --local frozen 'true'
37
37
  mise x -- bundle install
data/.builds/ruby-3.3.yml CHANGED
@@ -16,7 +16,7 @@ packages:
16
16
  - clang-dev
17
17
  - git
18
18
  artifacts:
19
- - ratatui_ruby/pkg/ratatui_ruby-0.3.0.gem
19
+ - ratatui_ruby/pkg/ratatui_ruby-0.3.1.gem
20
20
  sources:
21
21
  - https://git.sr.ht/~kerrick/ratatui_ruby
22
22
  tasks:
@@ -31,7 +31,7 @@ tasks:
31
31
  sed -i 's/ruby = .*/ruby = "3.3"/' mise.toml
32
32
  mise install
33
33
  mise x -- pip install reuse
34
- mise x -- gem install bundler:2.6.9
34
+ mise x -- gem install bundler:4.0.3
35
35
  mise reshim
36
36
  mise x -- bundle config set --local frozen 'true'
37
37
  mise x -- bundle install
data/.builds/ruby-3.4.yml CHANGED
@@ -16,7 +16,7 @@ packages:
16
16
  - clang-dev
17
17
  - git
18
18
  artifacts:
19
- - ratatui_ruby/pkg/ratatui_ruby-0.3.0.gem
19
+ - ratatui_ruby/pkg/ratatui_ruby-0.3.1.gem
20
20
  sources:
21
21
  - https://git.sr.ht/~kerrick/ratatui_ruby
22
22
  tasks:
@@ -31,7 +31,7 @@ tasks:
31
31
  sed -i 's/ruby = .*/ruby = "3.4"/' mise.toml
32
32
  mise install
33
33
  mise x -- pip install reuse
34
- mise x -- gem install bundler:2.6.9
34
+ mise x -- gem install bundler:4.0.3
35
35
  mise reshim
36
36
  mise x -- bundle config set --local frozen 'true'
37
37
  mise x -- bundle install
@@ -16,7 +16,7 @@ packages:
16
16
  - clang-dev
17
17
  - git
18
18
  artifacts:
19
- - ratatui_ruby/pkg/ratatui_ruby-0.3.0.gem
19
+ - ratatui_ruby/pkg/ratatui_ruby-0.3.1.gem
20
20
  sources:
21
21
  - https://git.sr.ht/~kerrick/ratatui_ruby
22
22
  tasks:
@@ -31,22 +31,21 @@ tasks:
31
31
  sed -i 's/ruby = .*/ruby = "4.0.0"/' mise.toml
32
32
  mise install
33
33
  mise x -- pip install reuse
34
- mise x -- gem install bundler:2.6.9
34
+ mise x -- gem install bundler:4.0.3
35
35
  mise reshim
36
36
  mise x -- bundle config set --local frozen 'true'
37
37
  mise x -- bundle install
38
- # We allow this to fail so we can see logs without stopping the CI pipeline
39
- mise x -- bundle exec rake compile || echo "⚠️ Compilation failed (Allowed Failure)"
38
+ mise x -- bundle exec rake compile
40
39
  - test: |
41
40
  . ~/.buildenv
42
41
  cd ratatui_ruby
43
42
  echo "Testing Ruby 4.0.0"
44
- mise x -- bundle exec rake test || true
43
+ mise x -- bundle exec rake test
45
44
  - lint: |
46
45
  . ~/.buildenv
47
46
  cd ratatui_ruby
48
47
  echo "Linting Ruby 4.0.0"
49
- mise x -- bundle exec rake lint || true
48
+ mise x -- bundle exec rake lint
50
49
  - package: |
51
50
  . ~/.buildenv
52
51
  cd ratatui_ruby
data/AGENTS.md CHANGED
@@ -35,7 +35,7 @@ Every file must begin with an SPDX-compliant header. Use the following format:
35
35
 
36
36
  ### Ruby Standards
37
37
 
38
- - **Version:** Tested against the latest releases of Ruby 3.2, 3.3, and 3.4, and must work. Also tested in CI (with allowed failures) against the latest preview Ruby 4.0 to prepare for its release. Local development happens on the latest stable release.
38
+ - **Version:** Tested against the latest releases of Ruby 3.2, 3.3, 3.4, and 4.0, and must work on all of them. Local development happens on the latest stable release.
39
39
  - **Linter:** Run via `bundle exec rake lint`. You are not done until all linting passes.
40
40
  - **Style:**
41
41
  - Use `Data.define` for all value objects (UI Nodes). (Prefer `class Foo < Data.define()` over `Foo = Data.define() do`).
@@ -129,30 +129,37 @@ The project follows a standard Gem layout with an `ext/` directory for Rust code
129
129
  - Body: Detailed explanation if necessary (wrap at 72 chars). Explain why this is the implementation, as opposed to other possible implementations. Skip the body entirely if it's rote, a duplication of the diff, or otherwise unhelpful. **Do not simply list the files changed or the minor edits made to them.** Do not use markdown, except as required in AI Attribution.
130
130
  - Footer: AI attribution if generated by an agent, sourcehut ticket if implemented by a ticket, or both.
131
131
  - **AI Attribution:**
132
- - **Antigravity:**
133
- Specify the model used in the footer. Examples:
134
- ```
135
- Generated with [Antigravity](https://antigravity.google)
136
-
137
- Co-Authored-By: Gemini 3 Pro (High) <noreply@google.com>
138
- ```
139
- ```
140
- Generated with [Antigravity](https://antigravity.google)
141
-
142
- Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
143
- ```
144
- - **Gemini 3:**
145
- ```
146
- Generated with [Gemini 3 Pro](https://gemini.google.com/)
147
-
148
- Co-Authored-By: Gemini 3 Pro <noreply@google.com>
149
- ```
150
- - **JetBrains Junie:**
151
- ```
152
- Generated with [JetBrains Junie](https://www.jetbrains.com/ai/)
153
-
154
- Co-Authored-By: Junie <junie@jetbrains.com>
155
- ```
132
+ - **Always include AI attribution** in the footer if the commit was generated or significantly assisted by an AI agent. This is mandatory for transparency and compliance.
133
+ - **Amp:**
134
+ ```
135
+ Generated with [Amp](https://ampcode.com)
136
+
137
+ Co-Authored-By: Amp <noreply@ampcode.com>
138
+ ```
139
+ - **Antigravity:**
140
+ Specify the model used in the footer. Examples:
141
+ ```
142
+ Generated with [Antigravity](https://antigravity.google)
143
+
144
+ Co-Authored-By: Gemini 3 Pro (High) <noreply@google.com>
145
+ ```
146
+ ```
147
+ Generated with [Antigravity](https://antigravity.google)
148
+
149
+ Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
150
+ ```
151
+ - **Gemini 3:**
152
+ ```
153
+ Generated with [Gemini 3 Pro](https://gemini.google.com/)
154
+
155
+ Co-Authored-By: Gemini 3 Pro <noreply@google.com>
156
+ ```
157
+ - **JetBrains Junie:**
158
+ ```
159
+ Generated with [JetBrains Junie](https://www.jetbrains.com/ai/)
160
+
161
+ Co-Authored-By: Junie <junie@jetbrains.com>
162
+ ```
156
163
  - **Sourcehut Tickets:**
157
164
  - If the commit implements a specific ticket, include a footer: `Implements: https://todo.sr.ht/~kerrick/ratatui_ruby/<id>`
158
165
  - This must be the **last** item in the footer, if present.
data/CHANGELOG.md CHANGED
@@ -18,6 +18,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
18
18
 
19
19
  ### Removed
20
20
 
21
+ ## [0.3.1] - 2025-12-28
22
+
23
+ ### Added
24
+
25
+ - **Ruby 4 Support**: Updated magnus FFI bindings to use the modern API for Ruby 4.0.0 compatibility.
26
+
21
27
  ## [0.3.0] - 2025-12-28
22
28
 
23
29
  ### Added
@@ -59,7 +65,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
59
65
  - **Input Handling**: Robust handling for both Keyboard and Mouse events.
60
66
  - **Testing Support**: Included `RatatuiRuby::TestHelper` and RSpec integration to make testing your TUI applications possible.
61
67
 
62
- [Unreleased]: https://git.sr.ht/~kerrick/ratatui_ruby/compare/v0.3.0...HEAD
68
+ [Unreleased]: https://git.sr.ht/~kerrick/ratatui_ruby/compare/v0.3.1...HEAD
69
+ [0.3.1]: https://git.sr.ht/~kerrick/ratatui_ruby/compare/v0.3.0...v0.3.1
63
70
  [0.3.0]: https://git.sr.ht/~kerrick/ratatui_ruby/compare/v0.2.0...v0.3.0
64
71
  [0.2.0]: https://git.sr.ht/~kerrick/ratatui_ruby/compare/v0.1.0...v0.2.0
65
72
  [0.1.0]: https://git.sr.ht/~kerrick/ratatui_ruby/tree/v0.1.0
data/README.md CHANGED
@@ -34,8 +34,8 @@ Please join the **announce** mailing list at https://lists.sr.ht/~kerrick/ratatu
34
34
  - x86_64 (AMD, Intel) and ARM (Apple Silicon, Raspberry Pi).
35
35
 
36
36
  We support the latest minor version of every
37
- [non-eol Ruby version](https://www.ruby-lang.org/en/downloads/branches/).
38
- Support for Ruby 4 is coming soon.
37
+ [non-eol Ruby version](https://www.ruby-lang.org/en/downloads/branches/),
38
+ including Ruby 4.
39
39
 
40
40
 
41
41
  ## Installation
data/REUSE.toml CHANGED
@@ -1,10 +1,5 @@
1
1
  version = 1
2
2
 
3
- [[annotations]]
4
- path = '.ruby-version'
5
- SPDX-FileCopyrightText = "2025 Kerrick Long <me@kerricklong.com>"
6
- SPDX-License-Identifier = "CC0-1.0"
7
-
8
3
  [[annotations]]
9
4
  path = 'Gemfile.lock'
10
5
  SPDX-FileCopyrightText = "2025 Kerrick Long <me@kerricklong.com>"
@@ -483,7 +483,7 @@ dependencies = [
483
483
 
484
484
  [[package]]
485
485
  name = "ratatui_ruby"
486
- version = "0.3.0"
486
+ version = "0.3.1"
487
487
  dependencies = [
488
488
  "lazy_static",
489
489
  "magnus",
@@ -3,7 +3,7 @@
3
3
 
4
4
  [package]
5
5
  name = "ratatui_ruby"
6
- version = "0.3.0"
6
+ version = "0.3.1"
7
7
  edition = "2021"
8
8
 
9
9
  [lib]
@@ -9,13 +9,14 @@ use ratatui::{layout::Rect, Frame};
9
9
  pub fn render_node(frame: &mut Frame, area: Rect, node: Value) -> Result<(), Error> {
10
10
  if node.respond_to("render", true)? {
11
11
  let wrapper = BufferWrapper::new(frame.buffer_mut());
12
+ let ruby = magnus::Ruby::get().unwrap();
12
13
  let ruby_area = {
13
- let ruby = magnus::Ruby::get().unwrap();
14
14
  let module = ruby.define_module("RatatuiRuby")?;
15
15
  let class = module.const_get::<_, magnus::RClass>("Rect")?;
16
16
  class.funcall::<_, _, Value>("new", (area.x, area.y, area.width, area.height))?
17
17
  };
18
- node.funcall::<_, _, Value>("render", (ruby_area, wrapper))?;
18
+ let wrapper_obj = ruby.obj_wrap(wrapper);
19
+ node.funcall::<_, _, Value>("render", (ruby_area, wrapper_obj))?;
19
20
  return Ok(());
20
21
  }
21
22
 
@@ -6,5 +6,5 @@
6
6
  module RatatuiRuby
7
7
  # The version of the ratatui_ruby gem.
8
8
  # See https://semver.org/spec/v2.0.0.html
9
- VERSION = "0.3.0"
9
+ VERSION = "0.3.1"
10
10
  end
data/mise.toml CHANGED
@@ -2,7 +2,7 @@
2
2
  # SPDX-License-Identifier: AGPL-3.0-or-later
3
3
 
4
4
  [tools]
5
- ruby = "3.4.8"
5
+ ruby = "4.0.0"
6
6
  rust = "1.91.1"
7
7
  python = "3.12"
8
8
  pre-commit = "latest"
@@ -35,30 +35,17 @@ tasks:
35
35
  mise reshim
36
36
  mise x -- bundle config set --local frozen 'true'
37
37
  mise x -- bundle install
38
- <% if ruby_version.start_with?("4.0") -%>
39
- # We allow this to fail so we can see logs without stopping the CI pipeline
40
- mise x -- bundle exec rake compile || echo "⚠️ Compilation failed (Allowed Failure)"
41
- <% else -%>
42
38
  mise x -- bundle exec rake compile
43
- <% end -%>
44
39
  - test: |
45
40
  . ~/.buildenv
46
41
  cd ratatui_ruby
47
42
  echo "Testing Ruby <%= ruby_version %>"
48
- <% if ruby_version.start_with?("4.0") -%>
49
- mise x -- bundle exec rake test || true
50
- <% else -%>
51
43
  mise x -- bundle exec rake test
52
- <% end -%>
53
44
  - lint: |
54
45
  . ~/.buildenv
55
46
  cd ratatui_ruby
56
47
  echo "Linting Ruby <%= ruby_version %>"
57
- <% if ruby_version.start_with?("4.0") -%>
58
- mise x -- bundle exec rake lint || true
59
- <% else -%>
60
48
  mise x -- bundle exec rake lint
61
- <% end -%>
62
49
  - package: |
63
50
  . ~/.buildenv
64
51
  cd ratatui_ruby
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ratatui_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kerrick Long
@@ -281,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
281
281
  - !ruby/object:Gem::Version
282
282
  version: '0'
283
283
  requirements: []
284
- rubygems_version: 3.6.9
284
+ rubygems_version: 4.0.3
285
285
  specification_version: 4
286
286
  summary: "\U0001F48E Unofficial Ruby wrapper for the Ratatui \U0001F468‍\U0001F373\U0001F400."
287
287
  test_files: []