backspin 0.4.0 → 0.4.2
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/.gem_release.yml +13 -0
- data/CHANGELOG.md +5 -7
- data/CLAUDE.md +7 -3
- data/CONTRIBUTING.md +2 -2
- data/Gemfile +3 -1
- data/Gemfile.lock +3 -1
- data/MATCH_ON_USAGE.md +110 -0
- data/README.md +7 -2
- data/Rakefile +5 -1
- data/backspin.gemspec +6 -3
- data/examples/match_on_example.rb +116 -0
- data/fixtures/backspin/all_and_fields.yml +15 -0
- data/fixtures/backspin/all_bypass_equality.yml +14 -0
- data/fixtures/backspin/all_checks_equality.yml +17 -0
- data/fixtures/backspin/all_for_logging.yml +13 -0
- data/fixtures/backspin/all_matcher_basic.yml +14 -0
- data/fixtures/backspin/all_matcher_custom.yml +17 -0
- data/fixtures/backspin/all_matcher_demo.yml +14 -0
- data/fixtures/backspin/all_matcher_test.yml +14 -0
- data/fixtures/backspin/all_mode_filter.yml +14 -0
- data/fixtures/backspin/all_no_short_circuit.yml +14 -0
- data/fixtures/backspin/all_pass_field_fail.yml +14 -0
- data/fixtures/backspin/all_short_circuit.yml +14 -0
- data/fixtures/backspin/all_skips_equality.yml +17 -0
- data/fixtures/backspin/all_with_equality.yml +17 -0
- data/fixtures/backspin/all_with_fields.yml +17 -0
- data/fixtures/backspin/combined_fail_demo.yml +14 -0
- data/fixtures/backspin/combined_matcher_demo.yml +14 -0
- data/fixtures/backspin/credential_filter.yml +18 -0
- data/fixtures/backspin/echo_hello.yml +14 -0
- data/fixtures/backspin/echo_verify.yml +14 -0
- data/fixtures/backspin/episodes_filter.yml +26 -0
- data/fixtures/backspin/failure_test.yml +14 -0
- data/fixtures/backspin/field_matcher_demo.yml +17 -0
- data/fixtures/backspin/field_matcher_values.yml +14 -0
- data/fixtures/backspin/full_data_filter.yml +17 -0
- data/fixtures/backspin/key_confusion_test.yml +14 -0
- data/fixtures/backspin/match_on_any_fail.yml +21 -0
- data/fixtures/backspin/match_on_bad_format.yml +14 -0
- data/fixtures/backspin/match_on_fail.yml +15 -0
- data/fixtures/backspin/match_on_invalid.yml +14 -0
- data/fixtures/backspin/match_on_multiple.yml +28 -0
- data/fixtures/backspin/match_on_nil.yml +14 -0
- data/fixtures/backspin/match_on_other_fields.yml +23 -0
- data/fixtures/backspin/match_on_run_bang.yml +16 -0
- data/fixtures/backspin/match_on_run_bang_fail.yml +15 -0
- data/fixtures/backspin/match_on_single.yml +17 -0
- data/fixtures/backspin/mixed_calls.yml +24 -0
- data/fixtures/backspin/multi_command.yml +34 -0
- data/fixtures/backspin/multi_command_filter.yml +26 -0
- data/fixtures/backspin/multi_field_filter.yml +13 -0
- data/fixtures/backspin/multi_system.yml +20 -0
- data/fixtures/backspin/nil_filter.yml +14 -0
- data/fixtures/backspin/none_mode_test.yml +14 -0
- data/fixtures/backspin/path_test.yml +17 -0
- data/fixtures/backspin/playback_system.yml +12 -0
- data/fixtures/backspin/playback_test.yml +14 -0
- data/fixtures/backspin/stderr_test.yml +19 -0
- data/fixtures/backspin/string_symbol_test.yml +14 -0
- data/fixtures/backspin/system_echo.yml +12 -0
- data/fixtures/backspin/system_false.yml +18 -0
- data/fixtures/backspin/timestamp_test.yml +18 -0
- data/fixtures/backspin/use_record_filter.yml +15 -0
- data/fixtures/backspin/verify_system.yml +12 -0
- data/fixtures/backspin/verify_system_diff.yml +11 -0
- data/fixtures/backspin/version_test.yml +14 -0
- data/lib/backspin/command.rb +1 -5
- data/lib/backspin/command_diff.rb +98 -16
- data/lib/backspin/command_result.rb +2 -4
- data/lib/backspin/record.rb +31 -10
- data/lib/backspin/record_result.rb +20 -14
- data/lib/backspin/recorder.rb +100 -55
- data/lib/backspin/version.rb +3 -1
- data/lib/backspin.rb +36 -175
- data/release.rake +97 -0
- data/script/lint +6 -0
- metadata +79 -5
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- echo
|
8
|
+
- "'My"
|
9
|
+
- API
|
10
|
+
- key
|
11
|
+
- is
|
12
|
+
- "********************'"
|
13
|
+
stdout: 'MY API KEY IS ********************
|
14
|
+
|
15
|
+
'
|
16
|
+
stderr: ''
|
17
|
+
status: 0
|
18
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- echo
|
8
|
+
- "'episode"
|
9
|
+
- 1'
|
10
|
+
stdout: 'EPISODE 1
|
11
|
+
|
12
|
+
'
|
13
|
+
stderr: ''
|
14
|
+
status: 0
|
15
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
16
|
+
- command_type: Open3::Capture3
|
17
|
+
args:
|
18
|
+
- echo
|
19
|
+
- "'episode"
|
20
|
+
- 2'
|
21
|
+
stdout: 'EPISODE 2
|
22
|
+
|
23
|
+
'
|
24
|
+
stderr: ''
|
25
|
+
status: 0
|
26
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-06-10T11:02:02-05:00'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- sh
|
8
|
+
- "-c"
|
9
|
+
- echo 'output'; echo 'error' >&2; exit 42
|
10
|
+
stdout: 'output
|
11
|
+
|
12
|
+
'
|
13
|
+
stderr: 'error
|
14
|
+
|
15
|
+
'
|
16
|
+
status: 42
|
17
|
+
recorded_at: '2025-06-10T11:02:02-05:00'
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- bash
|
8
|
+
- "-c"
|
9
|
+
- echo 'stdout message' && echo 'stderr message' >&2 && exit 42
|
10
|
+
stdout: 'stdout message
|
11
|
+
|
12
|
+
'
|
13
|
+
stderr: 'stderr message
|
14
|
+
|
15
|
+
'
|
16
|
+
status: 42
|
17
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-06-10T11:00:27-05:00'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- echo
|
8
|
+
- first output
|
9
|
+
stdout: 'first output
|
10
|
+
|
11
|
+
'
|
12
|
+
stderr: ''
|
13
|
+
status: 0
|
14
|
+
recorded_at: '2025-06-10T11:00:27-05:00'
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- sh
|
8
|
+
- "-c"
|
9
|
+
- "'echo"
|
10
|
+
- good;
|
11
|
+
- echo
|
12
|
+
- bad
|
13
|
+
- ">&2'"
|
14
|
+
stdout: 'good
|
15
|
+
|
16
|
+
'
|
17
|
+
stderr: 'bad
|
18
|
+
|
19
|
+
'
|
20
|
+
status: 0
|
21
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- echo
|
8
|
+
- "'Version:"
|
9
|
+
- 1.2.3'
|
10
|
+
stdout: 'Version: 1.2.3
|
11
|
+
|
12
|
+
'
|
13
|
+
stderr: ''
|
14
|
+
status: 0
|
15
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,28 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- sh
|
8
|
+
- "-c"
|
9
|
+
- "'echo"
|
10
|
+
- "\"User:"
|
11
|
+
- alice@example.com";
|
12
|
+
- echo
|
13
|
+
- "\"Error:"
|
14
|
+
- Connection
|
15
|
+
- timeout
|
16
|
+
- at
|
17
|
+
- 10:30:00"
|
18
|
+
- ">&2;"
|
19
|
+
- exit
|
20
|
+
- 1'
|
21
|
+
stdout: 'User: alice@example.com
|
22
|
+
|
23
|
+
'
|
24
|
+
stderr: 'Error: Connection timeout at 10:30:00
|
25
|
+
|
26
|
+
'
|
27
|
+
status: 1
|
28
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,23 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- sh
|
8
|
+
- "-c"
|
9
|
+
- "'echo"
|
10
|
+
- output;
|
11
|
+
- echo
|
12
|
+
- error
|
13
|
+
- ">&2;"
|
14
|
+
- exit
|
15
|
+
- 1'
|
16
|
+
stdout: 'output
|
17
|
+
|
18
|
+
'
|
19
|
+
stderr: 'error
|
20
|
+
|
21
|
+
'
|
22
|
+
status: 1
|
23
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,16 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- echo
|
8
|
+
- "'Process"
|
9
|
+
- 'ID:'
|
10
|
+
- 12345'
|
11
|
+
stdout: 'Process ID: 12345
|
12
|
+
|
13
|
+
'
|
14
|
+
stderr: ''
|
15
|
+
status: 0
|
16
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- echo
|
8
|
+
- "'Status:"
|
9
|
+
- OK'
|
10
|
+
stdout: 'Status: OK
|
11
|
+
|
12
|
+
'
|
13
|
+
stderr: ''
|
14
|
+
status: 0
|
15
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- echo
|
8
|
+
- "'Current"
|
9
|
+
- 'time:'
|
10
|
+
- '2025-01-06'
|
11
|
+
- 10:00:00'
|
12
|
+
stdout: 'Current time: 2025-01-06 10:00:00
|
13
|
+
|
14
|
+
'
|
15
|
+
stderr: ''
|
16
|
+
status: 0
|
17
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Kernel::System
|
6
|
+
args:
|
7
|
+
- echo
|
8
|
+
- from
|
9
|
+
- system
|
10
|
+
stdout: ''
|
11
|
+
stderr: ''
|
12
|
+
status: 0
|
13
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
14
|
+
- command_type: Open3::Capture3
|
15
|
+
args:
|
16
|
+
- echo
|
17
|
+
- from
|
18
|
+
- capture3
|
19
|
+
stdout: 'from capture3
|
20
|
+
|
21
|
+
'
|
22
|
+
stderr: ''
|
23
|
+
status: 0
|
24
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,34 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- echo
|
8
|
+
- first
|
9
|
+
stdout: 'first
|
10
|
+
|
11
|
+
'
|
12
|
+
stderr: ''
|
13
|
+
status: 0
|
14
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
15
|
+
- command_type: Open3::Capture3
|
16
|
+
args:
|
17
|
+
- echo
|
18
|
+
- second
|
19
|
+
stdout: 'second
|
20
|
+
|
21
|
+
'
|
22
|
+
stderr: ''
|
23
|
+
status: 0
|
24
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
25
|
+
- command_type: Open3::Capture3
|
26
|
+
args:
|
27
|
+
- echo
|
28
|
+
- third
|
29
|
+
stdout: 'third
|
30
|
+
|
31
|
+
'
|
32
|
+
stderr: ''
|
33
|
+
status: 0
|
34
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- echo
|
8
|
+
- "'Count:"
|
9
|
+
- 42'
|
10
|
+
stdout: 'Count: X
|
11
|
+
|
12
|
+
'
|
13
|
+
stderr: ''
|
14
|
+
status: 0
|
15
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
16
|
+
- command_type: Open3::Capture3
|
17
|
+
args:
|
18
|
+
- echo
|
19
|
+
- "'Total:"
|
20
|
+
- 100'
|
21
|
+
stdout: 'Total: X
|
22
|
+
|
23
|
+
'
|
24
|
+
stderr: ''
|
25
|
+
status: 0
|
26
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,13 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- bash
|
8
|
+
- "-c"
|
9
|
+
- echo 'out' && echo 'err' >&2 && exit 1
|
10
|
+
stdout: modified stdout
|
11
|
+
stderr: modified stderr
|
12
|
+
status: 0
|
13
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Kernel::System
|
6
|
+
args:
|
7
|
+
- echo
|
8
|
+
- first
|
9
|
+
stdout: ''
|
10
|
+
stderr: ''
|
11
|
+
status: 0
|
12
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
13
|
+
- command_type: Kernel::System
|
14
|
+
args:
|
15
|
+
- echo
|
16
|
+
- second
|
17
|
+
stdout: ''
|
18
|
+
stderr: ''
|
19
|
+
status: 0
|
20
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- echo
|
8
|
+
- "'File"
|
9
|
+
- saved
|
10
|
+
- to
|
11
|
+
- "/Users/testuser/project/output.txt'"
|
12
|
+
stdout: 'File saved to PROJECT_ROOT/output.txt
|
13
|
+
|
14
|
+
'
|
15
|
+
stderr: ''
|
16
|
+
status: 0
|
17
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- sh
|
8
|
+
- "-c"
|
9
|
+
- "'echo"
|
10
|
+
- error
|
11
|
+
- ">&2;"
|
12
|
+
- exit
|
13
|
+
- 1'
|
14
|
+
stdout: ''
|
15
|
+
stderr: 'error
|
16
|
+
|
17
|
+
'
|
18
|
+
status: 1
|
19
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-06-10T11:00:57-05:00'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- echo
|
8
|
+
- test output
|
9
|
+
stdout: 'test output
|
10
|
+
|
11
|
+
'
|
12
|
+
stderr: ''
|
13
|
+
status: 0
|
14
|
+
recorded_at: '2025-06-10T11:00:57-05:00'
|
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Kernel::System
|
6
|
+
args:
|
7
|
+
- 'true'
|
8
|
+
stdout: ''
|
9
|
+
stderr: ''
|
10
|
+
status: 0
|
11
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
12
|
+
- command_type: Kernel::System
|
13
|
+
args:
|
14
|
+
- 'false'
|
15
|
+
stdout: ''
|
16
|
+
stderr: ''
|
17
|
+
status: 1
|
18
|
+
recorded_at: '2025-05-01T12:00:00Z'
|
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
first_recorded_at: '2025-05-01T12:00:00Z'
|
3
|
+
format_version: '2.0'
|
4
|
+
commands:
|
5
|
+
- command_type: Open3::Capture3
|
6
|
+
args:
|
7
|
+
- echo
|
8
|
+
- "'Test"
|
9
|
+
- run
|
10
|
+
- at
|
11
|
+
- '2024-01-15'
|
12
|
+
- 10:30:45'
|
13
|
+
stdout: 'Test run at TIMESTAMP
|
14
|
+
|
15
|
+
'
|
16
|
+
stderr: ''
|
17
|
+
status: 0
|
18
|
+
recorded_at: '2025-05-01T12:00:00Z'
|