So I''m playing around with cucumber + facebooker. Get this error: ActionView::TemplateError (No such file or directory - /home/joe/projects/wdyt/features/support/facebook/facebook.users.getInfo/fields=status,political,pic_small,name,quotes,is_app_user,tv,profile_update_time,meeting_sex,hs_info,timezone,relationship_status,hometown_location,about_me,wall_count,significant_other_id,pic_big,music,uid,work_history,sex,religion,notes_count,activities,pic_square,movies,has_added_app,education_history,birthday,first_name,meeting_for,last_name,interests,current_location,pic,books,affiliations,locale,profile_url,proxied_email,email_hashes,allowed_restrictions&uids=1.xml Facebook API Reference: http://wiki.developers.facebook.com/index.php/users.getInfo#Example_Return_XML) on line #10 of app/views/welcome/index.fbml.haml: I can''t make a file with a name that long, I don''t think.
Joe, Yeah, that''s gross. I''m not really happy with how that works. I borrowed the implementation from someone on the IRC channel. http://github.com/mmangino/facebooker/blob/cad4ef415f297bfd0ed6ab67bf9d11f4d7ce5150/lib/facebooker/mock/service.rb It *should* try to use a shorter filename if the name is too long. I''m not sure why that''s not working. Try just naming the file ''default.xml''. It''ll look for that file last if the long filename doesn''t exist. Do you have any ideas for a different way to implement it? One option would be to use the current implementation, but have the filename always be a hash of the params. The only other idea I have at this point is to use an idea like FakeWeb (http://fakeweb.rubyforge.org/) where you register the response before you make the API call. For example: Facebooker::MockService.register(''facebook.users.getInfo'', ''fixture_file_name'') puts facebook_user.name Thoughts? Brandon On Mar 5, 2009, at 11:56 PM, Joe Van Dyk wrote:> So I''m playing around with cucumber + facebooker. > > Get this error: > > ActionView::TemplateError (No such file or directory - > /home/joe/projects/wdyt/features/support/facebook/ > facebook.users.getInfo/ > fields=status,political,pic_small,name,quotes,is_app_user,tv,profile_update_time,meeting_sex,hs_info,timezone,relationship_status,hometown_location,about_me,wall_count,significant_other_id,pic_big,music,uid,work_history,sex,religion,notes_count,activities,pic_square,movies,has_added_app,education_history,birthday,first_name,meeting_for,last_name,interests,current_location,pic,books,affiliations,locale,profile_url,proxied_email,email_hashes,allowed_restrictions&uids=1.xml > Facebook API Reference: > http://wiki.developers.facebook.com/index.php/users.getInfo#Example_Return_XML) > on line #10 of app/views/welcome/index.fbml.haml: > > > I can''t make a file with a name that long, I don''t think. > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20090306/7078be7b/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 194 bytes Desc: This is a digitally signed message part URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20090306/7078be7b/attachment-0001.bin>
I vote for having the filename be the hash of the params. Maybe the error message could include the hash? What''s the best way of getting the content that goes in the file? On Thu, Mar 5, 2009 at 9:24 PM, Brandon Keepers <brandon at opensoul.org> wrote:> Joe, > Yeah, that''s gross. ?I''m not really happy with how that works. ?I borrowed > the implementation from someone on the IRC channel. > http://github.com/mmangino/facebooker/blob/cad4ef415f297bfd0ed6ab67bf9d11f4d7ce5150/lib/facebooker/mock/service.rb > It *should* try to use a shorter filename if the name is too long. ?I''m not > sure why that''s not working. ?Try just naming the file ''default.xml''. ?It''ll > look for that file last if the long filename doesn''t exist. > Do you have any ideas for a different way to implement it? > One option would be to use the current implementation, but have the filename > always be a hash of the params. > The only other idea I have at this point is to use an idea like FakeWeb > (http://fakeweb.rubyforge.org/) where you register the response before you > make the API call. ?For example: > ?? ?Facebooker::MockService.register(''facebook.users.getInfo'', > ''fixture_file_name'') > ?? ?puts facebook_user.name > Thoughts? > Brandon > On Mar 5, 2009, at 11:56 PM, Joe Van Dyk wrote: > > So I''m playing around with cucumber + facebooker. > > Get this error: > > ActionView::TemplateError (No such file or directory - > /home/joe/projects/wdyt/features/support/facebook/facebook.users.getInfo/fields=status,political,pic_small,name,quotes,is_app_user,tv,profile_update_time,meeting_sex,hs_info,timezone,relationship_status,hometown_location,about_me,wall_count,significant_other_id,pic_big,music,uid,work_history,sex,religion,notes_count,activities,pic_square,movies,has_added_app,education_history,birthday,first_name,meeting_for,last_name,interests,current_location,pic,books,affiliations,locale,profile_url,proxied_email,email_hashes,allowed_restrictions&uids=1.xml > Facebook API Reference: > http://wiki.developers.facebook.com/index.php/users.getInfo#Example_Return_XML) > on line #10 of app/views/welcome/index.fbml.haml: > > > I can''t make a file with a name that long, I don''t think. > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > >
Joe, On Mar 6, 2009, at 1:27 AM, Joe Van Dyk wrote:> I vote for having the filename be the hash of the params. Maybe the > error message could include the hash?The only issue with this is that if the params ever change (e.g. a field gets added, which happens often), then you''d have to rename the file.> What''s the best way of getting the content that goes in the file?See the URL that the error printed out. It has sample XML at the bottom of the page: http://wiki.developers.facebook.com/index.php/users.getInfo#Example_Return_XML Brandon> On Thu, Mar 5, 2009 at 9:24 PM, Brandon Keepers > <brandon at opensoul.org> wrote: >> Joe, >> Yeah, that''s gross. I''m not really happy with how that works. I >> borrowed >> the implementation from someone on the IRC channel. >> http://github.com/mmangino/facebooker/blob/cad4ef415f297bfd0ed6ab67bf9d11f4d7ce5150/lib/facebooker/mock/service.rb >> It *should* try to use a shorter filename if the name is too long. >> I''m not >> sure why that''s not working. Try just naming the file >> ''default.xml''. It''ll >> look for that file last if the long filename doesn''t exist. >> Do you have any ideas for a different way to implement it? >> One option would be to use the current implementation, but have the >> filename >> always be a hash of the params. >> The only other idea I have at this point is to use an idea like >> FakeWeb >> (http://fakeweb.rubyforge.org/) where you register the response >> before you >> make the API call. For example: >> Facebooker::MockService.register(''facebook.users.getInfo'', >> ''fixture_file_name'') >> puts facebook_user.name >> Thoughts? >> Brandon >> On Mar 5, 2009, at 11:56 PM, Joe Van Dyk wrote: >> >> So I''m playing around with cucumber + facebooker. >> >> Get this error: >> >> ActionView::TemplateError (No such file or directory - >> /home/joe/projects/wdyt/features/support/facebook/ >> facebook.users.getInfo/ >> fields=status,political,pic_small,name,quotes,is_app_user,tv,profile_update_time,meeting_sex,hs_info,timezone,relationship_status,hometown_location,about_me,wall_count,significant_other_id,pic_big,music,uid,work_history,sex,religion,notes_count,activities,pic_square,movies,has_added_app,education_history,birthday,first_name,meeting_for,last_name,interests,current_location,pic,books,affiliations,locale,profile_url,proxied_email,email_hashes,allowed_restrictions&uids=1.xml >> Facebook API Reference: >> http://wiki.developers.facebook.com/index.php/users.getInfo#Example_Return_XML) >> on line #10 of app/views/welcome/index.fbml.haml: >> >> >> I can''t make a file with a name that long, I don''t think. >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20090306/2bf682c6/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 194 bytes Desc: This is a digitally signed message part URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20090306/2bf682c6/attachment.bin>
In the current version, you''d need to rename the file anyways, right? On Fri, Mar 6, 2009 at 4:11 AM, Brandon Keepers <brandon at opensoul.org> wrote:> Joe, > On Mar 6, 2009, at 1:27 AM, Joe Van Dyk wrote: > > I vote for having the filename be the hash of the params. ?Maybe the > error message could include the hash? > > The only issue with this is that if the params ever change (e.g. a field > gets added, which happens often), then you''d have to rename the file. > > What''s the best way of getting the content that goes in the file? > > See the URL that the error printed out. ?It has sample XML at the bottom of > the page: > http://wiki.developers.facebook.com/index.php/users.getInfo#Example_Return_XML > > Brandon > > On Thu, Mar 5, 2009 at 9:24 PM, Brandon Keepers <brandon at opensoul.org> > wrote: > > Joe, > > Yeah, that''s gross. ?I''m not really happy with how that works. ?I borrowed > > the implementation from someone on the IRC channel. > > http://github.com/mmangino/facebooker/blob/cad4ef415f297bfd0ed6ab67bf9d11f4d7ce5150/lib/facebooker/mock/service.rb > > It *should* try to use a shorter filename if the name is too long. ?I''m not > > sure why that''s not working. ?Try just naming the file ''default.xml''. ?It''ll > > look for that file last if the long filename doesn''t exist. > > Do you have any ideas for a different way to implement it? > > One option would be to use the current implementation, but have the filename > > always be a hash of the params. > > The only other idea I have at this point is to use an idea like FakeWeb > > (http://fakeweb.rubyforge.org/) where you register the response before you > > make the API call. ?For example: > > ?? ?Facebooker::MockService.register(''facebook.users.getInfo'', > > ''fixture_file_name'') > > ?? ?puts facebook_user.name > > Thoughts? > > Brandon > > On Mar 5, 2009, at 11:56 PM, Joe Van Dyk wrote: > > So I''m playing around with cucumber + facebooker. > > Get this error: > > ActionView::TemplateError (No such file or directory - > > /home/joe/projects/wdyt/features/support/facebook/facebook.users.getInfo/fields=status,political,pic_small,name,quotes,is_app_user,tv,profile_update_time,meeting_sex,hs_info,timezone,relationship_status,hometown_location,about_me,wall_count,significant_other_id,pic_big,music,uid,work_history,sex,religion,notes_count,activities,pic_square,movies,has_added_app,education_history,birthday,first_name,meeting_for,last_name,interests,current_location,pic,books,affiliations,locale,profile_url,proxied_email,email_hashes,allowed_restrictions&uids=1.xml > > Facebook API Reference: > > http://wiki.developers.facebook.com/index.php/users.getInfo#Example_Return_XML) > > on line #10 of app/views/welcome/index.fbml.haml: > > > I can''t make a file with a name that long, I don''t think. > > _______________________________________________ > > Facebooker-talk mailing list > > Facebooker-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > >