liquidvotingio / decidim-module-liquidvoting

GNU Affero General Public License v3.0
4 stars 0 forks source link

Decouple the liquidvoting state object #85

Closed davefrey closed 3 years ago

davefrey commented 3 years ago

This PR is meant to:

  1. centralize Liquidvoting logic into a module of helpers
  2. extract the Decidim-aware stuff like lv_state from our api client
  3. rename our client.rb to api_client.rb to make clearer boundaries and align with anticipated gem name

To get things working I've had to temporarily pin mimemagic to 0.3.9 directly in the Gemfile.lock file; this PR should not merge until we can have a clean bundle install-generated lock file.

Closes #48

davefrey commented 3 years ago

I'm going to undraft this, but note the Gemfile.lock has been directly altered to pin a version of mimemagic as a workaround until Decidim releases new gems.

oliverbarnes commented 3 years ago

Great work 👏 It's almost there.

To get things working I've had to temporarily pin mimemagic to 0.3.9 directly in the Gemfile.lock file; this PR should not merge until we can have a clean bundle install-generated lock file.

Does 0.3.6 work? Because that's already merged on Decidim v0.24.0: https://github.com/decidim/decidim/pull/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)

davefrey commented 3 years ago

I'm trying a fresh v0.24.0 🤞 these gem tweaks are a pita

davefrey commented 3 years ago

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

oliverbarnes commented 3 years ago

I pulled your branch to try and replicate this, but specs ran fine for me. Steps I took:

1) Pull branch 2) Bundle update mimemagic 3) bundle exec rake test_app 3) bundle exec rspec

I'm on ruby 2.7.2 installed natively on my m1

davefrey commented 3 years ago

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