odisk 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e47c67f5f819c4407c0abf408cfd60dbc73500f9
4
- data.tar.gz: 5d46d912edaea7dafa30ddb77501faeacb11353b
2
+ SHA256:
3
+ metadata.gz: 15f5e70c89940ff3b118ee2af18e325c17ccc295feb29ce9094df1c9b5ca0af8
4
+ data.tar.gz: 508c5b8aba4dcb6213d74ec571d99cfe3299ed106d30903f55db1aa7bfff9939
5
5
  SHA512:
6
- metadata.gz: e009aef9fed7f59faec64e2c76ad2bae9dde297cf659afb22b30271dc262c455b25c9d9664cd7ad8bea8cb7c820d236ffcdd76a9524f667105aba6dd91d87f4a
7
- data.tar.gz: a87cbd291609febc9406e6baf46dfd242b0d1f9a17cbc1d904c85d9c42a4363a4f4a393c44334894605a2ad11c5d90261e0926aa94b406560cf2090f10aa7187
6
+ metadata.gz: dccde36cc8a7d9d7d4b4f1b9c2a26e77ab2f9c81a2c781ae9e36e5edefb53f30f213abb9c4587980037e0614231f185f8db82eedb700eda60a440f6584133b2b
7
+ data.tar.gz: 0e30cba180161353aff6905b99440a12cae965e2089898a2562438cf2a270d9e979d61ef449fd2684caf670d88b96a3a3c81ee2c9ea881356af39ef3c50718b1
data/README.md CHANGED
@@ -25,6 +25,12 @@ which utilizes an alternative approach to dealing with multiple threads.
25
25
 
26
26
  ## <a name="release">Release Notes</a>
27
27
 
28
+ ### Release 1.0.2
29
+
30
+ - Made groups handling more tolerant.
31
+
32
+ - Updated gpg command arguments for more modern version.
33
+
28
34
  ### Release 1.0.1
29
35
 
30
36
  - Ruby time has changed so a change in time comparisons was made.
@@ -20,7 +20,7 @@ module ODisk
20
20
  def encrypt(src, dest, remote)
21
21
  ::Opee::Env.info("encrypt \"#{src}\" into \"#{dest}\"")
22
22
  unless $dry_run
23
- `gpg -c --batch --yes --force-mdc --no-use-agent --passphrase-file "#{$remote.pass_file}" -o "#{dest}" "#{src}"`
23
+ `gpg -c --batch --yes --force-mdc --passphrase-file "#{$remote.pass_file}" -o "#{dest}" "#{src}"`
24
24
  @copy_queue.add_method(:upload, dest, remote, true)
25
25
  end
26
26
  @crypt_queue.ask(:ready, self)
@@ -29,7 +29,7 @@ module ODisk
29
29
  def decrypt(src, dest)
30
30
  ::Opee::Env.info("decrypt \"#{src}\" into \"#{dest}\"")
31
31
  unless $dry_run
32
- `gpg -d --batch --yes -q --no-use-agent --passphrase-file "#{$remote.pass_file}" -o "#{dest}" "#{src}"`
32
+ `gpg -d --batch --yes -q --passphrase-file "#{$remote.pass_file}" -o "#{dest}" "#{src}"`
33
33
  ::File.delete(src)
34
34
  ::Opee::Env.warn("Downloaded and decrypted \"#{dest}\"")
35
35
  end
@@ -63,7 +63,9 @@ module ODisk
63
63
  end
64
64
  h[k] = [lv, rv] unless lv == rv unless (:mtime == m && !@remote.is_a?(::ODisk::File))
65
65
  end
66
- pre = prefix.nil? ? @local.name : (prefix + '.' + @local.name)
66
+ unless @local.nil?
67
+ pre = prefix.nil? ? @local.name : (prefix + '.' + @local.name)
68
+ end
67
69
  @sub_diffs.each do |name,d|
68
70
  d.fill_hash(pre, h)
69
71
  end
@@ -24,7 +24,11 @@ module ODisk
24
24
  def self.create_info(path, filename=nil, top=nil)
25
25
  top = $local_top if top.nil?
26
26
  filename = ::File.basename(path) if filename.nil?
27
- stat = ::File.lstat(path)
27
+ begin
28
+ stat = ::File.lstat(path)
29
+ rescue
30
+ return nil
31
+ end
28
32
  if stat.directory?
29
33
  c = ::ODisk::Dir.new(filename)
30
34
  elsif stat.symlink?
@@ -73,6 +73,22 @@ module ODisk
73
73
  # TBD tell progress about the completion
74
74
  end
75
75
 
76
+ def get_group(g)
77
+ begin
78
+ Etc.getgrnam(g).gid
79
+ rescue
80
+ nil
81
+ end
82
+ end
83
+
84
+ def get_owner(o)
85
+ begin
86
+ Etc.getpwnam(o).uid
87
+ rescue
88
+ nil
89
+ end
90
+ end
91
+
76
92
  def fix_stats(path, info)
77
93
  e = Digest.create_info(path)
78
94
  diff = Diff.new(e, info)
@@ -84,12 +100,12 @@ module ODisk
84
100
  when :mtime
85
101
  ::File.utime(info.mtime, info.mtime, path) unless info.is_a?(::ODisk::Link)
86
102
  when :owner
87
- owner = Etc.getpwnam(info.owner).uid
88
- group = Etc.getgrnam(info.group).gid
103
+ owner = get_owner(info.owner)
104
+ group = get_group(info.group)
89
105
  ::File::lchown(owner, group, path)
90
106
  when :group
91
- owner = Etc.getpwnam(info.owner).uid
92
- group = Etc.getgrnam(info.group).gid
107
+ owner = get_owner(info.owner)
108
+ group = get_group(info.group)
93
109
  begin
94
110
  ::File::lchown(owner, group, path)
95
111
  rescue Errno::EPERM
@@ -1,5 +1,5 @@
1
1
 
2
2
  module ODisk
3
3
  # Current version of the module.
4
- VERSION = '1.0.1'
4
+ VERSION = '1.0.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: odisk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Ohler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-08 00:00:00.000000000 Z
11
+ date: 2018-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oterm
@@ -137,9 +137,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  version: '0'
138
138
  requirements: []
139
139
  rubyforge_project: odisk
140
- rubygems_version: 2.4.5
140
+ rubygems_version: 2.7.3
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: Remote Encrypted File Synchronization, oDisk
144
144
  test_files: []
145
- has_rdoc: true