rest-ftp-daemon 1.0.10 → 1.0.11

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: 8b4fcd8815838898224c5d74c5c3fcc2612487af
4
- data.tar.gz: 56826233e4ec35d6551b2f21370b07433c41db7b
3
+ metadata.gz: 121b4b06dcba401cad638e69d0eba965f05f9d49
4
+ data.tar.gz: 24f6e0ce1493fe230c9ca3cd6e122c09562e5be9
5
5
  SHA512:
6
- metadata.gz: 11970060c0b2cb72f7d0e2301f9eb496000a4f9999aa84c709e416d4d48ca8c9ccd419868452971e259ae7a5d9fe05f7863c876c3f032fe77378bb431e2279d2
7
- data.tar.gz: 4396336daa3b239d29dbaec967f18c2a89fe44109359c6da0fdd3cea73cc8accbd2085c517ce715e21f8078f6c58373af8634ff1a7bf161c651207f0ebaee148
6
+ metadata.gz: 8562f6e33fc64cc6a79ea4f9388d0f30cd3b72c77e5bbf977aa5cff0a05bff11fbaea209eec0b613b688e1abac5a82e11eec4d33856d462123d596ce20e39d69
7
+ data.tar.gz: 3b934355ad5af30e4070ae1b191a4b47be38ae3cacb2d3463d66960e10219f573e10a21c41e812f8c3e20e790c62e9de2df00fc9e57b570c8c1c57fea9a71d3d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rest-ftp-daemon (1.0.10)
4
+ rest-ftp-daemon (1.0.11)
5
5
  CFPropertyList
6
6
  activesupport (= 4.2.7.1)
7
7
  api-auth
@@ -66,13 +66,13 @@ module RestFtpDaemon
66
66
 
67
67
  ## EXCEPTION HANDLERS
68
68
  rescue_from Grape::Exceptions::InvalidMessageBody do |exception|
69
- exception_error :api_invalid_message_body, 400, exception, "Bad request: message body does not match declared format, check command syntax"
69
+ exception_error :api_invalid_message_body, 400, exception, "Bad request: message body does not match declared format, check command syntax (#{exception.message})"
70
70
  end
71
71
  rescue_from RestFtpDaemon::SchemeUnsupported do |exception|
72
- exception_error :unsupported_scheme, 422, exception, "Bad request: unsupported scheme"
72
+ exception_error :unsupported_scheme, 422, exception, "Bad request: unsupported scheme (#{exception.message})"
73
73
  end
74
74
  rescue_from RestFtpDaemon::LocationParseError do |exception|
75
- exception_error :location_parse_error, 422, exception, "Bad request: location parse error"
75
+ exception_error :location_parse_error, 422, exception, "Bad request: location parse error (#{exception.message})"
76
76
  end
77
77
  rescue_from :all do |exception|
78
78
  exception_error :api_error, 500, exception
@@ -58,7 +58,9 @@ module RestFtpDaemon
58
58
  end
59
59
 
60
60
  def path
61
- File.join(@dir.to_s, name.to_s)
61
+ # Don't join if dirname is empty
62
+ return name.to_s if @dir.to_s.empty?
63
+ return File.join(@dir.to_s, name.to_s)
62
64
  end
63
65
 
64
66
  def path_fs
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |spec|
3
3
 
4
4
  # Project version
5
- spec.version = "1.0.10"
5
+ spec.version = "1.0.11"
6
6
 
7
7
  # Project description
8
8
  spec.name = "rest-ftp-daemon"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest-ftp-daemon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno MEDICI