data_redactor 0.7.0 → 0.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 136d8a6bfac2c1caf2f7628a23d5afb17a7afa8a5edb2346f836d007c3f65625
4
- data.tar.gz: 3df79f171c3e36c0c69192a69d20d020fbb5d84b3a214a5cd7de15f5302e2141
3
+ metadata.gz: 24e5a8c5434fa45e6465033d7a2792a94c0b8f0d9f3ff3ca49a3a6c3c6e4065b
4
+ data.tar.gz: dbe07535163dd1926ce11495aee8b8e2476eb0750a7b028c7af6a7428c6f39c5
5
5
  SHA512:
6
- metadata.gz: a281c6884c6e748ade3fe9b5c4528fe342105e67963335f02dcda94f5692d39a5d759b6e3a0cc08b88eebae1af00bd19f830accd248329e675a39f7d7c16f4c5
7
- data.tar.gz: 2f474edbc67f02a0558ceb3bd8c76a250c9e0d86be29c6dd5ebe542388a7c01f593450df77f9f0714c92c52becafb6002fbc27c8c379a2db1fb56d55fcedd3ff
6
+ metadata.gz: af2e9c869e54e7694eec166586f4baa3b16121c02f10f160db1a422ef9f6c87237ebab3c210bd950a4ab60551e3a6b32e8ccb0d2cfd695b90343cbbd5f8bd6a0
7
+ data.tar.gz: 9ac096890d738968525e50d3b0d5517f92886899176991ee3ee49a218398b5b47e470ff46b4c41fa458bc3a265f0069aaef2b4010e1296708e2470b7d8638b83
data/CHANGELOG.md CHANGED
@@ -7,6 +7,61 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.7.2] - 2026-05-09
11
+
12
+ **Supersedes 0.7.1, which has been yanked from RubyGems.**
13
+
14
+ 0.7.1 had a release pipeline bug: the source gem and the precompiled native
15
+ gems were published by two independent workflows, with no gating between
16
+ them. When the native-binary builds failed (`oxidize-rb/actions/cross-gem`
17
+ couldn't pull `rbsys/aarch64-linux:0.9.128` from Docker Hub), the source
18
+ gem still published — leaving users with release notes that promised
19
+ precompiled binaries that didn't exist on RubyGems. 0.7.2 ships the same
20
+ features as 0.7.1 plus the pipeline fix.
21
+
22
+ ### Changed
23
+ - **Atomic release pipeline.** Source-gem publishing moved out of `ci.yml`
24
+ and into `release-binaries.yml`, alongside the native-gem builds. The
25
+ publish job now `needs: [build-source, build-native]`; if any native
26
+ platform fails to build, **nothing publishes**. This guarantees the
27
+ RubyGems release matches what the GitHub release notes promise.
28
+ - **Direct `rake-compiler-dock` invocation in CI** instead of the
29
+ `oxidize-rb/actions/cross-gem` action. Same code path as `rake gem:all`
30
+ locally and the existing PR-time smoke test in `ci.yml`. Uses
31
+ `ghcr.io/rake-compiler/*` images (no Docker Hub rate limits).
32
+
33
+ ### Fixed
34
+ - All 6 precompiled native gems now actually publish on release — the
35
+ `aarch64-linux` variant in particular was previously failing.
36
+
37
+ ### Documentation
38
+ - README installation section rewritten around the user's question
39
+ ("what changes for me?"). Adds explicit Docker / Alpine guidance and a
40
+ heads-up about `bundle lock --add-platform` for cross-platform deploys.
41
+
42
+ ## [0.7.1] - 2026-05-09 [YANKED]
43
+
44
+ ### Added
45
+ - **Precompiled native gems** for the most common platforms — installing
46
+ `data_redactor` no longer requires a C toolchain on these targets:
47
+ - `x86_64-linux`, `aarch64-linux` (glibc)
48
+ - `x86_64-linux-musl`, `aarch64-linux-musl` (Alpine)
49
+ - `x86_64-darwin`, `arm64-darwin` (macOS Intel + Apple Silicon)
50
+ Each native gem ships compiled `.so` files for Ruby 3.1, 3.2, 3.3, and 3.4.
51
+ Bundler/RubyGems automatically picks the right gem for the host; users on
52
+ any other platform fall back to the source gem and compile as before.
53
+ - `rake gem:all` task — builds every native gem locally via `rake-compiler-dock`
54
+ (requires Docker). Single command to regenerate the full release matrix.
55
+ - `.github/workflows/release-binaries.yml` — builds & publishes all native
56
+ gems on every GitHub release. Also exposes `workflow_dispatch` so a
57
+ maintainer can rebuild any past release without cutting a new tag.
58
+
59
+ ### Changed
60
+ - CI test matrix now includes Ruby 3.4 in addition to 3.1, 3.2, 3.3.
61
+ - Gemspec: added `rake-compiler-dock` as a development dependency. Source-only
62
+ gem size is unchanged — native gems strip `ext/` and the `extconf.rb`
63
+ extension hook so they only carry the prebuilt `.so` files.
64
+
10
65
  ## [0.7.0] - 2026-05-08
11
66
 
12
67
  ### Added
@@ -106,7 +161,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
106
161
  - `DataRedactor.redact(text)` module function returning the input with every match replaced by `[REDACTED]`.
107
162
  - RSpec suite with one example per pattern.
108
163
 
109
- [Unreleased]: https://github.com/danielefrisanco/data_redactor/compare/v0.7.0...HEAD
164
+ [Unreleased]: https://github.com/danielefrisanco/data_redactor/compare/v0.7.2...HEAD
165
+ [0.7.2]: https://github.com/danielefrisanco/data_redactor/compare/v0.7.1...v0.7.2
166
+ [0.7.1]: https://github.com/danielefrisanco/data_redactor/compare/v0.7.0...v0.7.1
110
167
  [0.7.0]: https://github.com/danielefrisanco/data_redactor/compare/v0.6.1...v0.7.0
111
168
  [0.6.1]: https://github.com/danielefrisanco/data_redactor/compare/v0.6.0...v0.6.1
112
169
  [0.6.0]: https://github.com/danielefrisanco/data_redactor/compare/v0.5.0...v0.6.0
@@ -1,4 +1,4 @@
1
1
  module DataRedactor
2
2
  # Current gem version. Follows {https://semver.org Semantic Versioning 2.0.0}.
3
- VERSION = "0.7.0"
3
+ VERSION = "0.7.2"
4
4
  end
data/readme.md CHANGED
@@ -294,16 +294,46 @@ redactor/
294
294
  ## Requirements
295
295
 
296
296
  - Ruby >= 2.7
297
- - A C compiler (`gcc` or `clang`)
298
- - POSIX `regex.h` (standard on Linux and macOS)
297
+ - A C compiler (`gcc` or `clang`) — only required when installing the source gem
298
+ - POSIX `regex.h` — only required when installing the source gem (standard on Linux and macOS)
299
299
 
300
- ## Setup
300
+ ## Installation
301
+
302
+ ```ruby
303
+ # Gemfile
304
+ gem "data_redactor"
305
+ ```
301
306
 
302
307
  ```bash
303
308
  bundle install
304
309
  ```
305
310
 
306
- ## Compile the C extension
311
+ That's it — there is nothing extra to configure for precompiled binaries. Bundler/RubyGems looks at your platform and Ruby version and picks the right gem automatically.
312
+
313
+ ### What you'll see
314
+
315
+ - **On a supported platform** (Linux glibc/musl, macOS Intel/ARM): bundler downloads a precompiled gem with the C extension already built. Install is near-instant — **no compiler, no `make`, no `regex.h` headers needed**. Especially valuable in slim Docker images (`ruby:3.x-alpine`, `ruby:3.x-slim`) that don't ship `gcc`.
316
+ - **On any other platform** (FreeBSD, OpenBSD, etc.): bundler downloads the source gem and compiles the C extension on install — the same behavior as before 0.7.1. You'll need a C compiler and POSIX `regex.h` available.
317
+
318
+ ### Supported precompiled targets
319
+
320
+ Each precompiled gem ships compiled binaries for Ruby 3.1, 3.2, 3.3, and 3.4.
321
+
322
+ | Platform | Targets |
323
+ |---|---|
324
+ | Linux (glibc) | `x86_64-linux`, `aarch64-linux` |
325
+ | Linux (musl / Alpine) | `x86_64-linux-musl`, `aarch64-linux-musl` |
326
+ | macOS | `x86_64-darwin` (Intel), `arm64-darwin` (Apple Silicon) |
327
+
328
+ ### Bundler-locked deploys
329
+
330
+ If your `Gemfile.lock` was generated on one platform but you deploy to another, run `bundle lock --add-platform <target>` so bundler resolves the right native gem at deploy time. Example for Alpine deploys built from a glibc dev box:
331
+
332
+ ```bash
333
+ bundle lock --add-platform x86_64-linux-musl aarch64-linux-musl
334
+ ```
335
+
336
+ ## Compile the C extension (source / development install only)
307
337
 
308
338
  ```bash
309
339
  bundle exec rake compile
@@ -311,6 +341,16 @@ bundle exec rake compile
311
341
 
312
342
  This runs `extconf.rb` via `rake-compiler`, which generates a `Makefile` and compiles `data_redactor.c` into a `.so` shared library placed under `lib/data_redactor/`.
313
343
 
344
+ ## Building precompiled gems locally
345
+
346
+ Maintainers can rebuild the full set of native gems with one command (requires Docker):
347
+
348
+ ```bash
349
+ bundle exec rake gem:all
350
+ ```
351
+
352
+ This invokes `rake-compiler-dock` to cross-compile every supported (platform × Ruby ABI) combination. Output lands in `pkg/`.
353
+
314
354
  ## Run the tests
315
355
 
316
356
  ```bash
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_redactor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniele Frisanco
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-05-09 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rake-compiler
@@ -24,6 +23,20 @@ dependencies:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
25
  version: '1.2'
26
+ - !ruby/object:Gem::Dependency
27
+ name: rake-compiler-dock
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '1.5'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '1.5'
27
40
  - !ruby/object:Gem::Dependency
28
41
  name: rspec
29
42
  requirement: !ruby/object:Gem::Requirement
@@ -108,7 +121,6 @@ metadata:
108
121
  changelog_uri: https://github.com/danielefrisanco/data_redactor/blob/main/CHANGELOG.md
109
122
  bug_tracker_uri: https://github.com/danielefrisanco/data_redactor/issues
110
123
  rubygems_mfa_required: 'true'
111
- post_install_message:
112
124
  rdoc_options: []
113
125
  require_paths:
114
126
  - lib
@@ -123,8 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
135
  - !ruby/object:Gem::Version
124
136
  version: '0'
125
137
  requirements: []
126
- rubygems_version: 3.5.22
127
- signing_key:
138
+ rubygems_version: 3.6.9
128
139
  specification_version: 4
129
140
  summary: Redact PII and secrets from strings before sending to AI or external services
130
141
  test_files: []