Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

FastfileParser should implement a .to_json method. #8

Open
minuscorp opened this issue Mar 19, 2018 · 4 comments
Open

FastfileParser should implement a .to_json method. #8

minuscorp opened this issue Mar 19, 2018 · 4 comments

Comments

@minuscorp
Copy link
Contributor

Title says it all.

@KrauseFx
Copy link
Member

What for? :)

@minuscorp
Copy link
Contributor Author

So for peeking Fastfile configurations to the front-end, now I have to generate a custom json from the FastfileParser (such as sanitizing lanes with no platform, or functions being declared out of platform scope, pure ruby methods, etc). And pass it to the front end.

@KrauseFx
Copy link
Member

KrauseFx commented Mar 20, 2018

Wouldn't parser.all_lanes_flat.to_json be enough?

@minuscorp
Copy link
Contributor Author

minuscorp commented Mar 20, 2018

Except from when the platform is nil, that should've replaced for some recognizable key (for now I'm using :no_platform when platform is nil.
all_lanes_flat seems to be able to ignore actions out of a platform scope, but I don't know if that's something it should be like that (are we allowing to run lanes out of platform in CI?)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants