summaryrefslogtreecommitdiffhomepage
path: root/pkg/deb/debian.module
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2018-04-02 15:48:33 +0300
committerAndrei Belov <defan@nginx.com>2018-04-02 15:48:33 +0300
commitaa8f2c3295cbf7e1b8e134e70b135e07c35f88e9 (patch)
tree73a2802ee4a7758f225a5ebe3fdde96565e814c4 /pkg/deb/debian.module
parent2028f3a04be9836ff0f904a487f05bcff75d528d (diff)
downloadunit-aa8f2c3295cbf7e1b8e134e70b135e07c35f88e9.tar.gz
unit-aa8f2c3295cbf7e1b8e134e70b135e07c35f88e9.tar.bz2
Added Ruby packaging support.
Diffstat (limited to 'pkg/deb/debian.module')
-rw-r--r--pkg/deb/debian.module/unit.example-ruby-app7
-rw-r--r--pkg/deb/debian.module/unit.example-ruby-config16
2 files changed, 23 insertions, 0 deletions
diff --git a/pkg/deb/debian.module/unit.example-ruby-app b/pkg/deb/debian.module/unit.example-ruby-app
new file mode 100644
index 00000000..69b015b7
--- /dev/null
+++ b/pkg/deb/debian.module/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/deb/debian.module/unit.example-ruby-config b/pkg/deb/debian.module/unit.example-ruby-config
new file mode 100644
index 00000000..53eee534
--- /dev/null
+++ b/pkg/deb/debian.module/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"
+ }
+ }
+}