2008-01-09 Carlos Brando * Prepare the do_get_server_dump to works with acts_as_paranoid * Fix bugs in dump action 2008-01-06 AKITAONRAILS: * Finally, the test suite is working properly. Just type in 'rake' or use the 'test:units' or 'test:funcionals' tasks. The important part is that the server-side can be tested as functional testings and the client-side is mocked using the 'network_stubs.rb' stubs. That way the client 'thinks' it is hitting the network and we can control mock-results * Added the DUMP_URL setting, as well as the #dump server-side action and the #do_get_server_dump client-side method to dump full tables as CSV packages 2007-12-21 Carlos Brando * Added last_synced column to sync_settings. 2007-12-18 Carlos Brando: * New option to bootstrap_login. * Use YAML.load to get svn version. 2007-11-23 Carlos Brando: * Added support to acts_as_paranoid plugin. 2007-11-05 AKITAONRAILS: * The Replica model not has a 'configure_hook' undefined class method. You can hook whatever class level calls you need here (like a belongs_to association, for instance). This allows situations like this: module ReplicaSubscriber def self.included(base) base.extend ClassMethods end module ClassMethods def configure_hook before_create :assign_subscriber belongs_to :subscriber end private def assign_subscriber self.subscriber = User.current_user.subscriber end end end * The Replica's down method not support a options[:extra_conditions] that behave like a normal ActiveRecord finder's condition array. That way you can append any number of extra filtering options to a normal download from the central Replica table to enable granular control. * The SyncsHelper gets a new handshake extension. With the client-side call 'bootstrap_login' the client side user can request a login without having the user object persisted in the local database. It will connect to the server, properly authenticate and receive back a complete serialized User object, which can be locally persisted * The SyncsHelper usual 'handshake' procedure now returns :latest_svn_revision and :downloadable_items as well. And the run_sync method can receive an extra parameter if you ran handshake_autheticate separately to query the new items added to the return array. 2007-09-23 AKITAONRAILS Lots of changes: * The Sync table was renamed to Replica - the daemons plugin seems to complain with this name * Added RemoteMachine table. Now the handshake process exchange Machine IDs (UUID), and the new Replica table keeps track of each machine_id. That way, the transactions are no longer bound to a single User in a single client App. The same username can be used in any client installation and still be able to safely replicate data back and forth. * The client and server no longer uses a timestamp (in the last_synced columns of User and RemoteClient) to track each others transaction log entry points. It has been replaced for a simple auto-increment integer number (the primary key for the new Replica table). * syncable.yml was deprecated in favor of a SyncSetting singleton Model. You will have to create your own administration screen, though. * It was asserted that SSL connection do works * Created a proper script/generator instead of the old manual file copy operation. I deprecated the use of the old Engine plugin because it was too buggy with dependency loading. * Added support for background jobs triggered through a controller. Sample controller and views included. It is cross platform as well. In *nix I use the good ol' system() call and in Win32, the Process.create method. You can control what's happening tailing the log/replica.log file * Added experimental application self-upgrade. lib/daemons/upgrade.rb is a new background job that calls svn cleanup, svn update and rake db:migrate. That way the application can be updated remotely without direct SSH connection to the server * Batch control was finalized and tested: the syncs_helper.rb now implements a run_sync method that controls run_upload and run_download. Each can read its local batch_limit settings (see SyncSetting). Then it can retrive XX number of rows at a time. This can be used to refine transfer using slow connections, so to avoid timeouts. 2007-07-18 AKITAONRAILS I realized that the vanilla Userstamp plugin doesn't work properly with this plugin. Until I devise a better way, I merged the userstamp.rb in the lib folder of the plugin. The belongs_to proxy method fails in some cases and the usage of the UUID can conflict as well. So delete the original userstamp plugin and use the one in this plugin. 2007-07-07 AKITA Initial version