simple_sync 0.0.2 → 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.
- checksums.yaml +4 -4
- data/bin/simple_sync +2 -1
- data/lib/simple_sync/simple_sync.rb +7 -5
- data/lib/simple_sync/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbff489f48d64f5346c0a5adba82dee17abe7b39
|
4
|
+
data.tar.gz: 30677740648886cf8b3781b2405c9c639a86351a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 185116627b854e5311e6b3a4457f661fdb4b96ae67b9f71945b999e152c89253c093fa7abc8b6e029ebe933f11583917bf96ea79d45c8f1007906852f4b33235
|
7
|
+
data.tar.gz: 6159b9adbbac2dd07dc84113cf48e19b12faf7ac9445d48eb855eb50bcd593622c347e16697b7f95722d00eefbfa25e1c426bfeabfb99be3858edac506d01d55
|
data/bin/simple_sync
CHANGED
@@ -26,7 +26,6 @@ class SimpleSync
|
|
26
26
|
|
27
27
|
def load_config
|
28
28
|
configuration = read_config_from_file()
|
29
|
-
#puts configuration
|
30
29
|
return configuration if configuration[:status] == 'error'
|
31
30
|
@config_list = JSON.parse(configuration[:config], symbolize_names: true)
|
32
31
|
return { status: 'success' }
|
@@ -36,11 +35,14 @@ class SimpleSync
|
|
36
35
|
output = []
|
37
36
|
@config_list[:configurations].each { |config|
|
38
37
|
config[:config][:sources].each { |source|
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
reader,writer = IO.pipe
|
39
|
+
IO.popen("rsync #{config[:config][:rsync]} --itemize-changes #{source} #{config[:config][:destination]} #{config[:config][:rsync_suffix]} "){ |output|
|
40
|
+
output.each do |line|
|
41
|
+
puts line
|
42
|
+
end
|
43
|
+
}
|
42
44
|
}
|
43
45
|
}
|
44
|
-
{ status: 'success'
|
46
|
+
{ status: 'success'}
|
45
47
|
end
|
46
48
|
end
|
data/lib/simple_sync/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Claburn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|