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

Retrieve Tiered List of Supporters from OpenCollective API #1029

Merged

Conversation

r0ckarong
Copy link
Contributor

I can't for the life of me get awestruct to work on my Windows machine. The code itself was pretty easy but I wasted about half a day trying to set up the ruby env to see if my changes would actually look right but I failed. I will try this again tonight when I get home to my trusty Linux machines. They'll comply ... or else.

I tried adapting everything as simply as possible with as little changes as I could make. Please have a look.

@r0ckarong r0ckarong changed the title Supporters opencollective api Retrieve Tiered List of Supporters from OpenCollective API Sep 26, 2023
@r0ckarong
Copy link
Contributor Author

Oh great, the CI has some of the same problems installing the toolchain ... narf

@r0ckarong
Copy link
Contributor Author

r0ckarong commented Sep 26, 2023

I've gotten some version of the toolchain to work and now I'm banging my head against the SLIM format for awestruct.

@r0ckarong
Copy link
Contributor Author

I've managed to get the preview working but I'm still getting way too many errors:

Screenshot from 2023-09-26 22-09-34

I underestimated how much more complicated the processing in the template was than from my tests.
You're probably way faster adjusting this but feel free to reject the PR.

Preferrably with a pointer to a good example on how to do the template right 🙄

@mojavelinux
Copy link
Member

Preferrably with a pointer to a good example on how to do the template right

It appears that you had too much indentation on certain lines. Slim is very picky about indentation and will fail if it is wrong. It was the line with the a tag that had too much indentation.

@mojavelinux
Copy link
Member

I updated the script to work with the existing page template, aside from a few tweaks to clean it up.

@mojavelinux
Copy link
Member

As a next step, the supporters data should be generated when the site is built, or perhaps nightly. Otherwise, it constantly gets out of date. Let's track that in a separate enhancement.

@mojavelinux
Copy link
Member

I underestimated how much more complicated the processing in the template was than from my tests.

I think the main issue is your Ruby version. 2.4.0 is substantially out of date. I was successful using Ruby 2.7, which is documented in this file: https://github.com/asciidoctor/asciidoctor.org/blob/main/netlify.toml

@mojavelinux mojavelinux merged commit 00cf499 into asciidoctor:main Sep 27, 2023
4 checks passed
@r0ckarong
Copy link
Contributor Author

r0ckarong commented Sep 27, 2023

I underestimated how much more complicated the processing in the template was than from my tests.

I think the main issue is your Ruby version. 2.4.0 is substantially out of date. I was successful using Ruby 2.7, which is documented in this file: https://github.com/asciidoctor/asciidoctor.org/blob/main/netlify.toml

I used 2.4 because that's what it says in the README. I usually have 3.1.3 or higher.

$ rvm use 2.4 --create

@mojavelinux
Copy link
Member

Ah, that was just out of date (no surprise since we hardly ever touch this repository these days). I updated it to match what CI is using. When it doubt, use what CI is using because that's what we know works (assuming CI isn't failing).

@mojavelinux
Copy link
Member

Thanks for the head start to get this page switched over to data from OpenCollective! I've been meaning to do this for years.

@r0ckarong
Copy link
Contributor Author

Thanks for the head start to get this page switched over to data from OpenCollective! I've been meaning to do this for years.

Sometimes all it needs is someone with enough free time and curiosity to make enough of a mess so that you have to clean up :)
Glad I could help.

@r0ckarong r0ckarong deleted the supporters-opencollective-api branch September 27, 2023 08:18
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