-
Notifications
You must be signed in to change notification settings - Fork 0
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
Decouple the liquidvoting state object #85
Conversation
I directly poked the Gemfile.lock, to get things running while we wait for Decidim to step up to Rails 5.2.5.
We're moving Liquidvoting-specific functionality into the Decidim::Liquidvoting module. Logging needs be be added back in, coming with a new spec in next commit. I would rather call `super` in `Proposal#update_votes_count` but the method is not found, idkw. Specs are green.
Align with our anticipated gem name
This also introduces via stub a new API call :fetch_user_supported
This also exposes the fetch queries needed to build a state object on the client side
Finding if a user has voted or delegated is currently a brute-force filter of the whole LV result set. This commit 1) consolidates the mess into two ugly private methods that need to be redone with parameterized api calls, and 2) keeps the public method that delegates to the ugly privates.
Used this one, to pick up nokogiri and rake: bundle update mimemagic --conservative We're still not clean with our Gemfile.lock, waiting on a Decidim gem that solves mimemagic
I'm going to undraft this, but note the |
app/controllers/decidim/liquidvoting/proposal_vote_delegations_controller.rb
Show resolved
Hide resolved
Great work 👏 It's almost there.
Does 0.3.6 work? Because that's already merged on Decidim v0.24.0: decidim/decidim#7701 (see last item in https://github.com/decidim/decidim/releases/tag/v0.24.0) If so, then we just need to bump to v0.24.0 (#68) |
Co-authored-by: Oliver Azevedo Barnes <[email protected]>
I'm trying a fresh |
Bumping to v0.24.0 is bundle installing cleanly at mimemagic 0.3.10, so we're past that problem, but running rspec is giving segfaults for me on my M1 ... intel machine not handy today. Stay tuned |
I pulled your branch to try and replicate this, but specs ran fine for me. Steps I took:
I'm on ruby 2.7.2 installed natively on my m1 |
See other PR 88 for just the 0.24 bump. PR coming for demo app. I segfaulted on (my) 2.7.1, I was mirroring v0.24.0's ruby-version. But when I bumped back to 2.7.2, it ran cleanly. I suspect I built the two rubies differently, my new m1 machine has some odd things |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 very nice, thanks man
This PR is meant to:
client.rb
toapi_client.rb
to make clearer boundaries and align with anticipated gem nameTo get things working I've had to temporarily pin
mimemagic
to0.3.9
directly in theGemfile.lock
file; this PR should not merge until we can have a cleanbundle install
-generated lock file.Closes #48