oaken 0.7.0 → 0.7.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/README.md +5 -0
- data/lib/generators/oaken/convert/fixtures_generator.rb +2 -2
- data/lib/oaken/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5de0c10ab76ddbee3960eda8a9cbf2c8a5b9e1065ded625761c3333a5e3682da
|
4
|
+
data.tar.gz: 42f27cb3adcc4c4d73d8267dcf7f1e30e0923b2773626001e4689fa166cd132d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f933b1ae38aa3b27cd9682282e64fa7e13f1818fa9133c90023d2d0addc5ed3f8f38fc9cac51e55b6b572db7b928fd1890ad4f25881f0c5c7391888dc42e12cc
|
7
|
+
data.tar.gz: 5cddcfc3d65ed8299bb15be1c716e0165bac2f35c4a885f7a80ae0eab1b83085b3883f8edd62df55cba182957a667186b5f6778b3a47d2debc15e4a465666956
|
data/README.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
Oaken is a new take on development and test data management for your Rails app. It blends the stability and storytelling from Fixtures with the dynamicness of FactoryBot/Fabricator.
|
4
4
|
|
5
|
+
> But seriously; Oaken is one of the single greatest tools I've added to my belt in the past year
|
6
|
+
>
|
7
|
+
> It's made cross-environment shared data, data prepping for demos, edge-case tests, and overall development much more reliable & shareable across a team
|
8
|
+
> [@tcannonfodder](https://github.com/tcannonfodder)
|
9
|
+
|
5
10
|
Fixtures are stable & help you build a story of how your app and its object graph exists along with edge cases, but the UX is unfortunately a nightmare.
|
6
11
|
To trace N associations, you have to open and read N different files — there's no way to group by scenario.
|
7
12
|
|
@@ -50,7 +50,7 @@ class Oaken::Convert::Fixture
|
|
50
50
|
when Array then input.map { recursive_convert _1 }.join(", ")
|
51
51
|
when Integer then input
|
52
52
|
else
|
53
|
-
if key == @referenced&.first
|
53
|
+
if key && key == @referenced&.first
|
54
54
|
@referenced.last == :plural ? "[#{input}]" : input
|
55
55
|
else
|
56
56
|
"\"#{input}\""
|
@@ -75,7 +75,7 @@ class Oaken::Convert::FixturesGenerator < Rails::Generators::Base
|
|
75
75
|
def parse
|
76
76
|
@fixtures = Dir.glob("test/fixtures/**/*.yml").to_h do |path|
|
77
77
|
model_name = path.delete_prefix("test/fixtures/").chomp(".yml")
|
78
|
-
[model_name, YAML.
|
78
|
+
[model_name, YAML.unsafe_load_file(path).presence&.map { Oaken::Convert::Fixture.new(model_name, _1, _2) }]
|
79
79
|
rescue Psych::SyntaxError
|
80
80
|
say "Skipped #{path} due to ERB content or other YAML parsing issues.", :yellow
|
81
81
|
end.tap(&:compact_blank!)
|
data/lib/oaken/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oaken
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kasper Timm Hansen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
requirements: []
|
56
|
-
rubygems_version: 3.5.
|
56
|
+
rubygems_version: 3.5.18
|
57
57
|
signing_key:
|
58
58
|
specification_version: 4
|
59
59
|
summary: Oaken aims to blend your Fixtures/Factories and levels up your database seeds.
|