cnvrg 0.0.1590000 → 0.1
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 +2627 -2606
- data/lib/cnvrg/datafiles.rb +4 -4
- data/lib/cnvrg/dataset.rb +0 -1
- data/lib/cnvrg/files.rb +1 -1
- data/lib/cnvrg/project.rb +9 -0
- data/lib/cnvrg/version.rb +1 -1
- metadata +2 -2
data/lib/cnvrg/datafiles.rb
CHANGED
@@ -250,7 +250,7 @@ module Cnvrg
|
|
250
250
|
|
251
251
|
if Cnvrg::CLI.is_response_success(download_resp, false)
|
252
252
|
begin
|
253
|
-
open(file_path_to_store, '
|
253
|
+
open(file_path_to_store, 'w+') do |file|
|
254
254
|
file << open(path).read
|
255
255
|
end
|
256
256
|
|
@@ -446,7 +446,7 @@ module Cnvrg
|
|
446
446
|
:http_open_timeout => 60, :retry_limit => 20
|
447
447
|
)
|
448
448
|
|
449
|
-
File.open(project_home+"/"+absolute_path, '
|
449
|
+
File.open(project_home+"/"+absolute_path, 'w+') do |file|
|
450
450
|
resp = client.get_object({bucket:bucket,
|
451
451
|
key:key}, target: file)
|
452
452
|
end
|
@@ -503,7 +503,7 @@ module Cnvrg
|
|
503
503
|
)
|
504
504
|
|
505
505
|
|
506
|
-
File.open(dataset_home+"/"+filename, '
|
506
|
+
File.open(dataset_home+"/"+filename, 'w+') do |file|
|
507
507
|
resp = client.get_object({bucket: bucket,
|
508
508
|
key: key }, target: file)
|
509
509
|
end
|
@@ -528,7 +528,7 @@ module Cnvrg
|
|
528
528
|
FileUtils.mkdir_p project_home + "/" + file_location
|
529
529
|
filename += ".conflict" if conflict
|
530
530
|
|
531
|
-
File.open("#{project_home}/#{file_location}/#{filename}", "
|
531
|
+
File.open("#{project_home}/#{file_location}/#{filename}", "w+") do |file|
|
532
532
|
file.write open(res["link"]).read
|
533
533
|
end
|
534
534
|
else
|
data/lib/cnvrg/dataset.rb
CHANGED
@@ -114,7 +114,6 @@ module Cnvrg
|
|
114
114
|
File.open(".cnvrg/config.yml", "w+") { |f| f.write config.to_yaml }
|
115
115
|
File.open(".cnvrgignore", "w+") { |f| f.write cnvrgignore } unless File.exist? ".cnvrgignore"
|
116
116
|
rescue => e
|
117
|
-
"Exception in init data: #"
|
118
117
|
return false
|
119
118
|
end
|
120
119
|
return true
|
data/lib/cnvrg/files.rb
CHANGED
@@ -388,7 +388,7 @@ module Cnvrg
|
|
388
388
|
:http_open_timeout => 60, :retry_limit => 20
|
389
389
|
)
|
390
390
|
|
391
|
-
File.open(project_home+"/"+absolute_path, '
|
391
|
+
File.open(project_home+"/"+absolute_path, 'w+') do |file|
|
392
392
|
resp = client.get_object({bucket:bucket,
|
393
393
|
key:key}, target: file)
|
394
394
|
end
|
data/lib/cnvrg/project.rb
CHANGED
@@ -360,6 +360,15 @@ module Cnvrg
|
|
360
360
|
CLI.is_response_success(response,false)
|
361
361
|
return response
|
362
362
|
end
|
363
|
+
def jump_idx(new_branch, commit=last_local_commit)
|
364
|
+
|
365
|
+
local_idx = self.generate_idx
|
366
|
+
ignore_list = self.send_ignore_list()
|
367
|
+
response = Cnvrg::API.request("users/#{self.owner}/projects/#{self.slug}/jump", 'POST', {idx: local_idx, new_branch: new_branch,
|
368
|
+
current_commit: commit,ignore:ignore_list})
|
369
|
+
CLI.is_response_success(response,false)
|
370
|
+
return response
|
371
|
+
end
|
363
372
|
|
364
373
|
def compare_commit(commit)
|
365
374
|
if commit.nil? or commit.empty?
|
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: 0.
|
4
|
+
version: '0.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yochay Ettun
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-09-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|