cnvrg 1.2.3 → 1.2.4
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 +51 -49
- data/lib/cnvrg/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7519f50153dd5625f19e03ec8418a8ebc590c9f
|
4
|
+
data.tar.gz: 7bd0e14a01979c73dcd6328a4604e7b8cca52982
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e375282049fdf19881b62d2976cec185ee95e34877431563e51227d839758f4b78f3e198693ed3bddfacef05610d95b2adb29435bb9cefe0160694550e422b70
|
7
|
+
data.tar.gz: 488a415f57dacce290b92ed1c3164c991191b2761471d23e8768ecbcefec74e23cdfb58d9618a95beebd12adec01a01d76d4ce013eb3c93145fda9d647834e1f
|
data/lib/cnvrg/cli.rb
CHANGED
@@ -34,7 +34,6 @@ require 'launchy'
|
|
34
34
|
require 'socket'
|
35
35
|
require 'timeout'
|
36
36
|
require 'fileutils'
|
37
|
-
require 'zip'
|
38
37
|
require 'active_support/all'
|
39
38
|
require 'thor'
|
40
39
|
require 'pathname'
|
@@ -4880,52 +4879,55 @@ module Cnvrg
|
|
4880
4879
|
|
4881
4880
|
desc '', '', :hide => true
|
4882
4881
|
|
4883
|
-
def download_image(image_name, image_slug)
|
4884
|
-
|
4885
|
-
|
4886
|
-
|
4887
|
-
|
4888
|
-
|
4889
|
-
|
4890
|
-
|
4891
|
-
|
4892
|
-
|
4893
|
-
|
4894
|
-
|
4895
|
-
|
4896
|
-
|
4897
|
-
|
4898
|
-
|
4899
|
-
|
4900
|
-
|
4901
|
-
|
4902
|
-
|
4903
|
-
|
4904
|
-
|
4905
|
-
|
4906
|
-
|
4907
|
-
|
4908
|
-
|
4909
|
-
|
4910
|
-
|
4911
|
-
|
4912
|
-
|
4913
|
-
|
4914
|
-
|
4915
|
-
|
4916
|
-
|
4917
|
-
|
4918
|
-
|
4919
|
-
|
4920
|
-
|
4921
|
-
|
4922
|
-
|
4923
|
-
|
4924
|
-
|
4925
|
-
|
4926
|
-
|
4927
|
-
|
4928
|
-
|
4882
|
+
# def download_image(image_name, image_slug)
|
4883
|
+
# begin
|
4884
|
+
# verify_logged_in(false)
|
4885
|
+
# log_start(__method__, args, options)
|
4886
|
+
# owner = Cnvrg::CLI.get_owner()
|
4887
|
+
# path = File.expand_path('~') + "/.cnvrg/tmp/#{image_name}.zip"
|
4888
|
+
# @files = Cnvrg::Files.new(owner, "")
|
4889
|
+
#
|
4890
|
+
# say "Downloading image file", Thor::Shell::Color::BLUE
|
4891
|
+
# begin
|
4892
|
+
# if @files.download_image(path, image_slug, owner)
|
4893
|
+
#
|
4894
|
+
# dir_path = File.expand_path('~') + "/.cnvrg/tmp/#{image_name}"
|
4895
|
+
# FileUtils.rm_rf([dir_path])
|
4896
|
+
#
|
4897
|
+
#
|
4898
|
+
#
|
4899
|
+
#
|
4900
|
+
# ::File.open(path) do |zip_file|
|
4901
|
+
# zip_file.each do |entry|
|
4902
|
+
#
|
4903
|
+
# f_path = File.join(dir_path, entry.name)
|
4904
|
+
# FileUtils.mkdir_p(File.dirname(f_path))
|
4905
|
+
# zip_file.extract(entry, f_path)
|
4906
|
+
# end
|
4907
|
+
# end
|
4908
|
+
#
|
4909
|
+
# return dir_path
|
4910
|
+
#
|
4911
|
+
# else
|
4912
|
+
# say "Couldn't download image #{image_name}", Thor::Shell::Color::RED
|
4913
|
+
# log_end(1, "can't download image")
|
4914
|
+
# return false
|
4915
|
+
# end
|
4916
|
+
# rescue Interrupt
|
4917
|
+
# log_end(-1)
|
4918
|
+
# say "The user has exited to process, aborting", Thor::Shell::Color::BLUE
|
4919
|
+
# exit(1)
|
4920
|
+
# end
|
4921
|
+
# rescue SignalException
|
4922
|
+
# log_end(-1)
|
4923
|
+
# say "\nAborting"
|
4924
|
+
# exit(1)
|
4925
|
+
# ensure
|
4926
|
+
# if !path.nil?
|
4927
|
+
# FileUtils.rm(path)
|
4928
|
+
# end
|
4929
|
+
# end
|
4930
|
+
# end
|
4929
4931
|
|
4930
4932
|
desc '', '', :hide => true
|
4931
4933
|
|
@@ -5269,10 +5271,10 @@ module Cnvrg
|
|
5269
5271
|
end
|
5270
5272
|
verify_ssl = false
|
5271
5273
|
|
5272
|
-
if config and !config.nil? and !config.empty? and !config.to_h[:
|
5274
|
+
if config and !config.nil? and !config.empty? and !config.to_h[:verify_ssl].nil?
|
5273
5275
|
verify_ssl = config.to_h[:verify_ssl]
|
5274
5276
|
end
|
5275
|
-
config = {owner: owner, username: username, version_last_check: get_start_day(), api: url, compression_path: compression_path,
|
5277
|
+
config = {owner: owner, username: username, version_last_check: get_start_day(), api: url, compression_path: compression_path, verify_ssl:verify_ssl}
|
5276
5278
|
|
5277
5279
|
File.open(home_dir + "/.cnvrg/config.yml", "w+") {|f| f.write config.to_yaml}
|
5278
5280
|
return true
|
data/lib/cnvrg/version.rb
CHANGED