glamour 0.2.0-aarch64-linux-gnu → 0.2.2-aarch64-linux-gnu

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: dba23a86ee71f2d8b32df4bf0d315895b3c7a2585a50d0da65b51a44f28a207d
4
- data.tar.gz: 3a5201cc02f596d2fd042f602952c6f4aab6306a1b5a234e9ae3eee29d92f65e
3
+ metadata.gz: 8f7dac1fa9a0d99cd7e8f702af8affdb6485aaab243d7140b5f38b8830aa6a55
4
+ data.tar.gz: 8bb1d744b0ab2d73eb76821d33c15ac919d273973ebf442804ce81816a28e595
5
5
  SHA512:
6
- metadata.gz: d967fe9651b29a9598db06189b02385607d571eb482747fba09e9c3cb55222a5bf3f5ffb850ae4f6339ccba8c050d17b8d6698abf9dcd5a2d8ca08a82e207997
7
- data.tar.gz: 74882233d9ffaf22714692fbb0035d991c7000fc96bae7baf7daf67c29cfe365fe0183f54eccf5b56693927e547d6d5dcfacfe38c3c19ff395c28580872aad0d
6
+ metadata.gz: 6200cd1cc82a915e4c8858dbc417a7a3700f8dea912a45626ed5dd4fa23091664725078bcdeea62534d5301243ddcfc78dcc53d733f8f9ebc15fdfb217c50e44
7
+ data.tar.gz: eddaeb4cf8f4c693e1455931bf08353524ba28fee3229a07447a131e63da58ed50c018a49d655cdee1cba450351833994d93fe269690f74efd3eeda10eaeaa4f
data/README.md CHANGED
@@ -303,4 +303,14 @@ The gem is available as open source under the terms of the MIT License.
303
303
 
304
304
  ## Acknowledgments
305
305
 
306
- This gem wraps [charmbracelet/glamour](https://github.com/charmbracelet/glamour), part of the excellent [Charm](https://charm.sh) ecosystem.
306
+ This gem wraps [charmbracelet/glamour](https://github.com/charmbracelet/glamour), part of the excellent [Charm](https://charm.sh) ecosystem. Charm Ruby is not affiliated with or endorsed by Charmbracelet, Inc.
307
+
308
+ ---
309
+
310
+ Part of [Charm Ruby](https://charm-ruby.dev).
311
+
312
+ <a href="https://charm-ruby.dev"><img alt="Charm Ruby" src="https://marcoroth.dev/images/heros/glamorous-christmas.png" width="400"></a>
313
+
314
+ [Lipgloss](https://github.com/marcoroth/lipgloss-ruby) • [Bubble Tea](https://github.com/marcoroth/bubbletea-ruby) • [Bubbles](https://github.com/marcoroth/bubbles-ruby) • [Glamour](https://github.com/marcoroth/glamour-ruby) • [Huh?](https://github.com/marcoroth/huh-ruby) • [Harmonica](https://github.com/marcoroth/harmonica-ruby) • [Bubblezone](https://github.com/marcoroth/bubblezone-ruby) • [Gum](https://github.com/marcoroth/gum-ruby) • [ntcharts](https://github.com/marcoroth/ntcharts-ruby)
315
+
316
+ The terminal doesn't have to be boring.
@@ -42,16 +42,20 @@ unless File.exist?(File.join(go_lib_dir, "libglamour.a"))
42
42
  ERROR
43
43
  end
44
44
 
45
+ go_lib_path = File.join(go_lib_dir, "libglamour.a")
46
+
45
47
  $LDFLAGS << " -L#{go_lib_dir}"
46
48
  $INCFLAGS << " -I#{go_lib_dir}"
47
49
 
48
- $LOCAL_LIBS << " #{go_lib_dir}/libglamour.a"
49
-
50
50
  case RbConfig::CONFIG["host_os"]
51
51
  when /darwin/
52
+ $LDFLAGS << " -Wl,-load_hidden,#{go_lib_path}"
53
+ $LDFLAGS << " -Wl,-exported_symbol,_Init_glamour"
52
54
  $LDFLAGS << " -framework CoreFoundation -framework Security -framework SystemConfiguration"
53
55
  $LDFLAGS << " -lresolv"
54
56
  when /linux/
57
+ $LOCAL_LIBS << " #{go_lib_path}"
58
+ $LDFLAGS << " -Wl,--exclude-libs,ALL"
55
59
  $LDFLAGS << " -lpthread -lm -ldl"
56
60
  $LDFLAGS << " -lresolv" if find_library("resolv", "res_query")
57
61
  end
@@ -178,8 +178,18 @@ static VALUE glamour_version_rb(VALUE self) {
178
178
 
179
179
  /* Renderer class methods */
180
180
 
181
+ static const rb_data_type_t renderer_data_type = {
182
+ .wrap_struct_name = "Glamour::Renderer",
183
+ .function = {
184
+ .dmark = NULL,
185
+ .dfree = NULL,
186
+ .dsize = NULL,
187
+ },
188
+ .flags = RUBY_TYPED_FREE_IMMEDIATELY,
189
+ };
190
+
181
191
  static VALUE renderer_alloc(VALUE klass) {
182
- return Data_Wrap_Struct(klass, NULL, NULL, NULL);
192
+ return TypedData_Wrap_Struct(klass, &renderer_data_type, NULL);
183
193
  }
184
194
 
185
195
  static VALUE renderer_initialize(int argc, VALUE *argv, VALUE self) {
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -3,5 +3,5 @@
3
3
  # rbs_inline: enabled
4
4
 
5
5
  module Glamour
6
- VERSION = "0.2.0" #: String
6
+ VERSION = "0.2.2" #: String
7
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
 
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.2.0
4
+ version: 0.2.2
5
5
  platform: aarch64-linux-gnu
6
6
  authors:
7
7
  - Marco Roth