glamour 0.1.0-x86_64-darwin → 0.2.1-x86_64-darwin

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: 5eb7e0cef96dad0e58eb2f405db9e9f0ccc137a7cba5a243f4d0ca48b3ba973f
4
- data.tar.gz: 16f72f8a7058b5a047b3057469bf9203339df05c93b14dce43540e86cf69046a
3
+ metadata.gz: '096800484d98b71c3bd0bf703c7f52253ef7495e2e89eb39283adb1c05ddf09a'
4
+ data.tar.gz: 6bdabc770c517e3d64cd7b9b603307f24ef2e9723e26d4ed0635e046aa4a22dd
5
5
  SHA512:
6
- metadata.gz: bf2a0d7c95fa9fc767c8ff1b2fc3294ed9a2dfbc5b8911da313958a0fee74bbcf6be58afec0a4d80d285e46d148d29fa73707ed640132b3c4e5e1909ac6426e4
7
- data.tar.gz: 98fc346e6a135ecd360cfc1b49ef65bf6be62c45763b884d9e570f2515219190a51309f26851ba702828f6155c7ced8212cf1879b867df7c6b2fd0bea165421e
6
+ metadata.gz: 396d3e045344938058067630759b67df646b3b5b2e67a2924e567a5a9254f7daa999d25a3463b17ef4bf55431ea9b233c9e3a827f217da128387103159a3e316
7
+ data.tar.gz: b6c53efb08ead4d8dd0ccb6cfc0c665411dc6fac42c2e499f64f2437231dbe069c382a67dc471391deba01209015ea4597acd49005963e958853153c088d1f04
data/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  <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>
4
4
 
5
5
  <p>
6
6
  <a href="https://rubygems.org/gems/glamour"><img alt="Gem Version" src="https://img.shields.io/gem/v/glamour"></a>
7
7
  <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>
8
8
  </p>
9
9
 
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>
11
11
  </div>
12
12
 
13
13
  ## Installation
@@ -171,7 +171,7 @@ static VALUE glamour_upstream_version_rb(VALUE self) {
171
171
  static VALUE glamour_version_rb(VALUE self) {
172
172
  VALUE gem_version = rb_const_get(self, rb_intern("VERSION"));
173
173
  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]");
175
175
 
176
176
  return rb_funcall(rb_mKernel, rb_intern("sprintf"), 3, format_string, gem_version, upstream_version);
177
177
  }
data/glamour.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["Marco Roth"]
9
9
  spec.email = ["marco.roth@intergga.ch"]
10
10
 
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."
13
13
  spec.homepage = "https://github.com/marcoroth/glamour-ruby"
14
14
  spec.license = "MIT"
15
15
  spec.required_ruby_version = ">= 3.2.0"
Binary file
Binary file
Binary file
Binary file
Binary file
data/lib/glamour/style.rb CHANGED
@@ -33,8 +33,8 @@ module Glamour
33
33
  # @rbs markdown: String -- the markdown content to render
34
34
  # @rbs width: Integer -- optional word wrap width
35
35
  # @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)
38
38
  end
39
39
 
40
40
  # @rbs return: true
@@ -3,6 +3,5 @@
3
3
  # rbs_inline: enabled
4
4
 
5
5
  module Glamour
6
- # @rbs const VERSION: String
7
- VERSION = "0.1.0"
6
+ VERSION = "0.2.1" #: String
8
7
  end
data/lib/glamour.rb CHANGED
@@ -3,8 +3,16 @@
3
3
  # rbs_inline: enabled
4
4
 
5
5
  require "json"
6
+
6
7
  require_relative "glamour/version"
7
- require_relative "glamour/glamour"
8
+
9
+ begin
10
+ major, minor, _patch = RUBY_VERSION.split(".") #: [String, String, String]
11
+ require_relative "glamour/#{major}.#{minor}/glamour"
12
+ rescue LoadError
13
+ require_relative "glamour/glamour"
14
+ end
15
+
8
16
  require_relative "glamour/renderer"
9
17
  require_relative "glamour/style"
10
18
 
@@ -16,11 +24,11 @@ module Glamour
16
24
  # @rbs style: String | singleton(Glamour::Style) -- style name or Style subclass
17
25
  # @rbs width: Integer -- optional word wrap width
18
26
  # @rbs return: String -- rendered output with ANSI escape codes
19
- def render(markdown, style: "auto", width: 0, **)
27
+ def render(markdown, style: "auto", width: 0, **options)
20
28
  if style_class?(style)
21
- render_with_style_class(markdown, style, width: width, **)
29
+ render_with_style_class(markdown, style, width: width, **options)
22
30
  else
23
- render_native(markdown, style: style, width: width, **)
31
+ render_native(markdown, style: style, width: width, **options)
24
32
  end
25
33
  end
26
34
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glamour
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Marco Roth
@@ -9,8 +9,8 @@ bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
- description: Ruby wrapper for Charm's glamour stylesheet-based markdown rendering
13
- for Ruby CLI apps.
12
+ description: Glamour lets you render markdown documents & templates on ANSI compatible
13
+ terminals.
14
14
  email:
15
15
  - marco.roth@intergga.ch
16
16
  executables: []
@@ -31,6 +31,7 @@ files:
31
31
  - lib/glamour/3.2/glamour.bundle
32
32
  - lib/glamour/3.3/glamour.bundle
33
33
  - lib/glamour/3.4/glamour.bundle
34
+ - lib/glamour/4.0/glamour.bundle
34
35
  - lib/glamour/renderer.rb
35
36
  - lib/glamour/style.rb
36
37
  - lib/glamour/style_definition.rb
@@ -53,15 +54,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
54
  version: '3.2'
54
55
  - - "<"
55
56
  - !ruby/object:Gem::Version
56
- version: 3.5.dev
57
+ version: 4.1.dev
57
58
  required_rubygems_version: !ruby/object:Gem::Requirement
58
59
  requirements:
59
60
  - - ">="
60
61
  - !ruby/object:Gem::Version
61
62
  version: '0'
62
63
  requirements: []
63
- rubygems_version: 3.6.9
64
+ rubygems_version: 4.0.3
64
65
  specification_version: 4
65
- summary: Ruby wrapper for Charm's glamour stylesheet-based markdown rendering for
66
- Ruby CLI apps.
66
+ summary: Ruby wrapper for Charm's glamour. Stylesheet-based markdown rendering for
67
+ your CLI apps.
67
68
  test_files: []