specwrk 0.4.6 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29b6d72df4f3e3a4ff055b9d9203e6af31173fbab4fe43235495bcadcbf7c37e
4
- data.tar.gz: 3b9c0af70e17efd7f5a42529550b49c2ce6b58e62f7b0f8c2fa4d66d14f09822
3
+ metadata.gz: b54fec1f526b07cda2e86d7dd5c26c134e33023e50ad3122f637736234d2fbfd
4
+ data.tar.gz: d56dbf0ad829e9c554d6caca40ff28c74db66a45ce888593a8d1e6dbf0552c99
5
5
  SHA512:
6
- metadata.gz: b6088d190bcbbd0b274f76d992626c851637c27d132fb5642298c15cfa49f891265836f800bf0dbca77eee3dc680cb606ddb6262cd18bc09776ed7623e81d494
7
- data.tar.gz: ffcda0f107b0b82d40d3bf2472a1b0447afed956bdb969abc1765e8c158b03a2ffa32c8d7ed2d130b46d5d42294e97d6f32be05ff3c299a61f75b154d4be5465
6
+ metadata.gz: 767fe8a6e6316a3c942699925667dced8fb35c37df94d38a21d6211330492de47633d1ec4b283f9106ad81893f2b6fe19a27775177e93305e77da57fd1bc5ce3
7
+ data.tar.gz: 4fac68daee472d09bf1503afa44160162cf26a20ba715a09bf417597fbd44b71f88637694d8896f3e2b8621c4d8aa101da7e23c675e225404fa16bfeda1acda2
data/README.md CHANGED
@@ -194,37 +194,8 @@ To accomplish this, a central queue server is required, examples must be explici
194
194
  Start a persistent Queue Server given one of the following methods
195
195
  - The explicit ruby command `bundle exec specwrk serve --port $PORT`
196
196
  - Via [docker image](https://hub.docker.com/repository/docker/danielwestendorf/specwrk-server/general): `docker run -e PORT=5139 -p 5139:5139 docker.io/danielwestendorf/specwrk-server:latest`
197
- - By mounting the app as an Rack app
198
- ```ruby
199
- require 'rack'
200
- require 'specwrk/web'
201
-
202
- app = Specwrk::Web.rackup # this is a Rack::Builder instance
203
-
204
- Rack::Server.start(
205
- app: app,
206
- server: 'webrick',
207
- Host: '0.0.0.0',
208
- Port: 9292
209
- )
210
-
211
- # OR maybe
212
- # Rack::Handler::WEBrick.run(app, Host: '0.0.0.0', Port: 9292)
213
- # Rack::Handler::Puma.run(app, Host: '0.0.0.0', Port: 9292)
214
-
215
- # OR maybe
216
- # config.ru
217
- require_relative 'lib/specwrk/web'
218
-
219
- run Specwrk::Web.rackup
220
-
221
- # OR maybe
222
- # config/routes.rb
223
- Rails.application.routes.draw do
224
- # everything under /specwrk will be handled by your Rack::Builder
225
- mount Specwrk::Web.rackup, at: '/specwrk'
226
- end
227
- ```
197
+ - By mounting the app as an Rack app (see `config.ru`)
198
+
228
199
  ### Configuring your Queue Server
229
200
  - Secure your server with a key either with the `SPECWRK_SRV_KEY` environment variable or `--key` CLI option
230
201
  - Configure the server output to be a persisted volume so your timings survive between restarts with the `SPECWRK_OUT` environment variable or `--out` CLI option
data/config.ru ADDED
@@ -0,0 +1,5 @@
1
+ require "specwrk"
2
+ require "specwrk/web"
3
+ require "specwrk/web/app"
4
+
5
+ run Specwrk::Web::App.rackup
@@ -1,5 +1,12 @@
1
1
  FROM ruby:3.4-alpine
2
2
 
3
+ RUN apk add --no-cache \
4
+ build-base \
5
+ ruby-dev \
6
+ linux-headers \
7
+ zlib-dev \
8
+ libffi-dev
9
+
3
10
  WORKDIR /app
4
11
 
5
12
  RUN mkdir .specwrk/
@@ -12,6 +19,9 @@ COPY $GEMFILE ./
12
19
  RUN gem install ./$GEMFILE --no-document
13
20
  RUN rm ./$GEMFILE
14
21
 
22
+ RUN gem install puma
23
+ COPY config.ru ./
24
+
15
25
  COPY docker/entrypoint.server.sh /usr/local/bin/entrypoint
16
26
  RUN chmod +x /usr/local/bin/entrypoint
17
27
 
@@ -1,3 +1,5 @@
1
1
  #!/bin/sh
2
2
 
3
- exec specwrk serve --port ${PORT:-$SPECWRK_SRV_PORT} --bind 0.0.0.0 --no-single-run --verbose
3
+ export SPECWRK_SRV_SINGLE_RUN=1
4
+
5
+ exec puma --port ${PORT:-$SPECWRK_SRV_PORT} --bind tcp://0.0.0.0 --threads 1 --workers 0 --silent
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Specwrk
4
- VERSION = "0.4.6"
4
+ VERSION = "0.4.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specwrk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Westendorf
@@ -149,6 +149,7 @@ files:
149
149
  - LICENSE.txt
150
150
  - README.md
151
151
  - Rakefile
152
+ - config.ru
152
153
  - docker/Dockerfile.server
153
154
  - docker/entrypoint.server.sh
154
155
  - exe/specwrk