Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not copying Folio factories to main app, just add them to lookup #143

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

foton
Copy link
Contributor

@foton foton commented Nov 2, 2022

Oprava pár drobností na které jsem narazil při vývoji a
vypuštění kopírování factories do hlavní aplikace. Místo toho se jen přidají (z Folia) do cest pro hledání factories.
Takže zůstanou tam kam patří (Folio), ale dají se použít i z hlavní aplikace (resp jejích testů).

@foton foton requested a review from mreq November 2, 2022 08:58
@foton foton self-assigned this Nov 2, 2022
@foton foton changed the title Not copying Folio factories to main app, just add them to lookup WIP: Not copying Folio factories to main app, just add them to lookup Nov 2, 2022
@foton foton changed the title WIP: Not copying Folio factories to main app, just add them to lookup Not copying Folio factories to main app, just add them to lookup Nov 2, 2022
Copy link
Member

@mreq mreq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nerozumim motivaci pro cely tenhle PR. Co je spatne na tom, ze se volaji folio factories ve factories souboru v projektu? Tech pripadu tam muze byt vic, napr.

require_relative Folio::Engine.root.join("test/factories")
require_relative Boutique::Engine.root.join("test/factories")

require 'factory_bot_rails'
rescue LoadError
end

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proc begin/rescue a proc ne jen v test env?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ne v každém projektu nutně máme factory_bot_rails

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Například Folio mělo do teď jen factory_bot (viz změny v gemspecu)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

V kazdem projektu s foliem a s factories ale ano, nebo ne?

@@ -87,7 +87,6 @@ def copy_templates
"db/migrate/20220214083648_rm_private_attachments_mime_type_column.rb",
"lib/tasks/developer_tools.rake",
"public/maintenance.html",
"test/factories.rb",
"test/test_helper.rb",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@foton Takhle tam ale ten soubor vubec nevznikne. Soubor tam chceme.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ano, to je to kopírování,, které se snažím nahradit linkováním.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Takhle to ale zustalo v templates. Radeji nez vyhazovat odsud bych upravil ten soubor. Abych ho nemusel v novem projektu zakladat.

app/models/folio/user.rb Show resolved Hide resolved
app/models/folio/site.rb Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants