specwrk 0.6.0 → 0.6.1
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 +4 -4
- data/docker/Dockerfile.server +7 -11
- data/docker/entrypoint.server.sh +2 -2
- data/docker/pitchfork.conf +5 -0
- data/lib/specwrk/version.rb +1 -1
- data/lib/specwrk/web/auth.rb +1 -1
- data/lib/specwrk/web/endpoints.rb +8 -8
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dac5590f1e1c0603205328a69256a082c3ba1ff7ccf3ecd3937103d006706cb8
|
4
|
+
data.tar.gz: d53d623560f4c52a56e57d4d166597e40079bea76ea231d087930db588b7c401
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ecd6b6c0c37e6d17603f63b83e9f4cbfab076db34e67fc3fa433ef06ca66899b273d1858a7667b5946cc4b97ec58ac3e3c7eeea316687cde6fa3a824632e295
|
7
|
+
data.tar.gz: b963354e642948b1939009b8a0c54b126fc5d819b3cd07b14eb8822b0282317ce82dd432c7dcd5e28e5ed212aaf8e18a1a9bf048bb30ed9bd187a60da0d9d04d
|
data/docker/Dockerfile.server
CHANGED
@@ -1,11 +1,6 @@
|
|
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
|
3
|
+
RUN apk add --no-cache build-base
|
9
4
|
|
10
5
|
WORKDIR /app
|
11
6
|
|
@@ -13,14 +8,15 @@ RUN mkdir .specwrk/
|
|
13
8
|
|
14
9
|
ARG SPECWRK_SRV_PORT=5138
|
15
10
|
ARG SPECWRK_VERSION=latest
|
16
|
-
ARG
|
11
|
+
ARG GEM_FILE=specwrk-$SPECWRK_VERSION.gem
|
17
12
|
|
18
|
-
COPY $
|
19
|
-
RUN gem install ./$
|
20
|
-
RUN rm ./$
|
13
|
+
COPY $GEM_FILE ./
|
14
|
+
RUN gem install ./$GEM_FILE --no-document
|
15
|
+
RUN rm ./$GEM_FILE
|
21
16
|
|
22
|
-
RUN gem install
|
17
|
+
RUN gem install pitchfork thruster
|
23
18
|
COPY config.ru ./
|
19
|
+
COPY docker/pitchfork.conf ./
|
24
20
|
|
25
21
|
COPY docker/entrypoint.server.sh /usr/local/bin/entrypoint
|
26
22
|
RUN chmod +x /usr/local/bin/entrypoint
|
data/docker/entrypoint.server.sh
CHANGED
@@ -2,6 +2,6 @@
|
|
2
2
|
|
3
3
|
export THRUSTER_HTTP_PORT=${PORT:-5138}
|
4
4
|
export THRUSTER_TARGET_PORT=3000
|
5
|
-
export THRUSTER_HTTP_IDLE_TIMEOUT=${IDLE_TIMEOUT:-
|
5
|
+
export THRUSTER_HTTP_IDLE_TIMEOUT=${IDLE_TIMEOUT:-300}
|
6
6
|
|
7
|
-
exec thrust
|
7
|
+
exec thrust pitchfork -c pitchfork.conf
|
data/lib/specwrk/version.rb
CHANGED
data/lib/specwrk/web/auth.rb
CHANGED
@@ -22,11 +22,11 @@ module Specwrk
|
|
22
22
|
attr_reader :request
|
23
23
|
|
24
24
|
def not_found
|
25
|
-
[404, {"
|
25
|
+
[404, {"content-type" => "text/plain"}, ["This is not the path you're looking for, 'ol chap..."]]
|
26
26
|
end
|
27
27
|
|
28
28
|
def ok
|
29
|
-
[200, {"
|
29
|
+
[200, {"content-type" => "text/plain"}, ["OK, 'ol chap"]]
|
30
30
|
end
|
31
31
|
|
32
32
|
def payload
|
@@ -125,11 +125,11 @@ module Specwrk
|
|
125
125
|
end
|
126
126
|
|
127
127
|
if @examples.length.positive?
|
128
|
-
[200, {"
|
128
|
+
[200, {"content-type" => "application/json"}, [JSON.generate(@examples)]]
|
129
129
|
elsif pending_queue.length.zero? && processing_queue.length.zero? && completed_queue.length.zero?
|
130
|
-
[204, {"
|
130
|
+
[204, {"content-type" => "text/plain"}, ["Waiting for sample to be seeded."]]
|
131
131
|
elsif completed_queue.length.positive? && processing_queue.length.zero?
|
132
|
-
[410, {"
|
132
|
+
[410, {"content-type" => "text/plain"}, ["That's a good lad. Run along now and go home."]]
|
133
133
|
else
|
134
134
|
not_found
|
135
135
|
end
|
@@ -139,9 +139,9 @@ module Specwrk
|
|
139
139
|
class Report < Base
|
140
140
|
def response
|
141
141
|
if data
|
142
|
-
[200, {"
|
142
|
+
[200, {"content-type" => "application/json"}, [data]]
|
143
143
|
else
|
144
|
-
[404, {"
|
144
|
+
[404, {"content-type" => "text/plain"}, ["Unable to report on run #{run_id}; no file matching #{"*-report-#{run_id}.json"}"]]
|
145
145
|
end
|
146
146
|
end
|
147
147
|
|
@@ -168,7 +168,7 @@ module Specwrk
|
|
168
168
|
def response
|
169
169
|
interupt! if ENV["SPECWRK_SRV_SINGLE_RUN"]
|
170
170
|
|
171
|
-
[200, {"
|
171
|
+
[200, {"content-type" => "text/plain"}, ["✌️"]]
|
172
172
|
end
|
173
173
|
|
174
174
|
def interupt!
|
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.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Westendorf
|
@@ -152,6 +152,7 @@ files:
|
|
152
152
|
- config.ru
|
153
153
|
- docker/Dockerfile.server
|
154
154
|
- docker/entrypoint.server.sh
|
155
|
+
- docker/pitchfork.conf
|
155
156
|
- exe/specwrk
|
156
157
|
- lib/specwrk.rb
|
157
158
|
- lib/specwrk/cli.rb
|