raindown 0.21.0 → 0.21.2

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: 537d6e6dd373dffcd9616142d4cf5798f281c96d7aa4177fee5731d0060b2226
4
- data.tar.gz: ec9e9426b6c9fc8b41ff9ba59eaff4fd76819cc15462ae3f0ee8f496a15a821d
3
+ metadata.gz: 14386d5918ff2a82381d76226f8d51f2464681836ab62438e9820a5e3622bd98
4
+ data.tar.gz: 5d54b9b4656de75b45333f566f7a6ddd6903ab96611c4edbef98c44b14234b3c
5
5
  SHA512:
6
- metadata.gz: ec35463daeacfaad63e3abddd53bf2a4061d5cafdab2a43a79c4afeb00f4c39df5c53d674b84bd5dc9a79f8dfe479976955bfca842a7dffb31e00bcc30f4a42e
7
- data.tar.gz: 7a1dfeb15899ea565fcc430fcacc163c7a0d759af878dfb68fcc9371e408c0f2f31eeba8f8d50e5aa5b9fa84929c1fc0d6000a5cd6af906ab85ac9d049b8ee0b
6
+ metadata.gz: 953e7b73e969477ec22dba2d0364404a2885ed51e78e3a9607535c303344015b13b40786f344ba60c1aa0803f4e286d2d48cc57a308ed1ffb3aac8b26b779101
7
+ data.tar.gz: 1c3fc1c75e2b0d15cb596c2a0824f5e6ced56da43edd66b9875d6daed8796c22e13f2aeb789cd2762734798ab96ff783b2e885ae66a74a3a2267c5fbaac59a0e
data/lib/raindown/cli.rb CHANGED
@@ -13,6 +13,7 @@ require_relative 'server'
13
13
  require_relative 'skeleton'
14
14
  require_relative 'watcher/file_watcher'
15
15
  require_relative 'watcher/supervisor'
16
+ require_relative 'yjit'
16
17
 
17
18
  module Raindown
18
19
  module CLI
@@ -81,6 +82,7 @@ module Raindown
81
82
  def self.run(argv)
82
83
  # Markdown is UTF-8 whatever the locale, as an app opened from the Dock, like Obsidian, starts Raindown without one.
83
84
  Encoding.default_external = Encoding::UTF_8
85
+ Yjit.enable
84
86
  return if command(argv) || Skeleton.run_command(argv)
85
87
 
86
88
  argv = with_path(argv)
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Raindown
4
+ # Ruby leaves YJIT off unless asked, which makes nodes that compute in loops several times faster.
5
+ module Yjit
6
+ module_function
7
+
8
+ def enable
9
+ RubyVM::YJIT.enable if available?
10
+ end
11
+
12
+ # A Ruby built without YJIT, like ruby.wasm's, has no RubyVM::YJIT. macOS kills a tebako binary, which is signed ad
13
+ # hoc, as soon as it runs code YJIT compiled, so the binary's files, under /__tfs__/, leave it off there.
14
+ def available?
15
+ return false unless defined?(RubyVM::YJIT)
16
+
17
+ !(RUBY_PLATFORM.include?('darwin') && __dir__.start_with?('/__tfs__/'))
18
+ end
19
+ end
20
+ end
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Raindown
4
- VERSION = '0.21.0'
4
+ VERSION = '0.21.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raindown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.21.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - maedi
@@ -367,6 +367,7 @@ files:
367
367
  - lib/raindown/workers/worker.rb
368
368
  - lib/raindown/workers/workers.rb
369
369
  - lib/raindown/written.rb
370
+ - lib/raindown/yjit.rb
370
371
  - lib/version.rb
371
372
  homepage: https://github.com/rainpour/raindown
372
373
  licenses: []