Displaying 20 results from an estimated 22 matches for "shanev".
Did you mean:
shane
2007 Dec 05
7
Better RESTful routes with fb_sig_request_method
With the new fb_sig_request_method provided by Facebook, I''ve patched
shanev''s pseudo-resource routes to generate restful routes, minus some
exceptions.
The announcement: http://www.facebook.com/developers/message.php#msg_126
Patch is submitted here: http://rubyforge.org/tracker/index.php?func=detail&aid=16105&group_id=4187&atid=16132
Blog entry ab...
2006 Aug 06
2
Acts as Most Popular plugin
Make your models feel like they are in high school again. This plugin
retrieves the most frequently occurring values for each column. It
adds methods of the form most_popular_[pluralized_column_name]. Check
out
<http://shanesbrain.net/articles/2006/08/04/acts-as-most-popular-rails-plugin>
for sample usage.
The plugin is mostly just a group_by in disguise. It is probably
overkill if you
2006 Jan 18
5
Perform action after in-place edit
I want to be able to call an action after performing an edit using the
in-place editor macro. I want to update multiple divs so I was
thinking about using an RJS template. However, I can''t figure out how
to trigger another action after the method created by
in_place_edit_for runs. Is there is an option on Ajax.InPlaceEditor
where I can inject some Element.update calls?
Thanks,
Shane
2005 Dec 22
4
Switchtower problem - `sysread'': bignum too big to convert into `long'' (RangeError)
I''m trying to set up switchtower, following the info in the Manual,
but am getting this error when I run "rake remote_exec ACTION=setup":
servers: ["cantona.dnswatchdog.com"]
/usr/lib/ruby/gems/1.8/gems/net-ssh-1.0.3/lib/net/ssh/transport/packet-stream.rb:203:in
`sysread'': bignum too big to convert into `long'' (RangeError)
from
2008 Jan 16
10
Towards a 1.0 release
Hey everybody.
I''ve been using Facebooker on several projects over the last few
months and feel like it is really starting to mature. I''d like to push
towards a 1.0 release within the next month. I''d really like
everybody''s input on what still needs to be done, as well as some help
in wrapping things up. I''ve created a list of things that still
2008 Mar 14
14
Facebooker MQ now on RubyForge
I don''t know if anyone is using this but I just fixed a bunch of bugs, some
big ones, and moved this project to RubyForge SVN servers.
So you can get it here now:
script/plugin install
http://facebooker-mq.rubyforge.org/svn/trunk/facebooker-mq/
This is working great for me on a couple of projects.
Here is the README
Updated: 3/14/2008
Purpose:
The purpose of FacebookerMQ is to
2008 Mar 18
3
examples in subversion
Hey everyone. I have a quick question. Checking out facebooker as a
plugin is currently really slow due to the example rails application.
Would anyone object if I moved that out of the main plugin directory?
Mike
--
Mike Mangino
http://www.elevatedrails.com
2007 Nov 30
5
render_to_string in an after filter
I''m using render_to_string in an after_filter, which renders a partial
that is sent to a web service. Here''s the code:
class MyController < ApplicationController
after_filter :post_to_webservice
def show
# show logic
end
def post_to_webservice
stuff = render_to_string :partial => ''stuff''
webservice_post(stuff)
end
I get a DoubleRenderError in the
2006 Jan 19
12
Switchtower isn''t restarting lighttpd
I''ve got switchtower set up, and it seems to work fine except for one
problem: It doesn''t successfully restart lighttpd. I have the
following task in my deploy.rb file:
desc "Restart the web server"
task :restart, :roles => :app do
sudo "/usr/local/etc/rc.d/lighttpd.sh restart"
end
This is on a FreeBSD system, so it''s using the rc script to
2008 May 08
0
New test helpers
Hey guys-
A few methods useful for testing have been added to trunk:
1) facebook_post
For use in controller unit tests and integration tests. Basically, it
delegates to the standard "post" method for simulating post requests
in a test, but constructs mock fb_sig params and passes them along to
the requested action with the rest of the params that the test
specifies.
2)
2006 Jul 18
0
Graphical stats with Rails Stats plugin
Rails Stats is a simplified graphical version of the Rake ''stats''
task. It generates a graph showing your lines of code versus lines of
test code, and two other graphs showing the composition of your
project and tests. The plugin requires Gruff Graphs.
<http://shanesbrain.net/articles/2006/07/18/rails-stats-plugin-or-show-me-those-pretty-graphs>
If not useful, I hope
2007 Nov 18
0
Pseudo resource routes
I added a route mapper called facebook_resources. This allows you to
create pseudo-resource routes. Since everything is a POST in
Facebook, you can''t identify routes using HTTP verbs. Each route is
prefixed with its action, except for index.
Example:
map.facebook_resources :profiles
Will give you the following named routes:
new_profile POST /profiles/new
profiles POST
2007 Nov 21
0
Upgrade to latest trunk if you''re getting "undefined method `degree=''"
Facebook added the ''degree'' field to education info. This breaks
user.populate because the ''degree'' field doesn''t exist in the
education history model.
On a side note, if a method calls a dangerous method (ending with !),
shouldn''t it be classified as dangerous too?
Shane
--
http://myfitbuddy.com | http://shanesbrain.net |
2006 Jul 13
0
Error in Trac when submitting patch
I get the following error when trying to submit a patch:
Traceback (most recent call last):
File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line
314, in dispatch_request
dispatcher.dispatch(req)
File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line
199, in dispatch
resp = chosen_handler.process_request(req)
File
2008 Jan 26
0
New feature: get profile pictures
The profile picture album is treated as a special album by Facebok and
is not returned in the normal get photo albums API call. A bunch of
special operations have to be performed to get the aid for the profile
picture album. I added a method to User to get the profile pics. Use
as follows:
facebook_session.user.profile_photos # returns Photo objects
Enjoy,
Shane
--
http://myfitbuddy.com |
2008 Jan 30
0
Publish templatized action with JSON gotcha in Rails 1.2
Hey guys-
to_json in Rails 1.2 produces json with unquoted keys, which is
invalid. Therefore, publish_templatized_action produces invalid json
for feed publishing, and you''ll get an error from Facebook. To fix
this, put this line in environment.rb:
ActiveSupport::JSON.unquote_hash_key_identifiers = false
You don''t need to do this if you''re running Rails 2.0. Just a
2006 Oct 21
0
find_or_initialize_by and Nested Resources
Hey guys,
Lets say I have the following nested resources:
map.resource artists do |artists|
map.resource songs
end
To create a new song, the url would be:
/artists/:artist_id/songs/:song_id
However, lets say that an artist doesn''t exist yet. I only want to
create an artist if a new song by the artist is successfully saved. I
am retrieving the artist using something like:
@artist
2008 Feb 14
0
New features: Application properties and cookies
Hey guys-
Two new features:
Set/get app properties like this:
properties = { :application_name => "Video Jukebox", :default_fbml
=> "blah" }
facebook_session.admin.set_app_properties(properties)
properties =
facebook_session.admin.get_app_properties(:application_name,
:default_fbml)
Set/get cookies:
facebook_session.data.set_cookie(uid,
2007 Nov 30
0
Tests not passing
There is a catch-all rescue at the bottom of rails_integration_test
that stops the tests from running if any of the require statements
fail. In my case, require File.dirname(__FILE__)+''/../init'' fails and
none of the tests get run. When I comment out that line, there are a
couple of failures relating to redirection.
Shane
--
http://myfitbuddy.com
http://shanesbrain.net
2007 Nov 30
0
Rails test helpers
Hey guys-
I started a module for Rails test helpers. The first one is
assert_fb_redirect. This is like Rails'' assert_redirect, but works
for the fb:redirect FBML tag.
Any ideas for more? I was thinking about a version of assert_select
that works with Facebook. assert_select is based on CSS selectors,
which won''t work with Facebook since the use of colons (:) in search