class RestyTest::Config
Attributes
build_opts[W]
config_file[W]
logger[W]
root[RW]
source[W]
Public Instance Methods
build_opts()
click to toggle source
# File lib/resty_test/config.rb, line 21 def build_opts @build_opts ||= ["--with-luajit", *platform_specific_build_options] end
config_file()
click to toggle source
# File lib/resty_test/config.rb, line 17 def config_file @config_file ||= File.expand_path("../nginx.conf", RestyTest.paths.root) end
logger()
click to toggle source
# File lib/resty_test/config.rb, line 11 def logger @logger ||= Logger.new(STDOUT).tap do |l| l.level = Logger::INFO end end
source()
click to toggle source
# File lib/resty_test/config.rb, line 7 def source @source ||= "http://openresty.org/download/ngx_openresty-1.2.8.6.tar.gz" end
Private Instance Methods
platform_specific_build_options()
click to toggle source
# File lib/resty_test/config.rb, line 27 def platform_specific_build_options case RUBY_PLATFORM when /darwin/i pcre = Dir["/usr/local/Cellar/pcre/*/include", "/usr/local/pcre/*/include"].sort[-1] if pcre ["--with-cc-opt='-I#{pcre}'", "--with-ld-opt='-L#{File.dirname(pcre)}/lib'"] else [] end else [] end end