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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 226fb27273ff423ce831f3cb74b501bf41f3114f
4
- data.tar.gz: c4be94f24ced508acec9f7176fc9621049c2f346
3
+ metadata.gz: 03369a2b54b181f10f44cbeb3aaf03f4e77bce5c
4
+ data.tar.gz: 7c55dddf8683e0face672005890d1e7875f1b3d2
5
5
  SHA512:
6
- metadata.gz: a1c68c7b8dd743fb1940166484dda6ae709b6d6bcb3b7bd194328044667d81d2bfc3e0b0d38855add4fbe7f0a8edce7d577c8321658a68980a07c6bfad3f9471
7
- data.tar.gz: 1f8c90bad451db1adba28d051b2d7adba240dc9c3d46a365cc4075bd3314b8044ce83c78eb44d071891332eeb401d16bb0b5502900ca0f20f3fbc8236f330763
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
@@ -1,5 +1,5 @@
1
1
  module Opener
2
2
  module Core
3
- VERSION = '2.1.0'
3
+ VERSION = '2.2.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opener-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - development@olery.com