diff options
Diffstat (limited to 'pkg/rpm/rpmbuild')
-rw-r--r-- | pkg/rpm/rpmbuild/SOURCES/unit.example-ruby-app | 7 | ||||
-rw-r--r-- | pkg/rpm/rpmbuild/SOURCES/unit.example-ruby-config | 16 |
2 files changed, 23 insertions, 0 deletions
diff --git a/pkg/rpm/rpmbuild/SOURCES/unit.example-ruby-app b/pkg/rpm/rpmbuild/SOURCES/unit.example-ruby-app new file mode 100644 index 00000000..69b015b7 --- /dev/null +++ b/pkg/rpm/rpmbuild/SOURCES/unit.example-ruby-app @@ -0,0 +1,7 @@ +app = Proc.new do |env| + ['200', { + 'Content-Type' => 'text/plain', + }, ["Hello from Unit running with Ruby #{RUBY_VERSION}!\n\n"]] +end + +run app diff --git a/pkg/rpm/rpmbuild/SOURCES/unit.example-ruby-config b/pkg/rpm/rpmbuild/SOURCES/unit.example-ruby-config new file mode 100644 index 00000000..53eee534 --- /dev/null +++ b/pkg/rpm/rpmbuild/SOURCES/unit.example-ruby-config @@ -0,0 +1,16 @@ +{ + "applications": { + "example_ruby": { + "type": "ruby", + "user": "nobody", + "processes": 2, + "script": "/usr/share/doc/unit-ruby/examples/ruby-app.ru" + } + }, + + "listeners": { + "*:8700": { + "application": "example_ruby" + } + } +} |