etna 0.1.25 → 0.1.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/etna.completion +3 -26810
- data/lib/commands.rb +3 -1
- data/lib/etna.rb +1 -0
- data/lib/etna/clients/magma/workflows/materialize_magma_record_files_workflow.rb +17 -42
- data/lib/etna/clients/metis/models.rb +9 -1
- data/lib/etna/clients/metis/workflows.rb +1 -0
- data/lib/etna/clients/metis/workflows/sync_metis_data_workflow.rb +102 -0
- data/lib/etna/clients/polyphemus/models.rb +4 -3
- data/lib/etna/filesystem.rb +186 -11
- data/lib/etna/formatting.rb +16 -0
- metadata +4 -2
@@ -0,0 +1,16 @@
|
|
1
|
+
module Etna
|
2
|
+
class Formatting
|
3
|
+
SIZE_UNITS = %W(B KiB MiB GiB TiB).freeze
|
4
|
+
|
5
|
+
def self.as_size(number)
|
6
|
+
if number.to_i < 1024
|
7
|
+
exponent = 0
|
8
|
+
else
|
9
|
+
exponent = [(Math.log(number) / Math.log(1024)).to_i, SIZE_UNITS.size].min
|
10
|
+
number /= 1024 ** exponent
|
11
|
+
end
|
12
|
+
|
13
|
+
"#{number} #{SIZE_UNITS[exponent]}"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: etna
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Saurabh Asthana
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -129,6 +129,7 @@ files:
|
|
129
129
|
- lib/etna/clients/metis/workflows.rb
|
130
130
|
- lib/etna/clients/metis/workflows/metis_download_workflow.rb
|
131
131
|
- lib/etna/clients/metis/workflows/metis_upload_workflow.rb
|
132
|
+
- lib/etna/clients/metis/workflows/sync_metis_data_workflow.rb
|
132
133
|
- lib/etna/clients/polyphemus.rb
|
133
134
|
- lib/etna/clients/polyphemus/client.rb
|
134
135
|
- lib/etna/clients/polyphemus/models.rb
|
@@ -144,6 +145,7 @@ files:
|
|
144
145
|
- lib/etna/errors.rb
|
145
146
|
- lib/etna/ext.rb
|
146
147
|
- lib/etna/filesystem.rb
|
148
|
+
- lib/etna/formatting.rb
|
147
149
|
- lib/etna/generate_autocompletion_script.rb
|
148
150
|
- lib/etna/hmac.rb
|
149
151
|
- lib/etna/json_serializable_struct.rb
|