ruby.py (1635:97afbb6c5a15) ruby.py (1670:099c23b00eaf)
1from conftest import option
2from unit.applications.proto import TestApplicationProto
3
4
5class TestApplicationRuby(TestApplicationProto):
6 application_type = "ruby"
7
8 def load(self, script, name='config.ru', **kwargs):
9 script_path = option.test_dir + '/ruby/' + script
1from conftest import option
2from unit.applications.proto import TestApplicationProto
3
4
5class TestApplicationRuby(TestApplicationProto):
6 application_type = "ruby"
7
8 def load(self, script, name='config.ru', **kwargs):
9 script_path = option.test_dir + '/ruby/' + script
10 appication_type = self.get_appication_type()
11
10
12 if appication_type is None:
13 appication_type = self.application_type
14
15 self._load_conf(
16 {
17 "listeners": {"*:7080": {"pass": "applications/" + script}},
18 "applications": {
19 script: {
11 self._load_conf(
12 {
13 "listeners": {"*:7080": {"pass": "applications/" + script}},
14 "applications": {
15 script: {
20 "type": appication_type,
16 "type": self.get_application_type(),
21 "processes": {"spare": 0},
22 "working_directory": script_path,
23 "script": script_path + '/' + name,
24 }
25 },
26 },
27 **kwargs
28 )
17 "processes": {"spare": 0},
18 "working_directory": script_path,
19 "script": script_path + '/' + name,
20 }
21 },
22 },
23 **kwargs
24 )