cnvrg 2.0.17 → 2.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8498090d7edb55682fcc70778016643eba8e37e8a4b588e149ee318b1beecfd8
4
- data.tar.gz: 3413d316dbf02cd6e4e8b3adc8f3d3760da0e1e7b39c60c322a8293b63ebb921
3
+ metadata.gz: 30e82404c79b7780d736c0f4996ab1173cbbbfbc13a68c58a0dc0364775c7d5d
4
+ data.tar.gz: 6a846acb27781403e27c39ffd36f2b2149b771307b49375356cabd8f769fafba
5
5
  SHA512:
6
- metadata.gz: db819d57216a924cdbe8eacff8b1c5fdf6d95c082da67b7b54d21e5958ab7ca1fd3c9c636c461b86d5f04bb3c31c85b3ab2ed92679267d98c9d0b913df986c54
7
- data.tar.gz: 14575293bf59438342f840ab230327be08b088ced95aafd51429dd046370b27337f99b520ff4c224355bf8477e7d0d5490a87476937c68cb2b42a8d88b1d983b
6
+ metadata.gz: af34ebd4026b57c3111686f066f5c88cda3851ba27fe13a8273848274b614ba088d055ba1334c85842aea1142a113701e1de63ddf0ca5dc141c891762678dcac
7
+ data.tar.gz: 79fe82877378207d25a7ab4a7f73414fde0d90a5df128e4c1bd513a3f441822e5a67f9d8f04986b266ee111a66084875008a862926e285f94960cb2a90b49198
data/Readme.md CHANGED
@@ -71,4 +71,7 @@
71
71
  * DEV-12316 - Improvement: cli login should identify saas users automatically
72
72
  ## Version v2.0.17
73
73
  2021-12-19
74
- * DEV-10581 - Bug: CLI - getting 404 response in "cnvrg set_default_owner"
74
+ * DEV-10581 - Bug: CLI - getting 404 response in "cnvrg set_default_owner"
75
+ ## Version v2.0.18
76
+ 2022-01-31
77
+ * DEV-12637 - Bug: Dataset - creating file from CLI/SDK in a folder with + sign, replaces + with space AND creates 2 folders
@@ -8,7 +8,7 @@ require 'fileutils'
8
8
  module Cnvrg
9
9
  class Datafiles
10
10
  ParallelThreads ||= Cnvrg::Helpers.parallel_threads
11
-
11
+ DIRECTORY_REGEX = /^[a-zA-Z0-9_\/-]+$/
12
12
  LARGE_FILE=1024*1024*5
13
13
  MULTIPART_SPLIT=10000000
14
14
  RETRIES = ENV['UPLOAD_FILE_RETRIES'].try(:to_i) || 10
@@ -56,9 +56,19 @@ module Cnvrg
56
56
  end
57
57
  raise SignalException.new(1, "Cant find file #{file}") unless File.exists? "#{Dir.pwd}/#{file}"
58
58
  end
59
+ is_valid_directory?(paths)
59
60
  paths
60
61
  end
61
62
 
63
+ def is_valid_directory?(paths)
64
+ paths.each do |path|
65
+ path = path.gsub('./', '')
66
+ if !path.match(DIRECTORY_REGEX) and File.directory? path
67
+ raise SignalException.new(1, "#{path} is invalid directory name, should contain letters, numbers, '_' , '-'")
68
+ end
69
+ end
70
+ end
71
+
62
72
  def get_files_and_folders(paths)
63
73
  files_and_folders = {}
64
74
  paths.each do |file|
data/lib/cnvrg/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cnvrg
2
- VERSION = '2.0.17'
2
+ VERSION = '2.0.18'
3
3
  end
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: 2.0.17
4
+ version: 2.0.18
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: 2022-01-06 00:00:00.000000000 Z
13
+ date: 2022-01-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler