isorun 0.1.3.pre-x86_64-linux → 0.1.5.pre-x86_64-linux

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7e5d28b853f3927495b75a44c6203eb53f8c7f0c84e4d82814b87975e9b7524
4
- data.tar.gz: ffdc121594023ed5e35d5684b5c46e1da3e3bcab5a2b2fae65a98ff263e45479
3
+ metadata.gz: 425cb5a36c48c15c8d7e05e336cefb0c12921a64ff52f1bec061270386d0bae8
4
+ data.tar.gz: 4847244f7463591220b11506e11120236ad3c81f3ab7ac2b4acab4fe82063d82
5
5
  SHA512:
6
- metadata.gz: 18702a27d4a9864ac8bcd834ee763f37dca8c59875dabcf98dbb58b409294ccd2173e10b6e8be317598235fc082c322ba62fe5ccef7a91692a2d982826bbada2
7
- data.tar.gz: fb66e61c8ee897dd6558bde3e766a1f56eecd8015fb35b6916e6b352cd63723cc938e172fe6e866fa451848473435e6a8cb76b8493480cfd5203c7e4f2d1a5a1
6
+ metadata.gz: 3642a8e54820ce5eca25721d5d22b4a78cf7d9df530006d5bb38c4651df26ba001375472568bb9ae49f0df543705e5c09f8f6124eb5eaf71432929ea5a3b0214
7
+ data.tar.gz: 476317987740b058717dcf5041e1c0aec793366403658d161e424612029257b5e50a1fb64fe07ddabfccddf3d8bb50f1bc5d93e99a3fa180b0275da466b10cb3
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "isorun"
3
- version = "0.1.3"
3
+ version = "0.1.5"
4
4
  edition = "2021"
5
5
  authors = ["Hannes Moser <box@hannesmoser.at>"]
6
6
  homepage = "https://github.com/eliias/isorun"
@@ -13,6 +13,7 @@ use magnus::{Error, Value};
13
13
  use std::borrow::BorrowMut;
14
14
  use std::cell::RefCell;
15
15
  use std::collections::{HashMap, HashSet};
16
+ use std::env;
16
17
  use std::path::Path;
17
18
  use std::rc::Rc;
18
19
  use std::string::ToString;
@@ -203,7 +204,18 @@ impl Default for Worker {
203
204
 
204
205
  // todo: we don't use the main module at all, but it could be used as an
205
206
  // entry point for "eval" JavaScript.
206
- let js_path = Path::new(env!("CARGO_MANIFEST_DIR")).join("src/call.js");
207
+ let default_path = Path::new(env!("CARGO_MANIFEST_DIR"))
208
+ .join("../..")
209
+ .canonicalize()
210
+ .unwrap()
211
+ .into_os_string()
212
+ .into_string()
213
+ .unwrap();
214
+ let isorun_native_gem_path =
215
+ env::var("ISORUN_NATIVE_GEM_PATH").unwrap_or(default_path.clone());
216
+ let js_path = Path::new(isorun_native_gem_path.as_str())
217
+ .join("ext/isorun/src/call.js");
218
+
207
219
  let main_module =
208
220
  deno_core::resolve_path(&js_path.to_string_lossy()).unwrap();
209
221
  let permissions = Permissions::allow_all();
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Isorun
4
- VERSION = "0.1.3.pre"
4
+ VERSION = "0.1.5.pre"
5
5
  end
data/lib/isorun.rb CHANGED
@@ -1,5 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # set environment variable to isorun gem path, we use this to request the main
4
+ # module in the native extension
5
+ ENV["ISORUN_NATIVE_GEM_PATH"] = File.expand_path("..", __dir__)
6
+
3
7
  # load native extension
4
8
  begin
5
9
  ruby_version = /(\d+\.\d+)/.match(::RUBY_VERSION)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isorun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3.pre
4
+ version: 0.1.5.pre
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Hannes Moser