specwrk 0.4.6 → 0.4.7

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: ed8dbd2952f7e8caf1de7903bb7a03b02ddaba8a735246e347b2f56e7770b22e
4
+ data.tar.gz: a4a8403a07f36363e9a7d8239f824f7d33bffed98478540a044d6f8d293b130f
5
5
  SHA512:
6
- metadata.gz: b6088d190bcbbd0b274f76d992626c851637c27d132fb5642298c15cfa49f891265836f800bf0dbca77eee3dc680cb606ddb6262cd18bc09776ed7623e81d494
7
- data.tar.gz: ffcda0f107b0b82d40d3bf2472a1b0447afed956bdb969abc1765e8c158b03a2ffa32c8d7ed2d130b46d5d42294e97d6f32be05ff3c299a61f75b154d4be5465
6
+ metadata.gz: fa9f2687d4009ee526037b19155225d24a9746b124101962dce1ecde652ea5c0f1bc788933f4bf5c7713f7983d018b7d5a2ddf2684361b6d5c0a951518010391
7
+ data.tar.gz: 77dd8e7ea504a2e02905f7dd6b5a1d13ece46a72653af791cea40bc6e3dbf9788c9238c28b1ee70cdcc0f8bab59c5dc235012cbe8d8ddf43541db3c5ddf06f7c
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,3 @@
1
+ require "specwrk/web/app"
2
+
3
+ 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.7"
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.7
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