opener-core 2.1.0 → 2.2.0
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 +4 -4
- data/lib/opener/core/resource_switcher.rb +8 -0
- data/lib/opener/core/version.rb +1 -1
- 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: 03369a2b54b181f10f44cbeb3aaf03f4e77bce5c
|
4
|
+
data.tar.gz: 7c55dddf8683e0face672005890d1e7875f1b3d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 179d9be2fae2aec9260a42bee0e6b36ebc04ddde43c2859abf2ac4a77f8683c239afd5363d4b281192a1a5fe07c6b7ba5320c3f20518b2b0536da9074b70580a
|
7
|
+
data.tar.gz: 07f0fd8aa620e8ad02f8de03293ac20d7b68a344afec4f57c43cdf9986995b549d3a53de2425a890c38843aa37230dd8f2d6ecb3570a5a7ddce4807d0c6668e5
|
@@ -4,6 +4,10 @@ module Opener
|
|
4
4
|
# Class for downloading and extracting external resources such as
|
5
5
|
# models/lexicons.
|
6
6
|
#
|
7
|
+
# Resource paths specified using the `--resource-path` option are stored in
|
8
|
+
# the environment variable `RESOURCE_PATH`. This variable should be used in
|
9
|
+
# webservice/daemon code instead of said code re-parsing CLI arguments.
|
10
|
+
#
|
7
11
|
# @!attribute [r] http
|
8
12
|
# @return [HTTPClient]
|
9
13
|
#
|
@@ -39,6 +43,10 @@ module Opener
|
|
39
43
|
download_and_extract(opts[:'resource-url'], opts[:'resource-path'])
|
40
44
|
end
|
41
45
|
|
46
|
+
# Allow daemons/webservices to use the path without having to re-parse
|
47
|
+
# CLI options.
|
48
|
+
ENV['RESOURCE_PATH'] = opts[:'resource-path']
|
49
|
+
|
42
50
|
old_runner.call(opts, args)
|
43
51
|
end
|
44
52
|
end
|
data/lib/opener/core/version.rb
CHANGED