cnvrg 1.11.2 → 1.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cnvrg/cli.rb +6 -3
- data/lib/cnvrg/dataset.rb +18 -8
- data/lib/cnvrg/helpers.rb +1 -1
- data/lib/cnvrg/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b5e5904880441ee1b4610eb69e2d3d5c74e0e58f4f7d1dbd0e1547de0c47e9c
|
4
|
+
data.tar.gz: 37b7b8c6f82b00ca93ccc8a323c84653e2c83757008c57c04d5a98c32bcad2de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a5d6540f9da9ab77321435d5f4ece63010faf6d0ce05a76ce938236eaa6cd4c1853aa004f732313d69b644b66df50da505b9c55a4fc165a6e353f7e48c414c9
|
7
|
+
data.tar.gz: 4f9f90f9f465db06e62a2f25fe84161b0a0994afb68d9d7ff4604959f3627bdbea20eead733fa50942e5a93191d445b010f7b152211c9948b746e69e8c4e839f
|
data/lib/cnvrg/cli.rb
CHANGED
@@ -896,10 +896,12 @@ module Cnvrg
|
|
896
896
|
return
|
897
897
|
end
|
898
898
|
|
899
|
+
|
899
900
|
if only_tree
|
900
|
-
|
901
|
-
return
|
901
|
+
Dataset.clone_tree(commit: commit, dataset_home: dataset_home)
|
902
|
+
return
|
902
903
|
end
|
904
|
+
|
903
905
|
commit = response["result"]["commit"]
|
904
906
|
files_count = response["result"]["file_count"]
|
905
907
|
files = @files.get_clone_chunk(commit: commit)
|
@@ -911,6 +913,7 @@ module Cnvrg
|
|
911
913
|
:total => files_count,
|
912
914
|
:autofinish => true)
|
913
915
|
|
916
|
+
Dataset.clone_tree(commit: commit, dataset_home: dataset_home, progressbar: progressbar)
|
914
917
|
|
915
918
|
while files['keys'].length > 0
|
916
919
|
Cnvrg::Logger.log_info("download multiple files, #{downloaded_files.size} files downloaded")
|
@@ -1905,7 +1908,7 @@ module Cnvrg
|
|
1905
1908
|
log_message("Remove dir in order to clone #{project_name}", Thor::Shell::Color::RED)
|
1906
1909
|
exit(1)
|
1907
1910
|
end
|
1908
|
-
|
1911
|
+
|
1909
1912
|
end
|
1910
1913
|
clone_resp = Project.clone_dir(slug, owner, project_name,git)
|
1911
1914
|
project_home = Dir.pwd + "/" + project_name
|
data/lib/cnvrg/dataset.rb
CHANGED
@@ -471,22 +471,32 @@ module Cnvrg
|
|
471
471
|
response.to_json
|
472
472
|
end
|
473
473
|
|
474
|
-
def self.clone_tree(commit: 'latest', dataset_home: nil)
|
474
|
+
def self.clone_tree(commit: 'latest', dataset_home: nil, progressbar: nil)
|
475
475
|
@dataset = Cnvrg::Dataset.new(dataset_home)
|
476
476
|
@files = Cnvrg::Datafiles.new(@dataset.owner, @dataset.slug, dataset: @dataset)
|
477
477
|
trees = @files.get_trees(commit: commit)
|
478
478
|
return false if trees.nil?
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
479
|
+
|
480
|
+
if progressbar
|
481
|
+
pb = progressbar
|
482
|
+
pb.total += trees.size
|
483
|
+
else
|
484
|
+
pb = ProgressBar.create(
|
485
|
+
:title => "Download Progress",
|
486
|
+
:progress_mark => '=',
|
487
|
+
:format => "%b>>%i| %p%% %t",
|
488
|
+
:starting_at => 0,
|
489
|
+
:total => trees.size,
|
490
|
+
:autofinish => true
|
491
|
+
)
|
492
|
+
end
|
493
|
+
|
485
494
|
trees.each do |tree|
|
486
495
|
pb.progress += 1
|
487
496
|
@files.download_dir(dataset_home, tree)
|
488
497
|
end
|
489
|
-
|
498
|
+
|
499
|
+
pb.finish unless progressbar
|
490
500
|
@dataset.write_success
|
491
501
|
true
|
492
502
|
end
|
data/lib/cnvrg/helpers.rb
CHANGED
data/lib/cnvrg/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cnvrg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.11.
|
4
|
+
version: 1.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yochay Ettun
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-11-
|
13
|
+
date: 2020-11-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|