isorun 0.1.4.pre-x86_64-darwin → 0.1.5.pre-x86_64-darwin
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/isorun/Cargo.toml +1 -1
- data/ext/isorun/src/js/worker.rs +13 -1
- data/lib/isorun/2.7/isorun.bundle +0 -0
- data/lib/isorun/3.0/isorun.bundle +0 -0
- data/lib/isorun/3.1/isorun.bundle +0 -0
- data/lib/isorun/version.rb +1 -1
- data/lib/isorun.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e94afbe13006947e4cdd9fc09ca5d02bba09d450f1e1ec7516c921d96c971b82
|
4
|
+
data.tar.gz: b01202b2ac71800e6cde00a86605027ab6a086897b0a3b8793d8d02127781dff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9a564fe9e3e27bbe62a48283b3f50ea1ec5a3fe03319d60b77fd8f740277fbe5ea034c92ab2f2a7e26d1fd61118ffad9e26435907d190f11fbaf3aec35ae19c
|
7
|
+
data.tar.gz: 166e646f17bdf52eb8e3d6ecb850c3d24a98ed63b89abd62c087ec6a6a6c8b7bd1be3e50494cf2189b751d7c492bc471b75536ef829231de04e05b9f50a5c892
|
data/ext/isorun/Cargo.toml
CHANGED
data/ext/isorun/src/js/worker.rs
CHANGED
@@ -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
|
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
|
data/lib/isorun/version.rb
CHANGED
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)
|