jtor-stdlib 0.1.2-java → 0.1.3-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jtor-stdlib/jtor_import.rb +6 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e83350fe555fd5b1c74ca926dfdbe203ef7f09f2
|
4
|
+
data.tar.gz: 23a1e40c02f00d3177a0eeb1f9aebdd9cce9b7ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 030ad6a50c4bb8fad4194d4b8d8273a54da1fd9b01038ca5f99862f3392de19ce792f3cdf68554f3da7f0a373551f46cc2dd7db990ae4c4d12f1aecfd5c51d75
|
7
|
+
data.tar.gz: 749d3a27f0ac97f27c74ecdda710869e6e708754df44482f3f4e8d8419a0d484cc4a5364f100d2137e3bb60221d529d202e1664a6ab5e5d7c1bc30aad0efaeb6
|
@@ -3,9 +3,12 @@ module Jtor
|
|
3
3
|
def jtor_import(import_string)
|
4
4
|
packages = import_string.split('.')
|
5
5
|
path = File.join(packages[0..-2], "#{packages.last}.rb")
|
6
|
-
Dir[path]
|
7
|
-
|
8
|
-
|
6
|
+
paths = Dir[path]
|
7
|
+
if paths.any?
|
8
|
+
paths.each { |p| require File.expand_path(p) }
|
9
|
+
else
|
10
|
+
java_import import_string
|
11
|
+
end
|
9
12
|
end
|
10
13
|
end
|
11
14
|
end
|