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.
- data/.DS_Store +0 -0
- data/.project +17 -0
- data/COPYING +339 -0
- data/HISTORY.txt +8 -0
- data/Manifest.txt +218 -0
- data/README.txt +67 -0
- data/Rakefile +31 -0
- data/bin/.DS_Store +0 -0
- data/bin/rubysync +19 -12
- data/examples/.DS_Store +0 -0
- data/examples/ar_client_webapp/log/development.log +753 -0
- data/examples/ar_client_webapp/log/production.log +0 -0
- data/examples/ar_client_webapp/log/server.log +0 -0
- data/examples/ar_client_webapp/log/test.log +0 -0
- data/examples/ar_client_webapp/public/.htaccess +40 -0
- data/examples/ar_client_webapp/tmp/sessions/ruby_sess.e2e3c63a67baef6d +0 -0
- data/examples/ar_webapp/.DS_Store +0 -0
- data/examples/ar_webapp/app/.DS_Store +0 -0
- data/examples/ar_webapp/app/views/.DS_Store +0 -0
- data/examples/ar_webapp/app/views/people/.DS_Store +0 -0
- data/examples/ar_webapp/log/development.log +5518 -0
- data/examples/ar_webapp/log/production.log +0 -0
- data/examples/ar_webapp/log/server.log +0 -0
- data/examples/ar_webapp/log/test.log +2178 -0
- data/examples/ar_webapp/public/.htaccess +40 -0
- data/examples/ar_webapp/tmp/sessions/ruby_sess.2295696b0af5f6dd +0 -0
- data/examples/ar_webapp/tmp/sessions/ruby_sess.26687aeb19c87669 +0 -0
- data/examples/ar_webapp/tmp/sessions/ruby_sess.2855a3b0c8ea840b +0 -0
- data/examples/ar_webapp/tmp/sessions/ruby_sess.45d2d48a8330ff28 +0 -0
- data/examples/ar_webapp/tmp/sessions/ruby_sess.7366b840f4ce9f12 +0 -0
- data/examples/ar_webapp/tmp/sessions/ruby_sess.b2fc3f2e6d8ae555 +0 -0
- data/examples/ar_webapp/tmp/sessions/ruby_sess.b6bf8470a62c02b0 +0 -0
- data/examples/my_ims/.DS_Store +0 -0
- data/gemspec +48 -0
- data/lib/.DS_Store +0 -0
- data/lib/net/.DS_Store +0 -0
- data/lib/ruby_sync/connectors/active_record_association_handler.rb +66 -0
- data/lib/ruby_sync/connectors/active_record_connector.rb +14 -62
- data/lib/ruby_sync/connectors/active_record_event_handler.rb +47 -0
- data/lib/ruby_sync/connectors/base_connector.rb +139 -36
- data/lib/ruby_sync/connectors/connector_event_processing.rb +18 -0
- data/lib/ruby_sync/connectors/csv_file_connector.rb +3 -0
- data/lib/ruby_sync/connectors/file_connector.rb +1 -0
- data/lib/ruby_sync/connectors/memory_connector.rb +2 -104
- data/lib/ruby_sync/connectors/xml_connector.rb +98 -0
- data/lib/ruby_sync/event.rb +7 -1
- data/lib/ruby_sync/util/utilities.rb +27 -16
- data/lib/ruby_sync.rb +10 -1
- data/lib/rubysync.rb +19 -0
- data/nbproject/private/private.properties +3 -0
- data/nbproject/project.properties +8 -0
- data/nbproject/project.xml +16 -0
- data/rubysync.tmproj +348 -0
- data/test/.DS_Store +0 -0
- data/test/ruby_sync_test.rb +8 -1
- data/test/tc_xml_connectors.rb +47 -0
- data/test/test_active_record_vault.rb +17 -14
- data/test/test_base_connector.rb +38 -0
- data/test/test_ldap_changelog.rb +97 -0
- data/test/test_ldap_connector.rb +2 -48
- data/test/test_memory_connectors.rb +8 -3
- data/test/test_rubysync.rb +28 -0
- data/test/ts_rubysync.rb +5 -3
- 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
|
33
|
-
# then it can also export changes.
|
32
|
+
# text files into an xml file.
|
34
33
|
# <tt>
|
35
|
-
# $ rubysync create
|
36
|
-
# $ cd
|
34
|
+
# $ rubysync create xml_demo
|
35
|
+
# $ cd xml_demo
|
37
36
|
# $ rubysync connector my_csv -t csv_file
|
38
|
-
# $ rubysync connector
|
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/
|
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
|
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
|
120
|
-
|
121
|
-
|
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
|
data/examples/.DS_Store
ADDED
Binary file
|