rubysync 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. data/.DS_Store +0 -0
  2. data/.project +17 -0
  3. data/COPYING +339 -0
  4. data/HISTORY.txt +8 -0
  5. data/Manifest.txt +218 -0
  6. data/README.txt +67 -0
  7. data/Rakefile +31 -0
  8. data/bin/.DS_Store +0 -0
  9. data/bin/rubysync +19 -12
  10. data/examples/.DS_Store +0 -0
  11. data/examples/ar_client_webapp/log/development.log +753 -0
  12. data/examples/ar_client_webapp/log/production.log +0 -0
  13. data/examples/ar_client_webapp/log/server.log +0 -0
  14. data/examples/ar_client_webapp/log/test.log +0 -0
  15. data/examples/ar_client_webapp/public/.htaccess +40 -0
  16. data/examples/ar_client_webapp/tmp/sessions/ruby_sess.e2e3c63a67baef6d +0 -0
  17. data/examples/ar_webapp/.DS_Store +0 -0
  18. data/examples/ar_webapp/app/.DS_Store +0 -0
  19. data/examples/ar_webapp/app/views/.DS_Store +0 -0
  20. data/examples/ar_webapp/app/views/people/.DS_Store +0 -0
  21. data/examples/ar_webapp/log/development.log +5518 -0
  22. data/examples/ar_webapp/log/production.log +0 -0
  23. data/examples/ar_webapp/log/server.log +0 -0
  24. data/examples/ar_webapp/log/test.log +2178 -0
  25. data/examples/ar_webapp/public/.htaccess +40 -0
  26. data/examples/ar_webapp/tmp/sessions/ruby_sess.2295696b0af5f6dd +0 -0
  27. data/examples/ar_webapp/tmp/sessions/ruby_sess.26687aeb19c87669 +0 -0
  28. data/examples/ar_webapp/tmp/sessions/ruby_sess.2855a3b0c8ea840b +0 -0
  29. data/examples/ar_webapp/tmp/sessions/ruby_sess.45d2d48a8330ff28 +0 -0
  30. data/examples/ar_webapp/tmp/sessions/ruby_sess.7366b840f4ce9f12 +0 -0
  31. data/examples/ar_webapp/tmp/sessions/ruby_sess.b2fc3f2e6d8ae555 +0 -0
  32. data/examples/ar_webapp/tmp/sessions/ruby_sess.b6bf8470a62c02b0 +0 -0
  33. data/examples/my_ims/.DS_Store +0 -0
  34. data/gemspec +48 -0
  35. data/lib/.DS_Store +0 -0
  36. data/lib/net/.DS_Store +0 -0
  37. data/lib/ruby_sync/connectors/active_record_association_handler.rb +66 -0
  38. data/lib/ruby_sync/connectors/active_record_connector.rb +14 -62
  39. data/lib/ruby_sync/connectors/active_record_event_handler.rb +47 -0
  40. data/lib/ruby_sync/connectors/base_connector.rb +139 -36
  41. data/lib/ruby_sync/connectors/connector_event_processing.rb +18 -0
  42. data/lib/ruby_sync/connectors/csv_file_connector.rb +3 -0
  43. data/lib/ruby_sync/connectors/file_connector.rb +1 -0
  44. data/lib/ruby_sync/connectors/memory_connector.rb +2 -104
  45. data/lib/ruby_sync/connectors/xml_connector.rb +98 -0
  46. data/lib/ruby_sync/event.rb +7 -1
  47. data/lib/ruby_sync/util/utilities.rb +27 -16
  48. data/lib/ruby_sync.rb +10 -1
  49. data/lib/rubysync.rb +19 -0
  50. data/nbproject/private/private.properties +3 -0
  51. data/nbproject/project.properties +8 -0
  52. data/nbproject/project.xml +16 -0
  53. data/rubysync.tmproj +348 -0
  54. data/test/.DS_Store +0 -0
  55. data/test/ruby_sync_test.rb +8 -1
  56. data/test/tc_xml_connectors.rb +47 -0
  57. data/test/test_active_record_vault.rb +17 -14
  58. data/test/test_base_connector.rb +38 -0
  59. data/test/test_ldap_changelog.rb +97 -0
  60. data/test/test_ldap_connector.rb +2 -48
  61. data/test/test_memory_connectors.rb +8 -3
  62. data/test/test_rubysync.rb +28 -0
  63. data/test/ts_rubysync.rb +5 -3
  64. metadata +129 -169
data/Rakefile ADDED
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # Copyright (c) 2007 Ritchie Young. All rights reserved.
4
+ #
5
+ # This file is part of RubySync.
6
+ #
7
+ # RubySync is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License
8
+ # as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
9
+ #
10
+ # RubySync is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
11
+ # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License along with RubySync; if not, write to the
14
+ # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
15
+
16
+ require 'rubygems'
17
+ require 'hoe'
18
+ require './lib/rubysync.rb'
19
+
20
+ Hoe.new('rubysync', Rubysync::VERSION) do |p|
21
+ p.rubyforge_name = 'rubysync'
22
+ p.author = 'Ritchie Young'
23
+ p.email = 'ritchiey@gmail.com'
24
+ p.summary = "Event driven identity synchronization engine"
25
+ p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
26
+ p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
27
+ p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
28
+ p.remote_rdoc_dir = ""
29
+ end
30
+
31
+ # vim: syntax=Ruby
data/bin/.DS_Store ADDED
Binary file
data/bin/rubysync CHANGED
@@ -29,23 +29,22 @@
29
29
  # == Example
30
30
  #
31
31
  # This sets up the skeleton of a configuration for importing comma delimeted
32
- # text files into a database. Note, if the application happens to be a Rails app
33
- # then it can also export changes.
32
+ # text files into an xml file.
34
33
  # <tt>
35
- # $ rubysync create db_demo
36
- # $ cd db_demo
34
+ # $ rubysync create xml_demo
35
+ # $ cd xml_demo
37
36
  # $ rubysync connector my_csv -t csv_file
38
- # $ rubysync connector my_db -t active_record
37
+ # $ rubysync connector my_xml -t xml
39
38
  # </tt>
40
39
  #
41
40
  # You would then edit the files::
42
41
  #
43
42
  # * +connectors/my_csv_connector.rb+:: where to get the CSV files, field names, etc
44
- # * +connectors/my_db_connector.rb+:: how to connect to your database or Rails app.
43
+ # * +connectors/my_xml_connector.rb+:: how to connect to your XML file.
45
44
  #
46
45
  # And enter::
47
46
  # <tt>
48
- # $ rubysync pipeline my_pipeline -C my_csv -V my_db
47
+ # $ rubysync pipeline my_pipeline -C my_csv -V my_xml
49
48
  # </tt>
50
49
  #
51
50
  # You would then edit the file +pipelines/my_pipeline.rb+ to configure the
@@ -116,9 +115,17 @@ class Controller < SimpleConsole::Controller
116
115
  # Create a Rubysync project directory
117
116
  def create
118
117
  config_path = params[:id]
119
- ensure_dir_exists config_path
120
- ensure_dir_exists config_path + "/pipelines"
121
- ensure_dir_exists config_path + "/connectors"
118
+ ensure_dir_exists([
119
+ config_path,
120
+ "#{config_path}/pipelines",
121
+ "#{config_path}/connectors",
122
+ "#{config_path}/shared",
123
+ "#{config_path}/shared/pipelines",
124
+ "#{config_path}/shared/connectors",
125
+ "#{config_path}/shared/lib",
126
+ "#{config_path}/log",
127
+ "#{config_path}/db"
128
+ ])
122
129
  end
123
130
 
124
131
  # Create a connector configuration file
@@ -292,9 +299,9 @@ class #{name.to_s.camelize}Pipeline < RubySync::Pipelines::BasePipeline
292
299
  # separate each mapping with a comma.
293
300
  # The following fields were detected on the client:
294
301
  # #{(client_fields.map {|f| "'#{f}'"}).join(", ")}
295
- map_vault_to_client(
302
+ map_vault_to_client({
296
303
  #{(vault_fields.map {|f| "#'#{f}' => 'a_client_field'"}).join(",\n\t\t")}
297
- )
304
+ })
298
305
 
299
306
  # "in" means going from client to vault
300
307
  #in_transform do
Binary file