odisk 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
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.0
28
+ ### Release 0.2.1
29
29
 
30
- - Renamed Orefs to oDisk.
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 backgroup application with web front end (much later)
68
+ - Support background application with web front end (much later)
69
69
 
70
70
  ## Installation
71
71
 
@@ -1,5 +1,6 @@
1
1
 
2
2
  module ODisk
3
+ # Provides upload and download functionality using sftp and ssh on a single connection.
3
4
  class Copier < ::Opee::Actor
4
5
 
5
6
  def initialize(options={})
@@ -1,5 +1,6 @@
1
1
 
2
2
  module ODisk
3
+ # Encrypts and decrypts file using GnuPG.
3
4
  class Crypter < ::Opee::Actor
4
5
 
5
6
  def initialize(options={})
@@ -2,6 +2,8 @@
2
2
  require 'etc'
3
3
 
4
4
  module ODisk
5
+ # Creates a Digest Object for specified directories and passes on the result
6
+ # to a Opee::Collector.
5
7
  class Digester < ::Opee::Actor
6
8
 
7
9
  def initialize(options={})
@@ -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
@@ -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
- if Step::REMOTE == s.master
257
- #TBD create link
258
- end
259
+ # Handled in StatFixer
259
260
  when Step::ERROR
260
261
  # TBD
261
262
  end
@@ -1,5 +1,7 @@
1
1
 
2
2
  module ODisk
3
+ # Sets the owner, group, permissions, and symlink for files and directories
4
+ # after files have been downloaded and decrypted.
3
5
  class StatFixer < ::Opee::Collector
4
6
 
5
7
  def initialize(options={})
@@ -1,5 +1,6 @@
1
1
 
2
2
  module ODisk
3
+ # Initiates the synchronization of a directory.
3
4
  class SyncStarter < ::Opee::Actor
4
5
 
5
6
  def initialize(options={})
@@ -1,5 +1,5 @@
1
1
 
2
2
  module ODisk
3
3
  # Current version of the module.
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
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.0
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-07-28 00:00:00.000000000 Z
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
- - bin/odisk
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.23
131
+ rubygems_version: 1.8.21
131
132
  signing_key:
132
133
  specification_version: 3
133
134
  summary: Remote Encrypted File Synchronization, oDisk