backspin 0.15.0 → 0.15.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34e60a632038ea59c7a0e95c64068032a5d3cf79584c99d622e36c6f5c610ec7
4
- data.tar.gz: 49c6fc2e2902dc796072c6032c96862abf2111ad1220bd327ecc615ddb50f388
3
+ metadata.gz: 075a4844c3bb93c3123497426d6f95e2cbc28b82b608f7bf5e6ff4968b4a5ff2
4
+ data.tar.gz: 60cfc30a385d234e330339d5cd70873b277af40a1c305b0781713f804b559190
5
5
  SHA512:
6
- metadata.gz: de757488de5502e56a41e9910d7e118e93bcb1e77ef93c79014d048d59c5ac83b01644dd67c5a61a10996aa5d3ee3f372f957672cafecddcf7af9e6a4c329843
7
- data.tar.gz: 805494ee3a1e0e40de7f3b1b05373d73d067798e0aed698989e5662d80ed6ef1d3b0af6a24bb6a3f1f3bc3a3affc609867c4b6daffe62c7291ee881b59499803
6
+ metadata.gz: 294564bdac99b664bf8a1ed078f67736db43ab389b314d7b9c482884826d5ef6021a359d1c4d3d31a137dd0b3df44616f61dddf5cdb47478fe79c128583e36e0
7
+ data.tar.gz: eaa2e5d9d5c121fe6672cf5c49eee8644c6462cf86fe49fbabca69d0bbb29ae5bac368b9fa0ae20f56f2437f0fc01e13c3b7e13662b1fdfb41530e5df3bbf546
data/.circleci/config.yml CHANGED
@@ -50,5 +50,5 @@ workflows:
50
50
  - test:
51
51
  matrix:
52
52
  parameters:
53
- ruby-version: ["3.2", "3.3", "3.4", "4.0"]
53
+ ruby-version: ["3.3", "3.4", "4.0"]
54
54
  - lint
@@ -21,4 +21,4 @@ jobs:
21
21
  uses: rsanheim/.github/.github/workflows/gem-release.yml@4ced52859dd60019b930a3f2023424e77b37ee2a
22
22
  with:
23
23
  gem: backspin
24
- ruby-version: "4.0.0"
24
+ ruby-version: "4.0.7"
data/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.15.1
4
+ * Drop ruby 3.2 support; housekeeping and dependency clean up;
3
5
  ## 0.15.0
4
6
  * Added `stdin:` to `Backspin.run` and `Backspin.compare` to pipe a String into the command, replacing `sh -c` wrappers. For `compare`, give a side as `{command:, stdin:}`. Stdin is saved on every snapshot like stdout and stderr (empty when not given), so re-recorded files gain a `stdin` line, but it is not compared.
5
7
  * Changed `Backspin.compare` to skip credential scrubbing, so filters, matchers, and diffs see raw output and scrubbing can no longer hide mismatches (generic patterns could turn different paths into identical star runs). `run` and `capture` still scrub.
data/CONTRIBUTING.md CHANGED
@@ -1,235 +1,36 @@
1
- # Contributing to Backspin
1
+ # Contributing
2
2
 
3
- Thank you for your interest in contributing to Backspin! This guide will help you get started with development and walk you through the contribution process.
4
-
5
- Note that Backspin is in early development and the API _will_ change before stabilizing at 1.0.
6
-
7
- ## Table of Contents
8
-
9
- - [Getting Started](#getting-started)
10
- - [Development Setup](#development-setup)
11
- - [Making Changes](#making-changes)
12
- - [Testing](#testing)
13
- - [Submitting Changes](#submitting-changes)
14
- - [Release Maintainer Setup](#release-maintainer-setup)
15
- - [Code Style](#code-style)
16
- - [Reporting Issues](#reporting-issues)
17
- - [Feature Requests](#feature-requests)
18
-
19
- ## Getting Started
20
-
21
- Backspin is a Ruby gem for characterization testing of command-line interfaces. It records and verifies CLI interactions by capturing stdout, stderr, and exit status from shell commands, similar to how VCR works for HTTP interactions.
22
-
23
- ### Prerequisites
24
-
25
- - Ruby 3.2, 3.3, 3.4, or 4.0
26
- - Bundler
27
- - Git
3
+ Ideas welcome. PRs cool. Just ensure your
4
+ Backspin is in early development and the API _will_ change before stabilizing at 1.0.
28
5
 
29
6
  ## Development Setup
30
7
 
31
- 1. Fork and clone the repository:
32
- ```bash
33
- git clone https://github.com/rsanheim/backspin.git
34
- cd backspin
35
- ```
36
-
37
- 2. Run the setup script:
38
- ```bash
39
- bin/setup
40
- ```
41
-
42
- 3. Run the full build (specs & standardrb linting) to ensure everything is working:
43
- ```bash
44
- bin/rake spec
45
- ```
46
-
47
- ## Making Changes
48
-
49
- ### Development Workflow
50
-
51
- 1. Create a feature branch:
52
- ```bash
53
- git checkout -b feature/your-feature-name
54
- ```
55
-
56
- 2. Make your changes following the project conventions
57
-
58
- 3. Run tests frequently:
59
- ```bash
60
- bin/rake spec
61
- ```
62
-
63
- 4. Run the linter:
64
- ```bash
65
- bin/rake standard
66
- ```
67
-
68
- 5. Commit your changes with clear, descriptive messages
69
-
70
- ### Architecture Overview
71
-
72
- **Core Components:**
73
-
74
- - **Backspin Module** (`lib/backspin.rb`)
75
- - Main API: `run` (direct command execution and block capture), `capture` (alias for block form)
76
- - Credential scrubbing logic
77
- - Configuration management
78
-
79
- - **Snapshot Class** (`lib/backspin/snapshot.rb`)
80
- - Represents a single execution snapshot
81
- - Stores: command type, args, env, stdout, stderr, status, recorded_at
82
-
83
- - **BackspinResult Class** (`lib/backspin/backspin_result.rb`)
84
- - Return object from `Backspin.run` / `Backspin.capture`
85
- - Exposes `actual` and `expected` snapshots plus verify details
86
-
87
- - **Record Class** (`lib/backspin/record.rb`)
88
- - Manages YAML record files
89
- - Handles record/verify sequencing
90
-
91
- ### Common Development Tasks
92
-
93
- #### Adding New Features
94
-
95
- 1. Write integration tests in `spec/backspin/`
96
- 2. Implement in appropriate module (usually `lib/backspin.rb`)
97
- 3. Update README.md if adding public API
98
- 4. Run the the full build
99
-
100
- #### Updating Credential Patterns
101
-
102
- - Add patterns to `DEFAULT_CREDENTIAL_PATTERNS` in `lib/backspin.rb`
103
- - Test with appropriate fixtures in specs
104
-
105
- #### Debugging Tests
106
-
107
- - Records are saved to `fixtures/backspin/` by default
108
- - Check YAML files to see recorded command outputs
109
-
110
- ## Testing
111
-
112
- ### Running Tests
113
-
114
8
  ```bash
115
- # Run all tests
9
+ git clone https://github.com/rsanheim/backspin.git
10
+ cd backspin
11
+ bin/setup
12
+ # run full build
116
13
  bin/rake spec
117
-
118
- # Run specific test file
119
- bundle exec rspec spec/backspin/record_spec.rb
120
-
121
- # Run specific test
122
- bundle exec rspec spec/backspin/record_spec.rb:42
123
14
  ```
124
15
 
125
- ### Writing Tests
126
-
127
- Backspin uses integration-focused tests that exercise the full stack. When writing tests:
128
-
129
- - Keep specs self-contained with their own setup, expectations, and cleanup
130
- - Avoid shared contexts or helpers that hide important test details
131
- - Use real shell commands (`echo`, `date`, etc.) for testing
132
- - Ensure configuration is reset between tests to avoid side effects
133
- - Verify new or updated test records in `fixtures/backspin/`
134
-
135
- Example test structure:
136
-
137
- ```ruby
138
- RSpec.describe "Feature name" do
139
- it "does something specific" do
140
- result = Backspin.run(["echo", "hello"], name: "my_test_record")
141
-
142
- expect(result.actual.stdout).to eq("hello\n")
143
- end
144
- end
145
- ```
146
-
147
- ## Submitting Changes
148
-
149
- ### Pull Request Process
150
-
151
- 1. Ensure all tests pass
152
- 2. Update documentation if needed
153
- 3. Add entries to CHANGELOG.md following the existing format
154
- 4. Push your branch and create a pull request
155
- 5. Provide a clear description of your changes
156
- 6. Link any related issues
157
-
158
- ### Pull Request Guidelines
159
-
160
- - Keep changes focused and atomic
161
- - Include tests for new functionality
162
- - Update examples in README.md if changing public APIs
163
- - Ensure CI passes (tests against Ruby 3.2, 3.3, 3.4, and 4.0)
164
-
165
16
  ## Release Maintainer Setup
166
17
 
167
18
  Setup, trusted publishing, workflow updates, verification, and recovery live in
168
19
  [the shared release guide](https://github.com/rsanheim/.github#readme).
169
20
 
170
- Backspin quick reference:
171
-
172
- 1. Update `lib/backspin/version.rb` and add matching notes to `CHANGELOG.md`.
173
- 2. Synchronize Backspin's version in `Gemfile.lock` and
174
- `fixtures/projects/dummy_cli_gem/Gemfile.lock` (including its checksum entry).
175
- 3. Run the normal checks and `BUNDLE_FROZEN=true bundle exec rake build`.
176
- 4. Merge the reviewed PR to `main` to publish.
177
-
178
- The caller is [`.github/workflows/release.yml`](.github/workflows/release.yml).
179
-
180
- ## Code Style
181
-
182
- Backspin uses [Standard Ruby](https://github.com/standardrb/standard) for code formatting. Run the linter before committing:
183
-
184
- ```bash
185
- bin/rake standard
186
- ```
187
-
188
- To automatically fix issues:
189
-
190
- ```bash
191
- bin/rake standard:fix
192
- ```
193
-
194
21
  ## Reporting Issues
195
22
 
196
23
  ### Bug Reports
197
24
 
198
25
  When reporting bugs, please include *full logs* including:
199
26
 
200
- 1. Ruby version (`ruby -v`) and ruby version manager info
27
+ 1. full ruby version (`ruby -v`)
201
28
  2. Backspin version
202
- 3. Minimal reproduction code
29
+ 3. reproduction code
203
30
  4. Expected behavior vs actual behavior
204
31
  5. Full error messages and stack traces
205
- 6. Relevant YAML record files (sanitized of sensitive data)
206
-
207
- ### Security Issues
208
-
209
- For security vulnerabilities, please email the maintainers directly rather than opening a public issue.
210
-
211
- ## Feature Requests
212
-
213
- We welcome feature requests! When proposing new features:
214
-
215
- 1. Check existing issues to avoid duplicates
216
- 2. Describe the use case and motivation
217
- 3. Provide code examples of how the feature would work
218
- 4. Be open to discussion and alternative approaches
219
-
220
- ## Additional Resources
221
-
222
- - [Project README](README.md)
223
- - [CLAUDE.md](CLAUDE.md) - AI assistant guidance
224
- - [RSpec Documentation](https://rspec.info/)
225
- - [Standardrb linting](https://github.com/standardrb/standard)
32
+ 6. Relevant YAML record files if applicable (sanitized of sensitive data)
226
33
 
227
34
  ## Questions?
228
35
 
229
- If you have questions about contributing, feel free to:
230
-
231
- - Open an issue for discussion
232
- - Check existing issues and pull requests
233
- - Review the test suite for examples
234
-
235
- Thank you for contributing to Backspin!
36
+ If you have questions about contributing, feel free to open an issue and holler
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- backspin (0.15.0)
4
+ backspin (0.15.1)
5
5
  logger
6
6
 
7
7
  GEM
@@ -9,11 +9,11 @@ GEM
9
9
  specs:
10
10
  ast (2.4.3)
11
11
  diff-lcs (1.6.2)
12
- json (2.21.1)
12
+ json (3.0.2)
13
13
  language_server-protocol (3.17.0.6)
14
14
  lint_roller (1.1.0)
15
15
  logger (1.7.0)
16
- parallel (1.28.0)
16
+ parallel (2.3.0)
17
17
  parser (3.3.12.0)
18
18
  ast (~> 2.4.1)
19
19
  racc
@@ -21,7 +21,7 @@ GEM
21
21
  racc (1.8.1)
22
22
  rainbow (3.1.1)
23
23
  rake (13.4.2)
24
- regexp_parser (2.12.0)
24
+ regexp_parser (2.13.1)
25
25
  rspec (3.13.2)
26
26
  rspec-core (~> 3.13.0)
27
27
  rspec-expectations (~> 3.13.0)
@@ -35,8 +35,8 @@ GEM
35
35
  diff-lcs (>= 1.2.0, < 2.0)
36
36
  rspec-support (~> 3.13.0)
37
37
  rspec-support (3.13.7)
38
- rubocop (1.88.2)
39
- json (~> 2.3)
38
+ rubocop (1.91.0)
39
+ json (>= 2.3)
40
40
  language_server-protocol (~> 3.17.0.2)
41
41
  lint_roller (~> 1.1.0)
42
42
  parallel (>= 1.10)
@@ -54,10 +54,10 @@ GEM
54
54
  rubocop (>= 1.75.0, < 2.0)
55
55
  rubocop-ast (>= 1.47.1, < 2.0)
56
56
  ruby-progressbar (1.13.0)
57
- standard (1.56.0)
57
+ standard (1.57.0)
58
58
  language_server-protocol (~> 3.17.0.2)
59
59
  lint_roller (~> 1.0)
60
- rubocop (~> 1.88.0)
60
+ rubocop (~> 1.91.0)
61
61
  standard-custom (~> 1.0.0)
62
62
  standard-performance (~> 1.8)
63
63
  standard-custom (1.0.2)
@@ -67,13 +67,15 @@ GEM
67
67
  lint_roller (~> 1.1)
68
68
  rubocop-performance (~> 1.26.0)
69
69
  timecop (0.9.11)
70
- unicode-display_width (3.2.0)
71
- unicode-emoji (~> 4.1)
72
- unicode-emoji (4.2.0)
70
+ unicode-display_width (3.3.0)
71
+ unicode-emoji (~> 4.3)
72
+ unicode-emoji (4.3.0)
73
73
 
74
74
  PLATFORMS
75
+ aarch64-linux
75
76
  arm64-darwin-24
76
77
  ruby
78
+ x86_64-linux
77
79
 
78
80
  DEPENDENCIES
79
81
  backspin!
@@ -83,4 +85,4 @@ DEPENDENCIES
83
85
  timecop (~> 0.9)
84
86
 
85
87
  BUNDLED WITH
86
- 4.0.16
88
+ 4.0.22
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Backspin
4
- VERSION = "0.15.0"
4
+ VERSION = "0.15.1"
5
5
  end
data/mise.toml CHANGED
@@ -1,3 +1,3 @@
1
1
  [tools]
2
- ruby = "4.0.0"
2
+ ruby = "4.0.7"
3
3
  "github:rsanheim/plur" = { version = "latest", minimum_release_age = "0s" }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backspin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Sanheim
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  - !ruby/object:Gem::Version
107
107
  version: '0'
108
108
  requirements: []
109
- rubygems_version: 4.0.3
109
+ rubygems_version: 4.0.20
110
110
  specification_version: 4
111
111
  summary: Record and replay CLI interactions for testing
112
112
  test_files: []