[Facebooker-talk] AdapterBase.load_adapter, why does it scan the YAML file when it has the config_key_base value

David Clements digidigo at gmail.com
Wed Aug 13 11:19:38 EDT 2008


Hey John,

I am not sure I totally understand your needs but I think that the change
you offer breaks the ability to have multiple apps running in the same
instance.  So for example I could have a YML file with this

 api_key: e2604538a315f1d472dc20213ffa548e
  secret_key: SECRET
  canvas_page_name: meemclou
  callback_url: http://localhost:3000
  foo_api_key: SOMEOTHERAPIKEY
  foo_secret_key: SECRET
  foo_canvas_page_name: supermeemcloud
  foo_callback_url: http://localhost:3000
  foo_adapter: FacebookAdapter


And then the rails app can suport both meemcloud and supermeemcloud.

Or said more simply the config_key_base does not need to equal the class
name prefix of the adapter.

Let me know specifically what you are trying to accomplish and maybe I can
help.

Dave



On Wed, Aug 13, 2008 at 12:15 AM, Jonathan Otto <jonathan.otto at gmail.com>wrote:

> The load_adapter method is sent the value(config_key_base) of the
> adapter you want to load, so instead of using a regexp to match, why
> not just use the config_key_base value like so? The problem with the
> current method is that in situations where multiple apps share the
> same API key, this code will be unable to select the correct adapter.
> Though this situation seems uncommon, the earlier versions of Ringside
> behave this way (the same app on many social networks must share the
> same API key).
>
> http://pastebin.com/f2c2e58b6
>
> Let me know if the above fix breaks anything else that code was intended to
> do.
> _______________________________________________
> 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/20080813/983e4250/attachment.html>


More information about the Facebooker-talk mailing list