lib/lorj_account.rb in lorj-1.0.9 vs lib/lorj_account.rb in lorj-1.0.10

- old
+ new

@@ -137,25 +137,25 @@ # - controller : Represents the controller config redefinition. # See BaseDefinition::define_data # - local : Represents the config.yaml located in ~/.forj # - account : Represents an Account data located in ~/.forj/accounts # - runtime : Represents the runtime in memory data settings. - def initialize(config_name = nil) + def initialize(config_name = nil, latest_version = nil) config_layers = [] # Application layer config_layers << define_default_layer # runtime Config layer config_layers << define_controller_data_layer # Local Config layer - local = define_local_layer + local = define_local_layer(latest_version) config_layers << local # Account config layer - config_layers << define_account_layer + config_layers << define_account_layer(latest_version) # runtime Config layer config_layers << define_runtime_layer if PrcLib.data_path.nil? @@ -648,12 +648,13 @@ return 0 if index <= (exclusive?(key, section) ? 1 : 3) end index end - def define_account_layer + def define_account_layer(latest_version = nil) PRC::CoreConfig.define_layer(:name => 'account', - :config => Lorj::AccountConfig.new, + :config => \ + Lorj::AccountConfig.new(nil, latest_version), :file_set => true, :load => true, :save => true) end def initialize_account