astroturf 0.1.0 → 0.1.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: 79d39987b44a757f2689d900dd7256baef7b9d95a3206bf33384b84d57c84b9a
4
- data.tar.gz: '004561878c96134cdfe94faf12bfb503985aa941e608e353b6a055f8d39073dc'
3
+ metadata.gz: 0c840afa6051a6e128fd5e66f56e5dc19e57da9e0d9258985b1f3c326fcbcb52
4
+ data.tar.gz: d13ba6b04700248f94a6e0d68f7fa04e7a5ed611623d90a061de95b53c6bfe73
5
5
  SHA512:
6
- metadata.gz: 49b5b8e9dba709aaef0bb233a04a0be9d97feac081a59a139a193b915a7b300316dfd39d5440469a12d568ac3052093f7eb9ff5930729c262f8fa9592d072dc4
7
- data.tar.gz: 1d660ba73e13a93ea2c385815a7ea8283093aac4329bd5321b5b4b77d779caa5ebe523b50a72b94f23ae1b6d951ab4762f6d7ef8ba5de6d9cd10eb2647ec4965
6
+ metadata.gz: 5e69982ff8ae987fdb50b8e0ac46ed7f9bf9c764e30691dcf727be13c7311edadecc7bcc6370261a08d8df262437bbda236cd72030ceaa37237594f919898a40
7
+ data.tar.gz: f737ba2834e8765e25774945dc4c5efebd61524917a0d542b3a19e4103a14ab87e05edee7c5089a9e7e4504f7ce43a4749199c2f14b1a5cbb47d3b7245d65b1e
data/.gitignore CHANGED
@@ -1,6 +1,8 @@
1
1
  *.gem
2
2
  *.rbc
3
3
  /.config
4
+ .ruby-version
5
+ Gemfile.lock
4
6
  /coverage/
5
7
  /InstalledFiles
6
8
  /pkg/
data/.okf/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # OKF (Open Knowledge Format)
2
+
3
+ This directory maintains agent and developer architecture records, decision logs, and project knowledge for Astroturf.
4
+
5
+ ## Directory Structure
6
+
7
+ - `decisions/`: Architecture Decision Records (ADRs) tracking design choices, tradeoffs, and rationale.
@@ -0,0 +1,32 @@
1
+ # ADR 0001: Initial Architecture and Matrix Design
2
+
3
+ ## Context
4
+ When performing large-scale architectural refactors or AI-assisted system rewrites, existing test data strategies (such as manual fixtures or procedural factories) test only a sparse subset of happy-path states. Hidden edge cases (such as unhandled enum combinations, boolean permutations, or foreign key cascades) are frequently missed.
5
+
6
+ Astroturf was conceived to aim for total coverage of value and combination space through declarative YAML matrices.
7
+
8
+ ## Decisions
9
+
10
+ 1. **Pure Ruby In-Memory Hashes as Primary Representation**:
11
+ - Astroturf builds pure Ruby hashes first without requiring an active database connection or ActiveRecord dependency.
12
+ - Decoupling generation from ORM storage allows maximum generation speed and makes equivalence comparison straightforward.
13
+
14
+ 2. **Full Cartesian Product by Default**:
15
+ - Attribute dimensions are computed as full Cartesian products.
16
+ - For nested associations (`has_many`), the default mode is `:combinations`, providing each parent record with the full combination matrix of child records.
17
+ - An optional `:count` mode is supported when fixed cardinality is desired per parent.
18
+
19
+ 3. **Deterministic Fixture-Style Slug Labels**:
20
+ - Records receive semantic labels derived from entity names and matrix coordinates (e.g. `user_admin_active_true`).
21
+ - Labels make test failures and refactor diffs immediately diagnosable.
22
+
23
+ 4. **Pluggable Primary Key Strategies**:
24
+ - Supports monotonic integer sequences (`1, 2, 3...`) with configurable start/step offsets.
25
+ - Supports deterministic RFC 4122 UUIDv5 values generated from record labels to ensure consistency across runs.
26
+ - Supports custom callable procs.
27
+
28
+ 5. **Self-Contained Inflection**:
29
+ - Includes a lightweight `Astroturf::Inflector` for singular/plural/tableize conversions, avoiding a mandatory heavyweight dependency on ActiveSupport for basic usage.
30
+
31
+ 6. **Ruby 3.4/4.0 Compatibility**:
32
+ - Explicitly adds `ostruct` as a development dependency in the gemspec to prevent `LoadError` when Rake tasks run under modern Ruby environments where `ostruct` is a bundled gem.
data/astroturf.gemspec CHANGED
@@ -23,5 +23,6 @@ Gem::Specification.new do |spec|
23
23
  spec.require_paths = ["lib"]
24
24
 
25
25
  spec.add_development_dependency "minitest", "~> 5.0"
26
- spec.add_development_dependency "rake", "~> 12.0"
26
+ spec.add_development_dependency "rake", ">= 12.0"
27
+ spec.add_development_dependency "ostruct"
27
28
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Astroturf
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: astroturf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Lunt
@@ -27,16 +27,30 @@ dependencies:
27
27
  name: rake
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - "~>"
30
+ - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: '12.0'
33
33
  type: :development
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: '12.0'
40
+ - !ruby/object:Gem::Dependency
41
+ name: ostruct
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ type: :development
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
40
54
  description: Astroturf generates combinatorial synthetic data graphs in memory from
41
55
  declarative YAML matrix specifications.
42
56
  email:
@@ -46,6 +60,8 @@ extensions: []
46
60
  extra_rdoc_files: []
47
61
  files:
48
62
  - ".gitignore"
63
+ - ".okf/README.md"
64
+ - ".okf/decisions/0001-initial-architecture.md"
49
65
  - Gemfile
50
66
  - LICENSE.txt
51
67
  - README.md
@@ -82,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
98
  - !ruby/object:Gem::Version
83
99
  version: '0'
84
100
  requirements: []
85
- rubygems_version: 4.0.16
101
+ rubygems_version: 4.0.20
86
102
  specification_version: 4
87
103
  summary: Exhaustive synthetic data generator for Rails and Ruby applications
88
104
  test_files: []