Module: NginxTestHelper::EnvMethods::ClassMethods
- Included in:
- NginxTestHelper::EnvMethods
- Defined in:
- lib/nginx_test_helper/env_methods.rb
Instance Method Summary collapse
- #nginx_address ⇒ Object
- #nginx_event_type ⇒ Object
- #nginx_executable ⇒ Object
- #nginx_host ⇒ Object
- #nginx_port ⇒ Object
- #nginx_tests_core_dir(current_test) ⇒ Object
- #nginx_tests_cores_dir ⇒ Object
- #nginx_tests_tmp_dir ⇒ Object
- #nginx_workers ⇒ Object
Instance Method Details
#nginx_address ⇒ Object
4 5 6 |
# File 'lib/nginx_test_helper/env_methods.rb', line 4 def nginx_address "http://#{nginx_host}:#{nginx_port}" end |
#nginx_event_type ⇒ Object
36 37 38 |
# File 'lib/nginx_test_helper/env_methods.rb', line 36 def nginx_event_type (RUBY_PLATFORM =~ /darwin/) ? 'kqueue' : 'epoll' end |
#nginx_executable ⇒ Object
8 9 10 |
# File 'lib/nginx_test_helper/env_methods.rb', line 8 def nginx_executable ENV['NGINX_EXEC'].nil? ? "/usr/local/nginx/sbin/nginx" : ENV['NGINX_EXEC'] end |
#nginx_host ⇒ Object
12 13 14 |
# File 'lib/nginx_test_helper/env_methods.rb', line 12 def nginx_host ENV['NGINX_HOST'].nil? ? "127.0.0.1" : ENV['NGINX_HOST'] end |
#nginx_port ⇒ Object
16 17 18 |
# File 'lib/nginx_test_helper/env_methods.rb', line 16 def nginx_port ENV['NGINX_PORT'].nil? ? "9990" : ENV['NGINX_PORT'] end |
#nginx_tests_core_dir(current_test) ⇒ Object
32 33 34 |
# File 'lib/nginx_test_helper/env_methods.rb', line 32 def nginx_tests_core_dir(current_test) File.join(nginx_tests_cores_dir, current_test) end |
#nginx_tests_cores_dir ⇒ Object
28 29 30 |
# File 'lib/nginx_test_helper/env_methods.rb', line 28 def nginx_tests_cores_dir File.join(nginx_tests_tmp_dir, "cores") end |
#nginx_tests_tmp_dir ⇒ Object
24 25 26 |
# File 'lib/nginx_test_helper/env_methods.rb', line 24 def nginx_tests_tmp_dir ENV['NGINX_TESTS_TMP_DIR'].nil? ? "/tmp/nginx_tests" : ENV['NGINX_TESTS_TMP_DIR'] end |
#nginx_workers ⇒ Object
20 21 22 |
# File 'lib/nginx_test_helper/env_methods.rb', line 20 def nginx_workers ENV['NGINX_WORKERS'].nil? ? "1" : ENV['NGINX_WORKERS'] end |