I''ve got two additions I''d like to submit for inclusion in facebooker. The first is support for reading Friend Lists (which are, sadly, an underused feature of Facebook); its not a complicated addition, and I wasn''t able to find any unit tests that check the facebook rest API requests or responses. I think this one is pretty straightforward, with a low potential for breaking things. The second change I''m less sure of. I found that doing an AJAX call to my application from facebook had some problems with authentication... both in rails and then in facebooker. I was able to solve the Rails form authentication issues by simply providing a secret key in the application controller (since the normal cookie approach doesn''t work when you''re getting some calls from a facebook server and other calls from the real client). However the facebooker filters (ensuring the user has added the app and is authenticated) failed to work because the AJAX call wasn''t requesting a canvas. So I''ve added a method to the facebooker controller.rb called "request_is_ajax?" and updated the "secure_with_facebook_params!" method to create the :facebook_session if the request is either for a facebook canvas or is an ajax request. It works in my code, but if there''s a more correct way that''s already there (but I didn''t find) to handle Ajax requests made directly to the app via a facebook canvas, then please let me know. So what''s the best way to submit these patches? Any requirements or hoops I need to jump through to get them accepted? Mark
Hey Mark-> So what''s the best way to submit these patches? Any requirements or > hoops I need to jump through to get them accepted?Make sure the patch includes tests, and submit it to Rubyforge: http://rubyforge.org/projects/facebooker/. I''m not sure what you mean when you say you couldn''t find tests that check the API requests/responses. There are a bunch of them. Check out something like facebook_admin_test. Shane -- http://shanesbrain.net | http://crimsonjet.com | http://myfitbuddy.com
Well, I didn''t find facebook_admin_test, but i did look at facebooker_test.rb and that seems to have the unit tests I''d missed before. I was expecting them to be split among more files, with at least some of them named like the facebooker "model" classes. I guess I didn''t know what I should be looking for when I was poking through them that first day. I''ve never submitted a patch to anything before... what''s the process for generating them? I''m on a Unix (mac) system. Mark On Feb 17, 2008, at 11:52 PM, Shane Vitarana wrote:> Hey Mark- > >> So what''s the best way to submit these patches? Any requirements or >> hoops I need to jump through to get them accepted? > > Make sure the patch includes tests, and submit it to Rubyforge: > http://rubyforge.org/projects/facebooker/. I''m not sure what you mean > when you say you couldn''t find tests that check the API > requests/responses. There are a bunch of them. Check out something > like facebook_admin_test. > > Shane > > -- > http://shanesbrain.net | http://crimsonjet.com | http://myfitbuddy.com
Mark- This article explains how to submit patches to open source projects: <http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/> Good luck! Shane On Feb 18, 2008 3:20 AM, Mark Slater <lists at humanesoftware.com> wrote:> Well, I didn''t find facebook_admin_test, but i did look at > facebooker_test.rb and that seems to have the unit tests I''d missed > before. I was expecting them to be split among more files, with at > least some of them named like the facebooker "model" classes. I guess > I didn''t know what I should be looking for when I was poking through > them that first day. > > I''ve never submitted a patch to anything before... what''s the process > for generating them? I''m on a Unix (mac) system. > > Mark > > > On Feb 17, 2008, at 11:52 PM, Shane Vitarana wrote: > > > Hey Mark- > > > >> So what''s the best way to submit these patches? Any requirements or > >> hoops I need to jump through to get them accepted? > > > > Make sure the patch includes tests, and submit it to Rubyforge: > > http://rubyforge.org/projects/facebooker/. I''m not sure what you mean > > when you say you couldn''t find tests that check the API > > requests/responses. There are a bunch of them. Check out something > > like facebook_admin_test. > > > > Shane > > > > -- > > http://shanesbrain.net | http://crimsonjet.com | http://myfitbuddy.com > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk >-- http://shanesbrain.net | http://crimsonjet.com | http://myfitbuddy.com