Hi Stefan, That's great news Stefan. I have been playing a bit with engines to refactor a huge application and they are indeed powerful tools. I wonder if we could use heavier use of them in the future to make the core Hobo better.
About deploying, in case all the engines are closely related, you can try putting all in the same repository. Something like Hobo does: one repository, several gems/engines (https://github.com/Hobo/hobo). And about deploying tools: - Capistrano is super documented and you will find examples to do almost anything. - Vlad is kind of a mystery to me, it's currently used in Hobocentral.net though and works nicely. - I personally love Whiskey Disk: small and to the point :). Warm regards, Ignacio El 09/04/14 17:52, Stefan Haslinger escribió: > Hi folks, > > I'm not too long working with Hobo, but my main app gets bigger and bigger. > So I started modularizing it by extracting parts in engines. > > I can tell you, that this works nicely! > Hobo features are working in the engines as well. > > Side note to Ignacio regarding his port to Rails 4: > Even concerns are fully functional! No more fiddling with reopening the > base class. > > In the main app in app/models/inventory.rb I try to load the extension: > > class Inventory < ActiveRecord::Base > hobo_model > # ... > include InventoryExtensions if Rails.application.config.erp == > "mesonic" > #... > end > > > from the gem / engine located in > vendor/engines/mercator_mesonic/app/models/inventory_extensions.rb: > > module InventoryExtensions > > extend ActiveSupport::Concern > > > > included do > # -- Class Methods go here --- # > has_many :mesonic_prices, :class_name => > "MercatorMesonic::Price", :foreign_key => "c000", :primary_key => > "number" > end > > > > # --- Instance Methods go here --- # > > end > > > So the app 'detects' if the Gem is present by a variable set in > vendor/engines/mercator_mesonic/lib/mercator_mesonic/engine.rb > > module MercatorMesonic > class Engine < ::Rails::Engine > isolate_namespace MercatorMesonic > config.erp = "mesonic" > end > end > > > > Meanwhile I'm deploying one app and three engines / gems via git repos > and I think about introducing Capistrano. > Are you folks using Capistrano or are you into using Mina, Moonshine, > Vlad or something completely different? > > Greetings, > Stefan > > -- > You received this message because you are subscribed to the Google > Groups "Hobo Users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at http://groups.google.com/group/hobousers. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/hobousers. For more options, visit https://groups.google.com/d/optout.
