Skip to content

Commit 3165592

Browse files
committed
Add Ruby 4.0 to CI
1 parent f3a07c8 commit 3165592

12 files changed

Lines changed: 56 additions & 56 deletions

File tree

.github/workflows/build-gems.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ jobs:
8484
- name: Setup Ruby
8585
uses: ruby/setup-ruby@v1
8686
with:
87-
ruby-version: "3.4"
88-
bundler-cache: false
87+
bundler-cache: true
8988

9089
- name: Download gem artifacts
9190
uses: actions/download-artifact@v4

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
- '3.2'
1818
- '3.3'
1919
- '3.4'
20+
- '4.0'
2021

2122
steps:
2223
- name: Checkout
@@ -41,7 +42,7 @@ jobs:
4142
run: bundle exec rake compile
4243

4344
- name: Run tests
44-
run: bundle exec mtest
45+
run: bundle exec rake test
4546

4647
- name: Run steep check
4748
run: bundle exec steep check

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.4.7
1+
4.0.0

Gemfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ source "https://rubygems.org"
55
gemspec
66

77
gem "irb"
8-
gem "maxitest"
9-
gem "minitest", "~> 5.16"
8+
gem "maxitest", github: "marcoroth/maxitest"
109
gem "rake", "~> 13.0"
11-
gem "rake-compiler", "~> 1.2"
12-
gem "rake-compiler-dock", "~> 1.5"
10+
gem "rake-compiler", "~> 1.3"
11+
gem "rake-compiler-dock", "~> 1.11"
1312
gem "rbs-inline", "~> 0.12"
14-
gem "rubocop", "~> 1.21"
13+
gem "rubocop"
1514
gem "steep", "~> 1.10"

Gemfile.lock

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
GIT
2+
remote: https://github.com/marcoroth/maxitest.git
3+
revision: 359ea6ce0b1a2c5adbba55d275eef8e6a4a73e81
4+
specs:
5+
maxitest (6.1.0)
6+
minitest (>= 6.0.0, < 6.1.0)
7+
18
PATH
29
remote: .
310
specs:
@@ -21,33 +28,31 @@ GEM
2128
uri (>= 0.13.1)
2229
ast (2.4.3)
2330
base64 (0.3.0)
24-
bigdecimal (3.3.1)
25-
concurrent-ruby (1.3.5)
31+
bigdecimal (4.0.1)
32+
concurrent-ruby (1.3.6)
2633
connection_pool (3.0.2)
2734
csv (3.3.5)
2835
date (3.5.1)
2936
drb (2.2.3)
30-
erb (6.0.0)
31-
ffi (1.17.2-arm64-darwin)
32-
ffi (1.17.2-x86_64-linux-gnu)
37+
erb (6.0.1)
38+
ffi (1.17.2)
3339
fileutils (1.8.0)
34-
i18n (1.14.7)
40+
i18n (1.14.8)
3541
concurrent-ruby (~> 1.0)
36-
io-console (0.8.1)
37-
irb (1.15.3)
42+
io-console (0.8.2)
43+
irb (1.16.0)
3844
pp (>= 0.6.0)
3945
rdoc (>= 4.0.0)
4046
reline (>= 0.4.2)
41-
json (2.17.1)
47+
json (2.18.0)
4248
language_server-protocol (3.17.0.5)
4349
lint_roller (1.1.0)
4450
listen (3.9.0)
4551
rb-fsevent (~> 0.10, >= 0.10.3)
4652
rb-inotify (~> 0.9, >= 0.9.10)
4753
logger (1.7.0)
48-
maxitest (6.0.1)
49-
minitest (>= 5.20.0, < 5.26.0)
50-
minitest (5.25.5)
54+
minitest (6.0.0)
55+
prism (~> 1.5)
5156
mutex_m (0.3.0)
5257
parallel (1.27.0)
5358
parser (3.3.10.0)
@@ -56,40 +61,40 @@ GEM
5661
pp (0.6.3)
5762
prettyprint
5863
prettyprint (0.2.0)
59-
prism (1.6.0)
60-
psych (5.3.0)
64+
prism (1.7.0)
65+
psych (5.3.1)
6166
date
6267
stringio
6368
racc (1.8.1)
6469
rainbow (3.1.1)
6570
rake (13.3.1)
66-
rake-compiler (1.3.0)
71+
rake-compiler (1.3.1)
6772
rake
68-
rake-compiler-dock (1.10.0)
73+
rake-compiler-dock (1.11.0)
6974
rb-fsevent (0.11.2)
7075
rb-inotify (0.11.1)
7176
ffi (~> 1.0)
72-
rbs (3.9.5)
77+
rbs (3.10.0)
7378
logger
7479
rbs-inline (0.12.0)
7580
prism (>= 0.29)
7681
rbs (>= 3.8.0)
77-
rdoc (6.17.0)
82+
rdoc (7.0.3)
7883
erb
7984
psych (>= 4.0.0)
8085
tsort
8186
regexp_parser (2.11.3)
8287
reline (0.6.3)
8388
io-console (~> 0.5)
84-
rubocop (1.81.7)
89+
rubocop (1.82.1)
8590
json (~> 2.3)
8691
language_server-protocol (~> 3.17.0.2)
8792
lint_roller (~> 1.1.0)
8893
parallel (~> 1.10)
8994
parser (>= 3.3.0.2)
9095
rainbow (>= 2.2.2, < 4.0)
9196
regexp_parser (>= 2.9.3, < 3.0)
92-
rubocop-ast (>= 1.47.1, < 2.0)
97+
rubocop-ast (>= 1.48.0, < 2.0)
9398
ruby-progressbar (~> 1.7)
9499
unicode-display_width (>= 2.4.0, < 4.0)
95100
rubocop-ast (1.48.0)
@@ -114,32 +119,32 @@ GEM
114119
strscan (>= 1.0.0)
115120
terminal-table (>= 2, < 5)
116121
uri (>= 0.12.0)
117-
stringio (3.1.9)
118-
strscan (3.1.5)
122+
stringio (3.2.0)
123+
strscan (3.1.6)
119124
terminal-table (4.0.0)
120125
unicode-display_width (>= 1.1.1, < 4)
121126
tsort (0.2.0)
122127
tzinfo (2.0.6)
123128
concurrent-ruby (~> 1.0)
124129
unicode-display_width (3.2.0)
125130
unicode-emoji (~> 4.1)
126-
unicode-emoji (4.1.0)
131+
unicode-emoji (4.2.0)
127132
uri (1.1.1)
128133

129134
PLATFORMS
130-
arm64-darwin-24
135+
arm64-darwin
136+
ruby
131137
x86_64-linux
132138

133139
DEPENDENCIES
134140
glamour!
135141
irb
136-
maxitest
137-
minitest (~> 5.16)
142+
maxitest!
138143
rake (~> 13.0)
139-
rake-compiler (~> 1.2)
140-
rake-compiler-dock (~> 1.5)
144+
rake-compiler (~> 1.3)
145+
rake-compiler-dock (~> 1.11)
141146
rbs-inline (~> 0.12)
142-
rubocop (~> 1.21)
147+
rubocop
143148
steep (~> 1.10)
144149

145150
BUNDLED WITH

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<div align="center">
2-
<h1>Glamour</h1>
3-
<h4>Stylesheet-based Markdown Rendering for Ruby CLI Apps</h4>
2+
<h1>Glamour for Ruby</h1>
3+
<h4>Stylesheet-based markdown rendering for your CLI apps.</h4>
44

55
<p>
66
<a href="https://rubygems.org/gems/glamour"><img alt="Gem Version" src="https://img.shields.io/gem/v/glamour"></a>
77
<a href="https://github.com/marcoroth/glamour-ruby/blob/main/LICENSE.txt"><img alt="License" src="https://img.shields.io/github/license/marcoroth/glamour-ruby"></a>
88
</p>
99

10-
<p>Ruby bindings for <a href="https://github.com/charmbracelet/glamour">charmbracelet/glamour</a>.<br/>Render markdown documents with beautiful styling on ANSI-compatible terminals.</p>
10+
<p>Ruby bindings for <a href="https://github.com/charmbracelet/glamour">charmbracelet/glamour</a>.<br/>Render markdown documents & templates on ANSI compatible terminals.</p>
1111
</div>
1212

1313
## Installation

ext/glamour/extension.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static VALUE glamour_upstream_version_rb(VALUE self) {
171171
static VALUE glamour_version_rb(VALUE self) {
172172
VALUE gem_version = rb_const_get(self, rb_intern("VERSION"));
173173
VALUE upstream_version = glamour_upstream_version_rb(self);
174-
VALUE format_string = rb_utf8_str_new_cstr("glamour v%s (upstream v%s) [Go native extension]");
174+
VALUE format_string = rb_utf8_str_new_cstr("glamour v%s (upstream %s) [Go native extension]");
175175

176176
return rb_funcall(rb_mKernel, rb_intern("sprintf"), 3, format_string, gem_version, upstream_version);
177177
}

glamour.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
88
spec.authors = ["Marco Roth"]
99
spec.email = ["marco.roth@intergga.ch"]
1010

11-
spec.summary = "Ruby wrapper for Charm's glamour stylesheet-based markdown rendering for Ruby CLI apps."
12-
spec.description = spec.summary
11+
spec.summary = "Ruby wrapper for Charm's glamour. Stylesheet-based markdown rendering for your CLI apps."
12+
spec.description = "Glamour lets you render markdown documents & templates on ANSI compatible terminals."
1313
spec.homepage = "https://github.com/marcoroth/glamour-ruby"
1414
spec.license = "MIT"
1515
spec.required_ruby_version = ">= 3.2.0"

lib/glamour.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ class << self
1616
# @rbs style: String | singleton(Glamour::Style) -- style name or Style subclass
1717
# @rbs width: Integer -- optional word wrap width
1818
# @rbs return: String -- rendered output with ANSI escape codes
19-
def render(markdown, style: "auto", width: 0, **)
19+
def render(markdown, style: "auto", width: 0, **options)
2020
if style_class?(style)
21-
render_with_style_class(markdown, style, width: width, **)
21+
render_with_style_class(markdown, style, width: width, **options)
2222
else
23-
render_native(markdown, style: style, width: width, **)
23+
render_native(markdown, style: style, width: width, **options)
2424
end
2525
end
2626

lib/glamour/style.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def to_json(*_args)
3333
# @rbs markdown: String -- the markdown content to render
3434
# @rbs width: Integer -- optional word wrap width
3535
# @rbs return: String -- rendered output with ANSI escape codes
36-
def render(markdown, width: 0, **)
37-
Glamour.render(markdown, style: self, width: width, **)
36+
def render(markdown, width: 0, **options)
37+
Glamour.render(markdown, style: self, width: width, **options)
3838
end
3939

4040
# @rbs return: true

0 commit comments

Comments
 (0)