Skip to content

Commit

Permalink
Configurable concurrency for Ruby implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinson committed Jan 21, 2015
1 parent 8817978 commit 0aa0195
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
3 changes: 2 additions & 1 deletion docs/ruby.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ connection strings:
public_folder: 'public',
trafficlog_storage: {
# mongo: 'mongodb://localhost:27017/test'
}
},
worker_procs: 1
})
.. NOTE: In the code sample shown above, `QM.launch_service` is used instead of
Expand Down
9 changes: 1 addition & 8 deletions src/ruby-app/Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#- Ruby dependency management file

#- Gemfile ~~
#
# Note that Thin is not strictly required here; WEBrick also works, and
# possibly other platforms and web servers, too.
#
# ~~ (c) SRW, 25 Apr 2013
# ~~ last updated 16 Jan 2015
# ~~ last updated 21 Jan 2015

git_repo = {
git: 'https://github.com/qmachine/qm-ruby.git'
Expand All @@ -18,9 +14,6 @@ local_fs = {

gem 'json'
gem 'qm', (FileTest.directory?(local_fs[:path]) ? local_fs : git_repo)
gem 'thin', {
platforms: ['ruby']
}

ruby '2.2.0'

Expand Down
2 changes: 1 addition & 1 deletion src/ruby-app/Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: bundle exec rackup
web: bundle exec ruby server.rb
6 changes: 3 additions & 3 deletions src/ruby-app/config.ru → src/ruby-app/server.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#- Rack configuration file
#- Ruby source code

#- config.ru ~~
#- server.rb ~~
#
# This Ruby app launches a QM API server and a web server for anything placed
# in the "public" folder.
#
# See https://docs.qmachine.org/en/latest/ruby.html for more information.
#
# ~~ (c) SRW, 24 Apr 2013
# ~~ last updated 20 Jan 2015
# ~~ last updated 21 Jan 2015

require 'rubygems'
require 'bundler'
Expand Down
2 changes: 1 addition & 1 deletion src/ruby-gem
Submodule ruby-gem updated 3 files
+11 −2 lib/qm.rb
+3 −2 lib/service.rb
+2 −1 qm.gemspec

0 comments on commit 0aa0195

Please sign in to comment.