I’m developing a library called Hark. The structure is:
lib/
hark/
session.rb
mixins.rb
hark.rb
hark.rb:
module Hark
include Hark::Mixins
…
end
application.rb:
class ApplicationController < ActionController::Base
include Hark
end
my_controller.rb:
def login
hs = session[:hark_session] = Hark::Session.new
…
end
So application.rb brings in Hark, which in turn brings in Hark::Mixins.
Separately, the controller brings in Hark::Session.
I’ve turned on dependency logging, and hark/session.rb does get loaded
through the dependency mechanism. hark/mixins.rb, however, does not -
whatever’s magically bringing it in, it ain’t Dependencies.
I’ve tried explicitly doing a require_dependency on both Hark and
Hark::Mixins, and neither one is helping. How can I get these to be
brought in via Dependencies so they can be auto-reloaded when they
change?
I’m using rspec with its rails_spec_runner, so it’s much faster to test
when I don’t have to reload the rails environment with each change.
Jay L.