<< 20160808-migrate-davaz-com-fix-feature-tests | Index | 20160802-migrate-davaz-com >>
davaz.com has still issues for loading order of ruby files(class, module).
This is not problem only for davaz.com.
SBSM::State class has problem for cycle dependency.
In davaz.com, to avoid this issue, global_predefine.rb
is there.
But in ruby 2.3.1, some parts of loading order and including of Module by this file does not work.
This is to hard fix (like following situation)
In situation by separated files, resolving of dependencies is problem.
# davaz.rb module Foo end # global_predefine.rb module Foo module Bar # predefine module Z; end end end # state/admin/admin.rb module Foo::Bar # State::AdminMethods module Z def self.included(mod) # class is needed to include SBSM, but does not work this method because global_predefine has already Z module. puts "#{self} included by #{mod}" end end end # state/works/rack.rb module Foo::Bar # Works module Baz # Rack class B end # AdminRack class C < B include Z end end end # state/works/drawings.rb module Foo::Bar # Works module Baz # Drawings class A < C end end end # runtime a = Foo::Bar::Baz::A.new
So, I have to debug this.
Maybe, If we use SBSM, meta programming for loading order or resolving of dependencies by {require|include|pretend} are big problem.
And these are needed to fix only in global_predifine.rb
(predefined file).
Commit:Fix loading order dependencies for viral state
Some admin views are not loaded.
Commit: Refactor state and view files
At following pages, login session is gone.
Next fix login redirect issue.
error in SBSM::Session#process: /en/works/drawings/ NoMethodError super: no superclass method `switch_zone' for #<DaVaz::State::Redirect:0x0055733c072420> /path/to/davaz.com/src/state/_partial/admin.rb:76:in `switch_zone' /path/to/davaz.com/src/util/session.rb:63:in `active_state' /path/to/davaz.com/.bundle/gems/ruby/2.3.0/gems/sbsm-1.2.8/lib/sbsm/session.rb:362:in `process' /path/to/davaz.com/.bundle/gems/ruby/2.3.0/gems/sbsm-1.2.8/lib/sbsm/session.rb:172:in `block in drb_process' /path/to/davaz.com/.bundle/gems/ruby/2.3.0/gems/sbsm-1.2.8/lib/sbsm/session.rb:171:in `synchronize'