cnvrg 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cnvrg/cli.rb +51 -49
  3. data/lib/cnvrg/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e3b5eed6935c3c91c12028392a633b48de5fdc6
4
- data.tar.gz: c0870d2765cf19fe5d3f2b34acfedac8b4522acb
3
+ metadata.gz: a7519f50153dd5625f19e03ec8418a8ebc590c9f
4
+ data.tar.gz: 7bd0e14a01979c73dcd6328a4604e7b8cca52982
5
5
  SHA512:
6
- metadata.gz: 4f32fbc169779009ddce76dc4c71f19d7d782d5a842be2dd50fd3c3b4e011e251738aef88e459055e01a7474c635f04209b06c7ca5d258c763e3c5361ad057c7
7
- data.tar.gz: 7b26a48dcc4e97ce5557886bf3504d9d424276ca8aff1752336a8e09d4149c531fb2ada1f6a93a1a547b1299db1bcb1bf36e1c54a6445137717e10ef60e0f728
6
+ metadata.gz: e375282049fdf19881b62d2976cec185ee95e34877431563e51227d839758f4b78f3e198693ed3bddfacef05610d95b2adb29435bb9cefe0160694550e422b70
7
+ data.tar.gz: 488a415f57dacce290b92ed1c3164c991191b2761471d23e8768ecbcefec74e23cdfb58d9618a95beebd12adec01a01d76d4ce013eb3c93145fda9d647834e1f
@@ -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
- begin
4885
- verify_logged_in(false)
4886
- log_start(__method__, args, options)
4887
- owner = Cnvrg::CLI.get_owner()
4888
- path = File.expand_path('~') + "/.cnvrg/tmp/#{image_name}.zip"
4889
- @files = Cnvrg::Files.new(owner, "")
4890
-
4891
- say "Downloading image file", Thor::Shell::Color::BLUE
4892
- begin
4893
- if @files.download_image(path, image_slug, owner)
4894
-
4895
- dir_path = File.expand_path('~') + "/.cnvrg/tmp/#{image_name}"
4896
- FileUtils.rm_rf([dir_path])
4897
-
4898
- Zip::File.open(path) do |zip_file|
4899
- zip_file.each do |entry|
4900
-
4901
- f_path = File.join(dir_path, entry.name)
4902
- FileUtils.mkdir_p(File.dirname(f_path))
4903
- zip_file.extract(entry, f_path)
4904
- end
4905
- end
4906
-
4907
- return dir_path
4908
-
4909
- else
4910
- say "Couldn't download image #{image_name}", Thor::Shell::Color::RED
4911
- log_end(1, "can't download image")
4912
- return false
4913
- end
4914
- rescue Interrupt
4915
- log_end(-1)
4916
- say "The user has exited to process, aborting", Thor::Shell::Color::BLUE
4917
- exit(1)
4918
- end
4919
- rescue SignalException
4920
- log_end(-1)
4921
- say "\nAborting"
4922
- exit(1)
4923
- ensure
4924
- if !path.nil?
4925
- FileUtils.rm(path)
4926
- end
4927
- end
4928
- end
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[:verfiy_ssl].nil?
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, verfiy_ssl:verify_ssl}
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
@@ -1,4 +1,4 @@
1
1
  module Cnvrg
2
- VERSION = '1.2.3'
2
+ VERSION = '1.2.4'
3
3
  end
4
4
 
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.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yochay Ettun