cnvrg 1.4.0 → 1.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7650c37459709693a198a94daa24d37636c29caedd0d0ee370e6c171c1e0f0f1
4
- data.tar.gz: 13a6bc4e366fdf4bc4fdd0fd2b56b5ef52500492bd9a1516c232ba67f823d2d5
3
+ metadata.gz: 9e51c1599e69f0ff7f24d21be3f57ebd23d807cb7258d8c81ee5d145db465154
4
+ data.tar.gz: 1aa2d68669c4c2518992d8a65e7520ace1cc780819fa359634bd0e550fe24a6d
5
5
  SHA512:
6
- metadata.gz: 4bfaed267b93453837c3492eada8584ebe4e8d995fd2d117d9e6948c63b8bc3a4f102bd10ae0d065dc198336c125a841a69fb7dda428c5c8e2c9f0219a361b94
7
- data.tar.gz: 6c28a0860188250fa1389386c146bee2a52d9106805d17cea64cf75a97ebd7a60420a2b8b09fa705be316429d78632482dd56f3e5265daa0eca8709b77a8dbe9
6
+ metadata.gz: 9951ed4b4784b39d628811f9e7de7d75a3c2630b2a00639e334fe3839d82dda3e89ec3a2526f79d4cd7d551578bd05a4a94886029fc783b731cee1d5a4fa603a
7
+ data.tar.gz: 713605a0d638c94defc308663cde0fb5e0765de3d6f7e23160ba4d71038002d2a575ad9a7827c8c81ec54b2e4958330eebcfa3d36321af1b4f9dd20999390a2d
@@ -58,12 +58,20 @@ class Cnvrg::Helpers::Executer
58
58
  def execute_cmds(cmds)
59
59
  cmds.each do |command|
60
60
  puts "===================="
61
- puts "Execute #{command[:command]}"
61
+ if command[:type] == "file_exists"
62
+ puts "Looking for file #{command[:file]}"
63
+ else
64
+ puts "Execute #{command[:command]}"
65
+ end
62
66
  execute(command)
63
- puts "===================="
64
67
  end
65
68
  end
66
69
 
70
+ def get_requirements_commands
71
+ resp = Cnvrg::API.request("#{base_url}/requirements", "GET")
72
+ commands = resp["commands"]
73
+ commands.map{|k| k.with_indifferent_access}
74
+ end
67
75
 
68
76
  private
69
77
  def execute_helper(cmd)
@@ -110,7 +118,7 @@ class Cnvrg::Helpers::Executer
110
118
  errors = []
111
119
  output = []
112
120
  start_time = Time.now
113
- timeout = cmd[:timeout] || 60*60*60
121
+ timeout = cmd[:timeout] || 5*60
114
122
  t = Thread.new do
115
123
  PTY.spawn(cmd[:command]) do |stdout, stdin, pid, stderr|
116
124
  begin
@@ -29,5 +29,14 @@ module Cnvrg
29
29
  @project = Project.new(project_dir, owner: ENV['CNVRG_OWNER'], slug: ENV['CNVRG_PROJECT'])
30
30
  end
31
31
 
32
+ desc 'install_reqs', description: 'Install requirements', hide: true
33
+ def install_reqs
34
+ cli = Cnvrg::CLI.new
35
+ cli.log_start(__method__, args, options)
36
+ @project = Project.new(nil, owner: ENV['CNVRG_OWNER'], slug: ENV['CNVRG_PROJECT'])
37
+ @executer = Helpers::Executer.new(project: @project, job_type: ENV['CNVRG_JOB_TYPE'], job_id: ENV['CNVRG_JOB_ID'])
38
+ commands = @executer.get_requirements_commands
39
+ @executer.execute_cmds(commands)
40
+ end
32
41
  end
33
42
  end
@@ -471,7 +471,7 @@ module Cnvrg
471
471
  return response
472
472
  end
473
473
 
474
- def compare_idx(new_branch, force:false, deploy: false, in_exp:false, specific_files: [], download: false)
474
+ def compare_idx(new_branch, force:false, deploy: false, in_exp:false, specific_files: [], download: false)
475
475
  is_download = download
476
476
  if is_download
477
477
  local_idx = self.get_idx
@@ -1,4 +1,4 @@
1
1
  module Cnvrg
2
- VERSION = '1.4.0'
2
+ VERSION = '1.4.5'
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.4.0
4
+ version: 1.4.5
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: 2019-05-06 00:00:00.000000000 Z
13
+ date: 2019-05-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -432,7 +432,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
432
432
  - !ruby/object:Gem::Version
433
433
  version: '0'
434
434
  requirements: []
435
- rubygems_version: 3.0.3
435
+ rubyforge_project:
436
+ rubygems_version: 2.7.9
436
437
  signing_key:
437
438
  specification_version: 4
438
439
  summary: A CLI tool for interacting with cnvrg.io.