ext/oboe_metal/extconf.rb in appoptics_apm-4.0.9 vs ext/oboe_metal/extconf.rb in appoptics_apm-4.1.0
- old
+ new
@@ -2,14 +2,12 @@
# All rights reserved.
require 'mkmf'
require 'rbconfig'
require 'open-uri'
-require 'no_proxy_fix'
+require 'digest'
-# require 'digest'
-
ext_dir = File.expand_path(File.dirname(__FILE__))
# Check if we're running in JRuby
jruby = defined?(JRUBY_VERSION) ? true : false
@@ -18,11 +16,11 @@
ao_lib_dir = File.join(ext_dir, 'lib')
ao_include = File.join(ext_dir, 'src')
# Download the appropriate liboboe from S3(via rake for testing) or files.appoptics.com (production)
version = File.read(File.join(ao_include, 'VERSION')).chomp
-if ENV['APPOPTICS_FROM_S3'].to_s.downcase == 'true'
+if ENV['FROM_S3']
ao_path = File.join('https://s3-us-west-2.amazonaws.com/rc-files-t2/c-lib/', version)
puts "Fetching c-lib from S3"
else
ao_path = File.join('https://files.appoptics.com/c-lib', version)
end
@@ -78,10 +76,9 @@
File.symlink(ao_clib, 'liboboe-1.0.so.0')
end
dir_config('oboe', 'src', 'lib')
- # create Makefile
if jruby || ENV.key?('APPOPTICS_URL')
# Build the noop extension under JRuby and Heroku.
# The oboe-heroku gem builds it's own c extension which links to
# libs specific to a Heroku dyno
# FIXME: For JRuby we need to remove the c extension entirely