specguard-ruby 0.3.10 → 0.3.11
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/lib/specguard/rspec/cli.rb +27 -9
- data/lib/specguard/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e274f554d8e8271f6fe4b096963e59a1a58579a2c09b772eaded70a7a0a4fbd5
|
|
4
|
+
data.tar.gz: f967409a020a45d16f79b53edf89edae5c04f9a80118169ffc774ea8d4b772f5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6fd5fae21c02ed7bafd55e59f17ed26ab25f383330fd43d7220cc1c584f88101f19534e108fa2eb762d992d7f73a307011f589bd6c84d1fb5551db52e76672f3
|
|
7
|
+
data.tar.gz: aa9e90a632a41dd09033517f20afbb80b6b2169990365ea73a6d6bd0a457afb2fab17eb3260b3ac07698898e1b0226b215df88fb06c139e7bc236802c493e0fd
|
data/lib/specguard/rspec/cli.rb
CHANGED
|
@@ -225,9 +225,18 @@ module SpecGuard
|
|
|
225
225
|
#
|
|
226
226
|
# Under `--json` the count is not dropped, it MOVES: stdout carries one
|
|
227
227
|
# document and nothing else, and this line's number is that document's
|
|
228
|
-
# `summary.files`. The
|
|
229
|
-
#
|
|
230
|
-
#
|
|
228
|
+
# `summary.files`. The sentence branches by STREAM, not by content: the
|
|
229
|
+
# human renderer reads it on stdout, the json renderer on stderr, where
|
|
230
|
+
# diagnostics about the linter already live — the empty-selection
|
|
231
|
+
# warning is the precedent, SPGD-247 the doctrine. (SPGD-1134: this was
|
|
232
|
+
# an `elsif !json` suppression, which left a json run's selection
|
|
233
|
+
# unverifiable — the machine channel named neither its resolved base nor
|
|
234
|
+
# its untracked leg, so the bridge, which passes `--json`
|
|
235
|
+
# unconditionally, could only verify the diff ∪ untracked union by
|
|
236
|
+
# arithmetic on `summary.files`.) The warnings below are diagnostics
|
|
237
|
+
# about the linter rather than findings, so they stay on stderr exactly
|
|
238
|
+
# as they are — a run that selected nothing is still loud, in both
|
|
239
|
+
# renderers.
|
|
231
240
|
#
|
|
232
241
|
# The `--changed` count names its provenance: files can reach the
|
|
233
242
|
# selection through the untracked leg (`file_selector.rb`), and "changed
|
|
@@ -239,15 +248,24 @@ module SpecGuard
|
|
|
239
248
|
if selection.empty?
|
|
240
249
|
@stderr.puts "specguard-lint: warning: selected 0 spec files — #{empty_reason(selection)}"
|
|
241
250
|
@stderr.puts "specguard-lint: warning: #{selection.note}" if selection.note
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
@stdout.puts "specguard-lint: checked #{selection.count} spec file#{'s' unless selection.count == 1}" \
|
|
245
|
-
"#{" changed since #{selection.base}" if selection.mode == :changed}" \
|
|
246
|
-
"#{" under #{Dir.pwd}" if selection.mode == :all}" \
|
|
247
|
-
"#{" including #{untracked} untracked" if untracked.positive?}"
|
|
251
|
+
else
|
|
252
|
+
json ? @stderr.puts(selection_line(selection)) : @stdout.puts(selection_line(selection))
|
|
248
253
|
end
|
|
249
254
|
end
|
|
250
255
|
|
|
256
|
+
# The selection sentence, built at exactly one site and written by both
|
|
257
|
+
# renderers — only the stream differs. The human line is the contract
|
|
258
|
+
# of record; the json renderer printing the SAME bytes is what makes
|
|
259
|
+
# "the machine reads the provenance the human does" a property of the
|
|
260
|
+
# code rather than a promise two copies could drift apart on.
|
|
261
|
+
def selection_line(selection)
|
|
262
|
+
untracked = selection.mode == :changed ? selection.stats&.untracked.to_i : 0
|
|
263
|
+
"specguard-lint: checked #{selection.count} spec file#{'s' unless selection.count == 1}" \
|
|
264
|
+
"#{" changed since #{selection.base}" if selection.mode == :changed}" \
|
|
265
|
+
"#{" under #{Dir.pwd}" if selection.mode == :all}" \
|
|
266
|
+
"#{" including #{untracked} untracked" if untracked.positive?}"
|
|
267
|
+
end
|
|
268
|
+
|
|
251
269
|
# `:explicit` is absent by construction — an explicit Selection is only
|
|
252
270
|
# built from a non-empty file list, so it can never be empty.
|
|
253
271
|
def empty_reason(selection)
|
data/lib/specguard/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: specguard-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- specguard Agent
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|