1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

F #4163: Added path to rubygems (packages)

This commit is contained in:
Ruben S. Montero 2020-02-10 11:53:55 +01:00
parent c609b01427
commit 8ff8658672
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -16,6 +16,22 @@
# limitations under the License. #
# -------------------------------------------------------------------------- #
ONE_LOCATION = ENV['ONE_LOCATION']
if !ONE_LOCATION
RUBY_LIB_LOCATION = '/usr/lib/one/ruby'
GEMS_LOCATION = '/usr/share/one/gems'
else
RUBY_LIB_LOCATION = ONE_LOCATION + '/lib/ruby'
GEMS_LOCATION = ONE_LOCATION + '/share/gems'
end
if File.directory?(GEMS_LOCATION)
Gem.use_paths(GEMS_LOCATION)
end
$LOAD_PATH << RUBY_LIB_LOCATION
require 'net/http'
require 'uri'
require 'json'