ext/oboe_metal/extconf.rb in appoptics_apm-4.1.0 vs ext/oboe_metal/extconf.rb in appoptics_apm-4.1.1

- old
+ new

@@ -2,11 +2,11 @@ # All rights reserved. require 'mkmf' require 'rbconfig' require 'open-uri' -require 'digest' +require 'no_proxy_fix' ext_dir = File.expand_path(File.dirname(__FILE__)) # Check if we're running in JRuby jruby = defined?(JRUBY_VERSION) ? true : false @@ -16,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['FROM_S3'] +if ENV['APPOPTICS_FROM_S3'].to_s.downcase == 'true' 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 @@ -76,9 +76,10 @@ 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