rest-ftp-daemon 0.221 → 0.221.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rest-ftp-daemon/constants.rb +1 -1
- data/lib/rest-ftp-daemon/helpers.rb +5 -3
- data/lib/rest-ftp-daemon/views/dashboard_status.haml +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce65a20b09296045699bc719c74f6e4982427238
|
4
|
+
data.tar.gz: b92e66df1a341fa14798138b32a2605aa5ed9f8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2de9e872d5bea59c321d017331adbfb00ae59712f8b4abe23f4a2895a0bc3eb6f6f7a508b20b42df67bc684497bb2a033afc4bddfc44f77d04b96a7442e9cfb
|
7
|
+
data.tar.gz: 7623cde2c659d870b3e47f73d5b04014cea03d07be9ce44860d1661e3e736b40a8209295aa72c3c68cd6055d108f69205659811a3ffa10fb70c5b7f5113f91cd
|
data/Gemfile.lock
CHANGED
@@ -8,13 +8,15 @@ module RestFtpDaemon
|
|
8
8
|
config
|
9
9
|
end
|
10
10
|
|
11
|
-
def self.format_bytes number, unit=""
|
11
|
+
def self.format_bytes number, unit="", decimals = 0
|
12
12
|
return "Ø" if number.nil? || number.to_f.zero?
|
13
13
|
|
14
14
|
units = ["", "k", "M", "G", "T", "P" ]
|
15
15
|
index = ( Math.log( number ) / Math.log( 2 ) ).to_i / 10
|
16
|
-
converted = number.
|
17
|
-
|
16
|
+
converted = number.to_f / ( 1024 ** index )
|
17
|
+
|
18
|
+
truncated = converted.round(decimals)
|
19
|
+
"#{truncated} #{units[index]}#{unit}"
|
18
20
|
end
|
19
21
|
|
20
22
|
def self.text_or_empty text
|
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:
|
4
|
+
version: 0.221.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-05-
|
11
|
+
date: 2015-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|