Card gem or the Card/Deck Split

Again, just for discussion for now.

I've looked a little at how rails does the many projects in one repo and tried to do something similar here.  My thinking now is that if we get this split right, then everything needed for the platform is in the card gem and the wagn (soon to be decko) gem is what makes it case 1, a web application that uses the card engine.

It took me a while, but I got it to load and run the few specs left behind in the wagn part.  Seems like the mods should be split, but many of them are core.  Please add your comments about what is core and what is not.  I'm thinking that things like accounts has be be with the deck as authentication is a site issue.  Default is a plain card, and then we are using card_ids as the creator/updater.  Question for all is how we want to connect to an external user model, do we always want to have a card with a card_id that is associated with the external mode?  Is that just another instance of an external model bound to a deck via a standard way of doing that?  My plan was to add card_id to the external table (making it belong to a card and the card will have_one of the external model).

The part I haven't figured out/finalized is the way the top level objects should work.  Initially I thought (wrongly) that the Engine (Card::Engine < Rails::Engine) needed to be part of the Wagn::Application < Rails::Application object, but there just isn't a way to have one object fill both roles.  And this split implies that the application will always have very simple routes that mount the Card::Engine thing, and the same thing in the platform use, but you'd have all your application's initial routes.  We may also want to split out some of the legacy routes to the application and leave only the platform standard stuff in Card::Engine routes.
Afaic, you can go ahead and name the secondary case "decko-rails".

On Mon, Dec 8, 2014 at 1:53 PM, Gerry Gleason <notifications@github.com>
wrote:

> In card/app/controllers/card_controller.rb:
>
> > @@ -5,7 +5,7 @@
> >
> >  class CardController < ActionController::Base
> >
> > -  include Wagn::Location
> > +  include Card::Location
>
> decko ---------
> \
> decko-rails ----- card
> /
> whatever-else -
>
> Hmmm, that's a different can of worms, not sure where you would want to go
> first.
>
> Pre-decko, would you want it to be wagn-rails? Or can we have Wagn using
> decko-rails which uses card ? Seems to me simpler to first just do as I
> have done and make Card (card-version.gem) be what decko-rails will be,
> then split it out as decko-rails at the point of the re-brand.
>
> Coming over to your view, or maybe just finally understanding well enough.
> For current my use case, embedded in a rails app, I've already loaded all
> that rails stuff and I want the engine part specifically. The questions are
> more about when we do which transition and some details of that.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/wagn/wagn/pull/263/files#r21484351>.
>



-- 
Ethan McCutchen
One of the Wagneers, Wagn.org

Wagn. How pioneers roll.

s: ethan.mccutchen
t: @intogreater