Some Firefox users may need to log in more than once to log in. It's a known Firefox bug. Check "keep me logged in," it might help.

Es posible que algunxs usuarixs de Firefox tengan que conectarse más de una vez para iniciar sesión. Es un error conocido de Firefox. Marca "keep me logged in" (mantenerme conectado), puede ayudar.


Tech Meeting 2022.07.16: Difference between revisions

From Bike Collectives Wiki
m (ADDED Tech_Meeting_2022.07.17)
Line 1: Line 1:
Last-minute tech meeting with Jonathan Rosenbaum to look at integrating [https://opencollective.com/bikebike-everywhere OCF] with bikebike software for payments
Last-minute tech meeting with Jonathan Rosenbaum to look at integrating [https://opencollective.com/bikebike-everywhere OCF] with bikebike software for payments
 
This is Part 1.  [[Tech_Meeting_2022.07.17|SEE ALSO PART II]].


Attendees:  [[User:DarinWick|Darin]], [[User:PositiveSpin|Jonathan]], technically [[User:Angel|Angel]] also present  
Attendees:  [[User:DarinWick|Darin]], [[User:PositiveSpin|Jonathan]], technically [[User:Angel|Angel]] also present  

Revision as of 04:48, 18 July 2022

Last-minute tech meeting with Jonathan Rosenbaum to look at integrating OCF with bikebike software for payments.

This is Part 1.  SEE ALSO PART II.

Attendees: Darin, Jonathan, technically Angel also present

  • OCF doesn't offer a paypal account, only paypal integration
  • trying to avoid using paypal
  • bikebike.org is only set up to work with paypal
  • how to add an i-frame JUST for B!B!E! without doing it for all the B!B! events too?

Goals:

1. Establish where to make the changes in the application, which can be done with search and grepping.

2. Figure out the implementation, which depends on where the changes shall be. I assume that is in [example link] https://en.bb.bikelover.org/conferences/Northeast2022/register/ .


Notes

  • Any changes to the code require a restart to the server to take effect
    • We're not sure if we know how to start the server correctly
    • Godwin said don't do it.
    • Restarting the server is a Godwin Thing
  • The only person with DNS access to bikebike.org is Godwin

Some Things we Learned

Background

"I really want to drive home right now through that this server is very fragile at the moment, the code on the server has changed slightly from the repo due to several high severity issues over the years." -Godwin

Working with the current bikebike.org server

We learned a little more by checking .bash_history (the history of commands that have been run on the linux command line) and .irb-history (the history of commands that have been run in the rails console:

  • It looks like minor changes (anything stored in the database?) can be made from the rails console, accessible by running:
cd /home/rails
RAILS_ENV=production bundle exec rails c

Note that this will make live changes to the production website. It could probably break things in pretty dramatic ways.

  • Pretty sure this restarts the webserver:
kill `cat /home/unicorn/production.pid`; RAILS_ENV=production bundle exec unicorn_rails -E production -D -c /home/rails/config/unicorn.rb
  • This looks like it rebuilds all the assets and restarts everything:
truncate nohup.out -s 0 && nohup sh -c 'cd /home/rails && RAILS_ENV=production bundle exec rake bumbleberry:update && RAILS_ENV=production bundle exec rake assets:precompile && RAILS_ENV=production bundle exec rake assets:clean && kill `cat /home/unicorn/production.pid`; RAILS_ENV=production bundle exec unicorn_rails -E production -D -c /home/rails/config/unicorn.rb && kill `cat /home/unicorn/sidekiq_production.pid`; bundle exec sidekiq -d -C config/sidekiq_production.yml -e production -c 25' &

nohup makes the process keep running after the user has logged out. I don't really know what the rest of it is doing.

Editing the code to integrate OCF stuff

As far as OCF integration is concerned, it could go in a few places...

  • The page where you choose the payment type appears to be in app/views/registration_steps/_payment_type.html.haml. Editing that might allow us to hack in some logic so it changes only one conference, not all conferences ever. It's more challenging, though, because it requires making the edits in HAML/Ruby
  • The text on that page is defined in config/locales/[LANGUAGE CODE].yml where [LANGUAGE CODE] is en, es, or fr. That file contains all predefined text blocks in the app; you can find the correct one by searching for "If you can, please pay now via PayPal." If we edit that, it will be edited for all conferences ever. It's simpler, because we can probably just drop some HTML in there - like the iframe with the OCF Contribution Flow