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 +4 -4
- data/.gitignore +2 -0
- data/.okf/README.md +7 -0
- data/.okf/decisions/0001-initial-architecture.md +32 -0
- data/astroturf.gemspec +2 -1
- data/lib/astroturf/version.rb +1 -1
- metadata +20 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0c840afa6051a6e128fd5e66f56e5dc19e57da9e0d9258985b1f3c326fcbcb52
|
|
4
|
+
data.tar.gz: d13ba6b04700248f94a6e0d68f7fa04e7a5ed611623d90a061de95b53c6bfe73
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e69982ff8ae987fdb50b8e0ac46ed7f9bf9c764e30691dcf727be13c7311edadecc7bcc6370261a08d8df262437bbda236cd72030ceaa37237594f919898a40
|
|
7
|
+
data.tar.gz: f737ba2834e8765e25774945dc4c5efebd61524917a0d542b3a19e4103a14ab87e05edee7c5089a9e7e4504f7ce43a4749199c2f14b1a5cbb47d3b7245d65b1e
|
data/.gitignore
CHANGED
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", "
|
|
26
|
+
spec.add_development_dependency "rake", ">= 12.0"
|
|
27
|
+
spec.add_development_dependency "ostruct"
|
|
27
28
|
end
|
data/lib/astroturf/version.rb
CHANGED
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.
|
|
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.
|
|
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: []
|