odisk 0.2.0 → 0.2.1
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/README.md +3 -3
- data/lib/odisk/copier.rb +1 -0
- data/lib/odisk/crypter.rb +1 -0
- data/lib/odisk/digester.rb +2 -0
- data/lib/odisk/fetcher.rb +4 -1
- data/lib/odisk/planner.rb +5 -4
- data/lib/odisk/statfixer.rb +2 -0
- data/lib/odisk/syncstarter.rb +1 -0
- data/lib/odisk/version.rb +1 -1
- metadata +5 -4
data/README.md
CHANGED
@@ -25,9 +25,9 @@ which utilizes an alternative approach to dealing with multiple threads.
|
|
25
25
|
|
26
26
|
## <a name="release">Release Notes</a>
|
27
27
|
|
28
|
-
### Release 0.2.
|
28
|
+
### Release 0.2.1
|
29
29
|
|
30
|
-
-
|
30
|
+
- Fixed symlink sync.
|
31
31
|
|
32
32
|
# Plans and Notes
|
33
33
|
|
@@ -65,7 +65,7 @@ know when you run into bugs.
|
|
65
65
|
- comp, crypt, and transfer send status to progress actor
|
66
66
|
- Optional terminal display
|
67
67
|
|
68
|
-
- Support
|
68
|
+
- Support background application with web front end (much later)
|
69
69
|
|
70
70
|
## Installation
|
71
71
|
|
data/lib/odisk/copier.rb
CHANGED
data/lib/odisk/crypter.rb
CHANGED
data/lib/odisk/digester.rb
CHANGED
data/lib/odisk/fetcher.rb
CHANGED
@@ -9,6 +9,9 @@ end
|
|
9
9
|
require 'oj'
|
10
10
|
|
11
11
|
module ODisk
|
12
|
+
# Fetches a remote Digest JSON document and creates a Digest Object from
|
13
|
+
# it. That Digest is then passed on to a Opee::Collector.
|
14
|
+
|
12
15
|
class Fetcher < ::Opee::Actor
|
13
16
|
|
14
17
|
def initialize(options={})
|
@@ -39,7 +42,7 @@ module ODisk
|
|
39
42
|
files = @ftp.dir.entries(top).map {|e| e.name }
|
40
43
|
job.remote_digest = Oj.load(json, mode: :object)
|
41
44
|
missing = []
|
42
|
-
job.remote_digest.entries.each { |e| missing << e.name unless files.include?(e.name + '.gpg') || files.include?(e.name) }
|
45
|
+
job.remote_digest.entries.each { |e| missing << e.name unless files.include?(e.name + '.gpg') || files.include?(e.name) || e.is_a?(::ODisk::Link) }
|
43
46
|
unless ::ODisk::Planner::Step::REMOTE == $master
|
44
47
|
missing.each { |name| job.remote_digest.delete(name) }
|
45
48
|
end
|
data/lib/odisk/planner.rb
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
require 'oj'
|
3
3
|
|
4
4
|
module ODisk
|
5
|
+
# The Planner collects input in the form of Digests from a Digester and a
|
6
|
+
# Fetcher and then determines what actions are necessary to synchronize a
|
7
|
+
# directory. The Planner then asks Copiers and Crypters to perform the
|
8
|
+
# synchronization operations.
|
5
9
|
class Planner < ::Opee::Collector
|
6
10
|
|
7
11
|
def initialize(options={})
|
@@ -130,7 +134,6 @@ module ODisk
|
|
130
134
|
# TBD if they are the same then don't bother
|
131
135
|
Oj.to_file(::File.join(odisk_dir, 'digest.old.json'), job.previous_digest, indent: 2) unless job.previous_digest.nil?
|
132
136
|
Oj.to_file(::File.join(odisk_dir, 'digest.json'), job.new_digest, indent: 2)
|
133
|
-
|
134
137
|
# get the transfers going for all files
|
135
138
|
job.new_digest.entries.each do |e|
|
136
139
|
path = job.path.empty? ? e.name : ::File.join(job.path, e.name)
|
@@ -253,9 +256,7 @@ module ODisk
|
|
253
256
|
nrh[e.name] = e
|
254
257
|
nlh[e.name] = e
|
255
258
|
when Step::LINK
|
256
|
-
|
257
|
-
#TBD create link
|
258
|
-
end
|
259
|
+
# Handled in StatFixer
|
259
260
|
when Step::ERROR
|
260
261
|
# TBD
|
261
262
|
end
|
data/lib/odisk/statfixer.rb
CHANGED
data/lib/odisk/syncstarter.rb
CHANGED
data/lib/odisk/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: odisk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: opee
|
@@ -104,7 +104,8 @@ files:
|
|
104
104
|
- lib/odisk.rb
|
105
105
|
- LICENSE
|
106
106
|
- README.md
|
107
|
-
-
|
107
|
+
- !binary |-
|
108
|
+
YmluL29kaXNr
|
108
109
|
homepage: http://www.ohler.com/odisk
|
109
110
|
licenses: []
|
110
111
|
post_install_message:
|
@@ -127,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
128
|
version: '0'
|
128
129
|
requirements: []
|
129
130
|
rubyforge_project: odisk
|
130
|
-
rubygems_version: 1.8.
|
131
|
+
rubygems_version: 1.8.21
|
131
132
|
signing_key:
|
132
133
|
specification_version: 3
|
133
134
|
summary: Remote Encrypted File Synchronization, oDisk
|