Skip to content

Conversation

@cycomachead
Copy link

Hi @leafo,

Is there interest in supporting lapis projects which do not use Moonscript?
I have re-written this since the last PR, and thanks to the refactoring, it's now quite simple. :)

I was able to successfully use this for the following PR in our lapis app.
https://github.com/snap-cloud/snapCloud/pull/355/files#diff-536051a826b3ce1fdc058ac7368426038abf2f72a096067103c1ed7e82665ee0

I opted to be a little flexible with the declaration syntax or the model class local %w+ = Model:extend to insert the annotations. (I was going to strictly follow camelCase, but ran into one case where our variable name didn't exactly match the camelize function.) Of course, the does require you use local variables and not rename Model, but I think those are acceptable compromises.

I will re-add the docs if you think this is helpful.

Thanks!

if password = config.postgres.password
table.insert 1, command, "PGPASSWORD=#{shell_escape password}"
table.insert command, 1, "PGPASSWORD=#{shell_escape password}"
Copy link
Author

Choose a reason for hiding this comment

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

Probably should have made this a separate PR (happy to, if helpful) but this seems like a genuine typo. :)


-- TODO: this is kinda sloppy and only works with MoonScript
unless updated_source
-- TODO: this is kinda sloppy
Copy link
Author

Choose a reason for hiding this comment

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

I kept the comment for no particular reason, but edited to at least not be false. 🙃

Obviously, this could be more flexible, but it does seem to work fine for now.

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.

1 participant