janjiss / rom_factory Goto Github PK
View Code? Open in Web Editor NEWFactoryGirl like builder for ROM
License: MIT License
FactoryGirl like builder for ROM
License: MIT License
Hey, first of all - thank you for kick-starting this project. We're using it at Icelab, and it's been helpful. I started making some tweaks and improvements, and started wondering if you'd be interested in moving this project over to rom-rb organization, so that we can work on it together and increase its visibility. This is a crucial part of the stack and it'd be good to have it as an official gem in the org, and so that we can develop it faster.
Here's roughly what I'm thinking about in terms of improvements:
WDYT?
It would be a good idea to support ROM Mappers for entities.
So, when you do:
let(:user) { RomFactory::Builder.create(:user) }
it returns a new User instead of a RomFactory::Struct
. What do you think @janjiss ?
Hi, is aggregate creation supported ?
Thanks!
It will be awesome to have a rake or generator task that sets the rom_factory basic configuration, like:
Create -> ../config/initializers/rom_factory.rb
Inside it, for example Hanami setup:
RomFactory::Config.configure do |config|
config.container = Hanami::Repository.container
end
Create -> ../spec/rom_factories/
Command line, something like:
% rake rom_factory:install hanami(whatever framework)
% hanami(whatever framework) generator rom_factory
When creating a rom factory definition, will be great to place it inside files and organize them into a directory like FactorGirl does.
../spec/factories/
-users.rb
-clients.rb
Actual result: Place rom factory definition inside the spec file
Expected result: Place rom factory in a file inside a tree directory structure.
When creating a factory it should take on a default value to created_at and updated_at attributes.
Actual Result: Sequel::NotNullConstraintViolation: PG::NotNullViolation: ERROR: null value in column "created_at" violates not-null constraint
Expected Result: set "created_at" column with current DateTime automatically.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.