rest-ftp-daemon 0.243 → 0.243.1

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
2
  SHA1:
3
- metadata.gz: 8289d36947f2e57440398bc166b4937a8d84455d
4
- data.tar.gz: 9438a30f9e2bb7c6bca9e430fad8755de074c7af
3
+ metadata.gz: be4f56518cd3307fccc1b9796b7df3a264ce6608
4
+ data.tar.gz: b597f34e41e49dab0d8d5cd832c6e5e1758d7282
5
5
  SHA512:
6
- metadata.gz: 76c1d06af488c24dd36fe4a8ad78ce5670040fc4c5d6be5d69837479de7051a98ad82750fff8054af7a0defdc075d728dd9ab3385a456e3be9fb9798bdbb7e7e
7
- data.tar.gz: 081de80b07433233ce8d9e0462d6b3d22ce6b98d30b3db494d9385bae995a95e4277460e3823f89f367ade4ed6173db8180e416281fe8effe3df77a7d604767c
6
+ metadata.gz: f379228d4e395674f2d5b731c99ca7b7a6f9cef14111cc83adfe61faebeb98baf9e1b23372f5a249ad570e5b5287d20a98cf95d6a455ffaeb421bacec5ee22d9
7
+ data.tar.gz: 354982ca7387c5cd14c90556a267d7f9d031acf689aaf117e14a039b3ed6a9480c7b6f0109c3f8b77e636320c160fa01d7f26837fa4dfa1db4717d02ab3c4888
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rest-ftp-daemon (0.243)
4
+ rest-ftp-daemon (0.243.1)
5
5
  double-bag-ftps
6
6
  facter
7
7
  get_process_mem
@@ -25,7 +25,7 @@ GEM
25
25
  minitest (~> 5.1)
26
26
  thread_safe (~> 0.3, >= 0.3.4)
27
27
  tzinfo (~> 1.1)
28
- addressable (2.3.8)
28
+ addressable (2.4.0)
29
29
  ast (2.1.0)
30
30
  astrolabe (1.3.1)
31
31
  parser (~> 2.2)
@@ -15,9 +15,9 @@ module RestFtpDaemon
15
15
  expose :wid, unless: lambda { |object, _options| object.wid.nil? }
16
16
 
17
17
  # expose :error
18
- expose :error_utf8, as: :error
19
- expose :status_utf8, as: :status
20
- expose :target_method_utf8, as: :target_method
18
+ expose :json_error, as: :error
19
+ expose :json_status, as: :status
20
+ expose :json_target, as: :target_method
21
21
 
22
22
  expose :queued_at
23
23
  expose :updated_at
@@ -1,7 +1,7 @@
1
1
  # Terrific constants
2
2
  APP_NAME = "rest-ftp-daemon"
3
3
  APP_NICK = "rftpd"
4
- APP_VER = "0.243"
4
+ APP_VER = "0.243.1"
5
5
 
6
6
  # Provide default config file information
7
7
  APP_LIB = File.expand_path File.dirname(__FILE__)
@@ -42,8 +42,8 @@ module RestFtpDaemon
42
42
  #@updated_at = nil
43
43
  @started_at = nil
44
44
  @finished_at = nil
45
- # @error = nil
46
- # @status = nil
45
+ @error = nil
46
+ @status = nil
47
47
  @runs = 0
48
48
  @wid = nil
49
49
 
@@ -87,7 +87,6 @@ module RestFtpDaemon
87
87
 
88
88
  def process
89
89
  # Update job's status
90
- @error = nil
91
90
  log_info "Job.process"
92
91
 
93
92
  # Prepare job
@@ -122,7 +121,7 @@ module RestFtpDaemon
122
121
  # Process job
123
122
  begin
124
123
  #raise Net::FTPTempError, '451 Téléchargement avorté. Input/output error'.force_encoding("ASCII-8BIT")
125
- start
124
+ run
126
125
 
127
126
  rescue SocketError => exception
128
127
  return oops :ended, exception, :conn_socket_error
@@ -234,18 +233,17 @@ module RestFtpDaemon
234
233
  (Time.now - @queued_at).round(2)
235
234
  end
236
235
 
237
- def status_utf8
238
- utf8 @status
239
- end
240
-
241
- def target_method_utf8
236
+ def json_target
242
237
  utf8 @target_method
243
238
  end
244
239
 
245
- def error_utf8
246
- utf8 @error
240
+ def json_error
241
+ utf8 @error unless @error.nil?
247
242
  end
248
243
 
244
+ def json_status
245
+ utf8 @status unless @status.nil?
246
+ end
249
247
 
250
248
  protected
251
249
 
@@ -442,12 +440,12 @@ module RestFtpDaemon
442
440
  end
443
441
 
444
442
  def set_error value
445
- @error = utf8(value.to_s)
443
+ @error = value
446
444
  touch_job
447
445
  end
448
446
 
449
447
  def set_status value
450
- @status = utf8(value.to_s)
448
+ @status = value
451
449
  touch_job
452
450
  end
453
451
 
@@ -8,7 +8,6 @@
8
8
  - trclass = DASHBOARD_JOB_STYLES[job.status]
9
9
  - runs = job.runs.to_i
10
10
 
11
-
12
11
  - unless job.error.nil?
13
12
  - trclass = "warning"
14
13
 
@@ -34,7 +33,7 @@
34
33
 
35
34
  %td
36
35
  %span.push-status
37
- = job.status_utf8
36
+ = job.status
38
37
 
39
38
  - if (job.status != JOB_STATUS_FINISHED) && (source_processed < source_count)
40
39
  = " (#{source_processed}/#{source_count})"
@@ -57,7 +56,7 @@
57
56
 
58
57
  - else
59
58
  .error{title: job.get(:error_message)}
60
- = Helpers.text_or_empty(job.error_utf8)
59
+ = Helpers.text_or_empty(job.error)
61
60
 
62
61
  %td.nobr.text-right
63
62
  = Helpers.format_bytes(job.get(:transfer_total), "B")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest-ftp-daemon
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.243'
4
+ version: 0.243.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno MEDICI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-01 00:00:00.000000000 Z
11
+ date: 2015-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler