dcas-ruby 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/dcas-ruby.gemspec +1 -1
  3. data/lib/dcas.rb +10 -3
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.7
1
+ 0.3.8
data/dcas-ruby.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dcas-ruby}
8
- s.version = "0.3.7"
8
+ s.version = "0.3.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["BehindLogic"]
data/lib/dcas.rb CHANGED
@@ -73,9 +73,15 @@ module DCAS
73
73
  end && begin
74
74
  # 4) If we're still connected, check the file size of the file, then move it out of STAGING and mark file as completed.
75
75
  if ftp.nlst.include?(shortname) && ftp.size(shortname) == File.size(filename)
76
- ftp.rename(shortname, "../#{outgoing_bucket}/#{shortname}") unless testing || outgoing_bucket == DCAS::STAGING_BUCKET
77
- lock_object.submit_finished!(shortname) if lock_object
78
- true
76
+ begin
77
+ ftp.rename(shortname, "../#{outgoing_bucket}/#{shortname}") unless testing || outgoing_bucket == DCAS::STAGING_BUCKET
78
+ true
79
+ rescue Object
80
+ false
81
+ end && begin
82
+ lock_object.submit_finished!(shortname) if lock_object
83
+ true
84
+ end
79
85
  else
80
86
  if lock_object
81
87
  lock_object.submit_failed!(shortname)
@@ -85,6 +91,7 @@ module DCAS
85
91
  end
86
92
  end
87
93
  rescue Object
94
+ lock_object.submit_failed!(shortname) if lock_object
88
95
  false
89
96
  end
90
97
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dcas-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - BehindLogic