<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hey everybody,<br>
    <br>
    I finished the spike on using ActiveResource as a replacement for
    RestClient, only for communication with Foreman, and only to
    orchestrate user creation/deletion in Foreman. See the results at
    [1].<br>
    <br>
    Some post-spike thoughts/observations:<br>
     - I monkey-patched ActiveResource to support OAuth, but the same
    can be achieved by subclassing ActiveResource::Base, which is the
    way to go.<br>
     - The amount of custom-code is *very* minimal and it's mostly to
    support OAuth.<br>
     - Not a fan of custom to_json, we could either use resource's
    schema (there are some drawbacks), or try using rabl [2] (like
    foreman folks do)<br>
     - Should we decide to adopt this, we can eventually move both
    candlepin and pulp to use ActiveResource. I think it will be
    possible to drop our lazy_attributes in the process with some work,
    if we adopt rails caching.<br>
    <br>
    <br>
    Comments, concerns?<br>
    -d<br>
    <br>
    <br>
    [1]
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a
      href="https://github.com/witlessbird/katello/tree/foreman-ar-spike">https://github.com/witlessbird/katello/tree/foreman-ar-spike</a><br>
    [2]
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a href="https://github.com/nesquena/rabl">https://github.com/nesquena/rabl</a>
  </body>
</html>