rubysync 0.0.5 → 0.1.0
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/HISTORY.txt +7 -0
- data/Manifest.txt +18 -76
- data/Rakefile +2 -2
- data/bin/rubysync +60 -21
- data/bin/rubysync.rb +60 -21
- data/examples/ar_webapp/public/dispatch.cgi +1 -1
- data/examples/ar_webapp/public/dispatch.fcgi +1 -1
- data/examples/ar_webapp/public/dispatch.rb +1 -1
- data/examples/csv_to_ldap/config/connectors/hr_connector.rb +14 -0
- data/examples/csv_to_ldap/config/connectors/ldap_vault_connector.rb +11 -0
- data/examples/{ar_webapp/.DS_Store → csv_to_ldap/config/db/HrImportPipeline(vault)_assoc_to_path.db} +0 -0
- data/{.DS_Store → examples/csv_to_ldap/config/db/HrImportPipeline(vault)_mirror.db} +0 -0
- data/examples/csv_to_ldap/config/db/HrImportPipeline(vault)_path_to_assoc.db +0 -0
- data/examples/csv_to_ldap/config/pipelines/hr_import_pipeline.rb +24 -0
- data/examples/csv_to_ldap/in/henchmen.csv.bak +3 -0
- data/examples/csv_to_xml/config/connectors/databank_connector.rb +8 -0
- data/examples/csv_to_xml/config/connectors/hr_connector.rb +14 -0
- data/examples/csv_to_xml/config/db/HrImportPipeline(vault)_assoc_to_path.db +0 -0
- data/examples/csv_to_xml/config/db/HrImportPipeline(vault)_mirror.db +0 -0
- data/examples/csv_to_xml/config/db/HrImportPipeline(vault)_path_to_assoc.db +0 -0
- data/examples/csv_to_xml/config/pipelines/hr_import_pipeline.rb +24 -0
- data/examples/csv_to_xml/databank.xml +1 -0
- data/examples/csv_to_xml/in/henchmen.csv.bak +3 -0
- data/examples/csv_to_xml/transcript.txt +1 -2
- data/examples/data/henchmen.csv +3 -0
- data/examples/data/more.csv +2 -0
- data/lib/ruby_sync/connectors/active_record_connector.rb +19 -4
- data/lib/ruby_sync/connectors/base_connector.rb +3 -9
- data/lib/ruby_sync/connectors/file_connector.rb +2 -2
- data/lib/ruby_sync/event.rb +16 -9
- data/lib/ruby_sync/pipelines/base_pipeline.rb +137 -164
- data/lib/ruby_sync/util/utilities.rb +14 -21
- data/lib/ruby_sync.rb +37 -39
- data/test/ruby_sync_test.rb +3 -2
- data/test/tc_active_record_connector.rb +15 -6
- data/test/tc_csv_file_connector.rb +10 -6
- data/test/tc_ldap_connector.rb +1 -1
- data/test/tc_memory_connectors.rb +5 -3
- data/test/tc_transformation.rb +15 -7
- data/test/tc_utilities.rb +1 -1
- data/test/tc_xml_connectors.rb +4 -0
- data/test/ts_rubysync.rb +3 -1
- metadata +21 -81
- data/.project +0 -17
- data/docs/in_pipeline.graffle +0 -2690
- data/docs/out_pipeline.graffle +0 -3274
- data/docs/to_sync.txt +0 -15
- data/docs/walkthru.txt +0 -186
- data/examples/ar_client_webapp/README +0 -182
- data/examples/ar_client_webapp/Rakefile +0 -10
- data/examples/ar_client_webapp/app/controllers/application.rb +0 -7
- data/examples/ar_client_webapp/app/controllers/user_controller.rb +0 -5
- data/examples/ar_client_webapp/app/helpers/application_helper.rb +0 -3
- data/examples/ar_client_webapp/app/helpers/user_helper.rb +0 -2
- data/examples/ar_client_webapp/app/models/user.rb +0 -2
- data/examples/ar_client_webapp/config/boot.rb +0 -45
- data/examples/ar_client_webapp/config/database.yml +0 -36
- data/examples/ar_client_webapp/config/environment.rb +0 -60
- data/examples/ar_client_webapp/config/environments/development.rb +0 -21
- data/examples/ar_client_webapp/config/environments/production.rb +0 -18
- data/examples/ar_client_webapp/config/environments/test.rb +0 -19
- data/examples/ar_client_webapp/config/routes.rb +0 -23
- data/examples/ar_client_webapp/db/migrate/001_create_users.rb +0 -13
- data/examples/ar_client_webapp/db/schema.rb +0 -13
- data/examples/ar_client_webapp/doc/README_FOR_APP +0 -2
- data/examples/ar_client_webapp/log/development.log +0 -753
- 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 +0 -40
- data/examples/ar_client_webapp/public/404.html +0 -30
- data/examples/ar_client_webapp/public/500.html +0 -30
- data/examples/ar_client_webapp/public/dispatch.cgi +0 -10
- data/examples/ar_client_webapp/public/dispatch.fcgi +0 -24
- data/examples/ar_client_webapp/public/dispatch.rb +0 -10
- data/examples/ar_client_webapp/public/favicon.ico +0 -0
- data/examples/ar_client_webapp/public/images/rails.png +0 -0
- data/examples/ar_client_webapp/public/index.html +0 -277
- data/examples/ar_client_webapp/public/javascripts/application.js +0 -2
- data/examples/ar_client_webapp/public/javascripts/controls.js +0 -833
- data/examples/ar_client_webapp/public/javascripts/dragdrop.js +0 -942
- data/examples/ar_client_webapp/public/javascripts/effects.js +0 -1088
- data/examples/ar_client_webapp/public/javascripts/prototype.js +0 -2515
- data/examples/ar_client_webapp/public/robots.txt +0 -1
- data/examples/ar_client_webapp/script/about +0 -3
- data/examples/ar_client_webapp/script/breakpointer +0 -3
- data/examples/ar_client_webapp/script/console +0 -3
- data/examples/ar_client_webapp/script/destroy +0 -3
- data/examples/ar_client_webapp/script/generate +0 -3
- data/examples/ar_client_webapp/script/performance/benchmarker +0 -3
- data/examples/ar_client_webapp/script/performance/profiler +0 -3
- data/examples/ar_client_webapp/script/plugin +0 -3
- data/examples/ar_client_webapp/script/process/inspector +0 -3
- data/examples/ar_client_webapp/script/process/reaper +0 -3
- data/examples/ar_client_webapp/script/process/spawner +0 -3
- data/examples/ar_client_webapp/script/runner +0 -3
- data/examples/ar_client_webapp/script/server +0 -3
- data/examples/ar_client_webapp/test/fixtures/users.yml +0 -5
- data/examples/ar_client_webapp/test/functional/user_controller_test.rb +0 -18
- data/examples/ar_client_webapp/test/test_helper.rb +0 -28
- data/examples/ar_client_webapp/test/unit/user_test.rb +0 -10
- data/examples/ar_client_webapp/tmp/sessions/ruby_sess.e2e3c63a67baef6d +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/ims2/connectors/hr_db_connector.rb +0 -6
- data/examples/ims2/connectors/my_csv_connector.rb +0 -12
- data/examples/ims2/pipelines/hr_import_pipeline.rb +0 -33
- data/examples/my_ims/connectors/my_csv_connector.rb +0 -10
- data/examples/my_ims/connectors/my_db_connector.rb +0 -7
- data/examples/my_ims/pipelines/my_pipeline.rb +0 -33
- data/lib/rubysync.rb +0 -19
- data/nbproject/private/private.properties +0 -3
- data/nbproject/project.properties +0 -8
- data/nbproject/project.xml +0 -16
- data/rubysync.tmproj +0 -568
- data/test/tc_rubysync.rb +0 -28
@@ -1 +0,0 @@
|
|
1
|
-
# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
|
@@ -1,18 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
-
require 'user_controller'
|
3
|
-
|
4
|
-
# Re-raise errors caught by the controller.
|
5
|
-
class UserController; def rescue_action(e) raise e end; end
|
6
|
-
|
7
|
-
class UserControllerTest < Test::Unit::TestCase
|
8
|
-
def setup
|
9
|
-
@controller = UserController.new
|
10
|
-
@request = ActionController::TestRequest.new
|
11
|
-
@response = ActionController::TestResponse.new
|
12
|
-
end
|
13
|
-
|
14
|
-
# Replace this with your real tests.
|
15
|
-
def test_truth
|
16
|
-
assert true
|
17
|
-
end
|
18
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
ENV["RAILS_ENV"] = "test"
|
2
|
-
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
|
3
|
-
require 'test_help'
|
4
|
-
|
5
|
-
class Test::Unit::TestCase
|
6
|
-
# Transactional fixtures accelerate your tests by wrapping each test method
|
7
|
-
# in a transaction that's rolled back on completion. This ensures that the
|
8
|
-
# test database remains unchanged so your fixtures don't have to be reloaded
|
9
|
-
# between every test method. Fewer database queries means faster tests.
|
10
|
-
#
|
11
|
-
# Read Mike Clark's excellent walkthrough at
|
12
|
-
# http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
|
13
|
-
#
|
14
|
-
# Every Active Record database supports transactions except MyISAM tables
|
15
|
-
# in MySQL. Turn off transactional fixtures in this case; however, if you
|
16
|
-
# don't care one way or the other, switching from MyISAM to InnoDB tables
|
17
|
-
# is recommended.
|
18
|
-
self.use_transactional_fixtures = true
|
19
|
-
|
20
|
-
# Instantiated fixtures are slow, but give you @david where otherwise you
|
21
|
-
# would need people(:david). If you don't want to migrate your existing
|
22
|
-
# test cases which use the @david style and don't mind the speed hit (each
|
23
|
-
# instantiated fixtures translates to a database query per test method),
|
24
|
-
# then set this back to true.
|
25
|
-
self.use_instantiated_fixtures = false
|
26
|
-
|
27
|
-
# Add more helper methods to be used by all tests here...
|
28
|
-
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,12 +0,0 @@
|
|
1
|
-
class MyCsvConnector < RubySync::Connectors::CsvFileConnector
|
2
|
-
options(
|
3
|
-
:name=>"MyCSV",
|
4
|
-
:field_names=>['given name', 'last name', 'phone number', 'email'],
|
5
|
-
:path_field=>'email',
|
6
|
-
:in_path=>'/tmp/csv/in',
|
7
|
-
:out_path=>'/tmp/csv/out',
|
8
|
-
:in_glob=>'*.csv',
|
9
|
-
:out_extension=>'.csv'
|
10
|
-
)
|
11
|
-
|
12
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
class HrImportPipeline < RubySync::Pipelines::BasePipeline
|
2
|
-
|
3
|
-
client :my_csv
|
4
|
-
|
5
|
-
vault :hr_db
|
6
|
-
|
7
|
-
# Remove any fields that you don't want to set in the client from the vault
|
8
|
-
allow_out :first_name, :last_name
|
9
|
-
|
10
|
-
# Remove any fields that you don't want to set in the vault from the client
|
11
|
-
allow_in :first_name, :last_name
|
12
|
-
|
13
|
-
# If the client and vault have different names for the same field, define the
|
14
|
-
# the mapping here. For example, if the vault has a field called "first name" and
|
15
|
-
# the client has a field called givenName you may put:
|
16
|
-
# 'first name' => 'givenName'
|
17
|
-
# separate each mapping with a comma.
|
18
|
-
# The following fields were detected on the client:
|
19
|
-
# 'given name', 'last name', 'phone number', 'email'
|
20
|
-
map_vault_to_client(
|
21
|
-
'first_name' => 'given name',
|
22
|
-
'last_name' => 'last name'
|
23
|
-
)
|
24
|
-
|
25
|
-
# "in" means going from client to vault
|
26
|
-
#in_transform do
|
27
|
-
#end
|
28
|
-
|
29
|
-
# "out" means going from vault to client
|
30
|
-
#out_transform do
|
31
|
-
#end
|
32
|
-
|
33
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
class MyPipeline < RubySync::Pipelines::BasePipeline
|
2
|
-
|
3
|
-
client :my_csv
|
4
|
-
|
5
|
-
vault :my_db
|
6
|
-
|
7
|
-
# Remove any fields that you don't want to set in the client from the vault
|
8
|
-
allow_out :first_name, :last_name
|
9
|
-
|
10
|
-
# Remove any fields that you don't want to set in the vault from the client
|
11
|
-
allow_in :first_name, :last_name
|
12
|
-
|
13
|
-
# If the client and vault have different names for the same field, define the
|
14
|
-
# the mapping here. For example, if the vault has a field called "first name" and
|
15
|
-
# the client has a field called givenName you may put:
|
16
|
-
# 'first name' => 'givenName'
|
17
|
-
# separate each mapping with a comma.
|
18
|
-
# The following fields were detected on the client:
|
19
|
-
# 'id', 'given_name', 'surname'
|
20
|
-
map_vault_to_client(
|
21
|
-
'first_name' => 'given_name',
|
22
|
-
'last_name' => 'surname'
|
23
|
-
)
|
24
|
-
|
25
|
-
# "in" means going from client to vault
|
26
|
-
#in_transform do
|
27
|
-
#end
|
28
|
-
|
29
|
-
# "out" means going from vault to client
|
30
|
-
#out_transform do
|
31
|
-
#end
|
32
|
-
|
33
|
-
end
|
data/lib/rubysync.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby -w
|
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
|
-
|
17
|
-
class Rubysync
|
18
|
-
VERSION = '0.0.5'
|
19
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
bin.dir=${file.reference.rubysync-bin}
|
2
|
-
file.reference.rubysync-bin=bin
|
3
|
-
file.reference.rubysync-lib=lib
|
4
|
-
file.reference.rubysync-test=test
|
5
|
-
main.file=
|
6
|
-
source.encoding=UTF-8
|
7
|
-
src.dir=${file.reference.rubysync-lib}
|
8
|
-
test.src.dir=${file.reference.rubysync-test}
|
data/nbproject/project.xml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<project xmlns="http://www.netbeans.org/ns/project/1">
|
3
|
-
<type>org.netbeans.modules.ruby.rubyproject</type>
|
4
|
-
<configuration>
|
5
|
-
<data xmlns="http://www.netbeans.org/ns/ruby-project/1">
|
6
|
-
<name>RubySync</name>
|
7
|
-
<source-roots>
|
8
|
-
<root id="src.dir"/>
|
9
|
-
<root id="bin.dir"/>
|
10
|
-
</source-roots>
|
11
|
-
<test-roots>
|
12
|
-
<root id="test.src.dir"/>
|
13
|
-
</test-roots>
|
14
|
-
</data>
|
15
|
-
</configuration>
|
16
|
-
</project>
|