lib/spiderfw/cmd/commands/model.rb in spiderfw-0.6.20 vs lib/spiderfw/cmd/commands/model.rb in spiderfw-0.6.21

- old
+ new

@@ -26,11 +26,11 @@ opt.on("--no-fk-constraints", _("Don't create foreign key constraints"), "-c"){ |c| @no_fkc = true } opt.on("--fk-constraints", _("Create foreign key constraints"), "-C" ){ |c| @no_fkc = false } end sync_cmd.set_execution_block do |req_models| - require 'spiderfw' + require 'spiderfw/init' require 'spiderfw/model/mappers/db_mapper' req_models || [] unsafe_fields = {} req_models = Spider.apps.values if (req_models.empty?) req_models.each do |model_or_app| @@ -96,10 +96,10 @@ opt.on("--path [PATH]", _("Specify dump path"), "-p"){ |p| @dump_path = p } end dump_cmd.set_execution_block do |req_models| - require 'spiderfw' + require 'spiderfw/init' req_models || [] req_models.each do |model_or_app| models = [] mod = model_or_app.is_a?(Module) ? model_or_app : const_get_full(model_or_app) if (mod.is_a?(Module) && mod.include?(Spider::App)) \ No newline at end of file