runison 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt ADDED
@@ -0,0 +1,3 @@
1
+ === 0.0.1 / 2009-03-05
2
+
3
+ * first small release just to test hoe conf for this project
data/Manifest.txt ADDED
@@ -0,0 +1,7 @@
1
+ History.txt
2
+ Manifest.txt
3
+ README.txt
4
+ Rakefile
5
+ bin/runison
6
+ lib/runison.rb
7
+ test/test_runison.rb
data/README.txt ADDED
@@ -0,0 +1,49 @@
1
+ = runison
2
+
3
+ * http://runison.rubyforge.org
4
+
5
+ == DESCRIPTION:
6
+
7
+ runison is a ruby helper library to use unison, a rsync like protocol. On the contrary to rsync, unison works on multiple os (windows, linuw, mac) http://www.cis.upenn.edu/~bcpierce/unison/
8
+
9
+ == FEATURES:
10
+
11
+ * Anything unison can do
12
+
13
+ == SYNOPSIS:
14
+
15
+ ignore_list = ['desktop.ini', 'My musique', 'Mes vid?os', 'Updater5']
16
+ synchro('C:/my/folder/1', "C:/my/folder/2", "log_folder_1_2", ignore_list)
17
+
18
+ == REQUIREMENTS:
19
+
20
+ * Install Unison on you local machine, "unison" exec need to be in your path var
21
+
22
+ == INSTALL:
23
+
24
+ * sudo gem install runison
25
+
26
+ == LICENSE:
27
+
28
+ (The MIT License)
29
+
30
+ Copyright (c) 2009 FIX
31
+
32
+ Permission is hereby granted, free of charge, to any person obtaining
33
+ a copy of this software and associated documentation files (the
34
+ 'Software'), to deal in the Software without restriction, including
35
+ without limitation the rights to use, copy, modify, merge, publish,
36
+ distribute, sublicense, and/or sell copies of the Software, and to
37
+ permit persons to whom the Software is furnished to do so, subject to
38
+ the following conditions:
39
+
40
+ The above copyright notice and this permission notice shall be
41
+ included in all copies or substantial portions of the Software.
42
+
43
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
44
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
45
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
46
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
47
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
48
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
49
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+ require './lib/runison.rb'
6
+
7
+ Hoe.new('runison', Runison::VERSION) do |p|
8
+ p.rubyforge_name = 'runison'
9
+ p.developer('Benjamin Francisoud', 'pub.cog@gmail.com')
10
+ end
11
+
12
+ # vim: syntax=Ruby
data/bin/runison ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ abort "you need to write me"
data/lib/runison.rb ADDED
@@ -0,0 +1,19 @@
1
+ class Runison
2
+ VERSION = '0.0.1'
3
+
4
+ # synchronize 2 folders with minimum messages
5
+ def synchro(folder1, folder2, logfilename, ignore_list={})
6
+ mkdir(folder1) unless(folder1.exists?)
7
+ mkdir(folder2) unless(folder2.exists?)
8
+
9
+ options = ' -auto -batch -terse '
10
+ log = '-log -logfile #{logfilename}.log'
11
+ ignore = ""
12
+ ignore_list.each do |filename|
13
+ ignore << "-ignore \"Name #{filename}\" "
14
+ end
15
+
16
+ command = "unison #{folder1} #{folder2} #{options} #{log} #{ignore}"
17
+ cmd(command)
18
+ end # synchro
19
+ end
@@ -0,0 +1,8 @@
1
+ require "test/unit"
2
+ require "runison"
3
+
4
+ class TestRunison < Test::Unit::TestCase
5
+ def test_sanity
6
+ flunk "write tests or I will kneecap you"
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: runison
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Benjamin Francisoud
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-03-06 00:00:00 +01:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: hoe
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.9.0
24
+ version:
25
+ description: runison is a ruby helper library to use unison, a rsync like protocol. On the contrary to rsync, unison works on multiple os (windows, linuw, mac) http://www.cis.upenn.edu/~bcpierce/unison/
26
+ email:
27
+ - pub.cog@gmail.com
28
+ executables:
29
+ - runison
30
+ extensions: []
31
+
32
+ extra_rdoc_files:
33
+ - History.txt
34
+ - Manifest.txt
35
+ - README.txt
36
+ files:
37
+ - History.txt
38
+ - Manifest.txt
39
+ - README.txt
40
+ - Rakefile
41
+ - bin/runison
42
+ - lib/runison.rb
43
+ - test/test_runison.rb
44
+ has_rdoc: true
45
+ homepage: http://runison.rubyforge.org
46
+ post_install_message:
47
+ rdoc_options:
48
+ - --main
49
+ - README.txt
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: "0"
57
+ version:
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: "0"
63
+ version:
64
+ requirements: []
65
+
66
+ rubyforge_project: runison
67
+ rubygems_version: 1.3.1
68
+ signing_key:
69
+ specification_version: 2
70
+ summary: runison is a ruby helper library to use unison, a rsync like protocol
71
+ test_files:
72
+ - test/test_runison.rb