app-runner 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: 80ba22cacff0f81a7c5ea88c1e25ec9b70776276
4
- data.tar.gz: 0358fe9cc19f602d941a7cb38375a882d1d08b60
3
+ metadata.gz: 4b5d12d27f7799a32212fc72c5bc975aee776d87
4
+ data.tar.gz: 8376cb24fc3d2dd5c114a27d6d2a066888b36014
5
5
  SHA512:
6
- metadata.gz: e8b979176082bedd0f582aadd8d55e2b6efc5fd5152af1c1304e7fa4aba862dcce45e7370c5a714e6f7fde301ed78e14aa7f94b59b07763603e48f91eb4d2d50
7
- data.tar.gz: f89fc2877ca460572f763c380e0b4fb3b55a4a9c9ed28f397267f95f523f682a1ca19fdc34e94967db734fdf15570fe5b45b30fac263d22eabe890e6266d7c67
6
+ metadata.gz: 064905a7d18587dbf597b5ca690eafc380e5c28d16edbef670c39a0271f4a28021c1e9d4648b9654e88b5ae4c250dc443da5c84fb6dfbabd8a245ecc2dbe20cb
7
+ data.tar.gz: 2889facb8e85a91066ff60fd2a979dae0b789f1a753773f95e0f700eb89039317cb728596ce69c0d5d8c5c201a054dc15acaca5424708fe2896a59d7ff143047
@@ -4,11 +4,12 @@ module Commands
4
4
 
5
5
  def execute(global_options, options, args)
6
6
  config=global_options['configHash'];
7
+ serviceUrl=ENV['artifacts_url'] or config["url"];
7
8
  if (options["url"])
8
- download(config["url"], options["url"], config["destination"])
9
+ download(serviceUrl, options["url"], config["destination"])
9
10
  elsif (options["v"] && options["t"]=='mvn')
10
11
  mvn=config["mvn"];
11
- download(config["url"], "#{options['t']}:#{mvn["group"]}:#{mvn["artifactId"]}:#{options['v']}:#{mvn["type"]}", config["destination"])
12
+ download(serviceUrl, "#{options['t']}:#{mvn["group"]}:#{mvn["artifactId"]}:#{options['v']}:#{mvn["type"]}", config["destination"])
12
13
  else
13
14
  p "Not suported yet this combination"
14
15
  end
@@ -20,6 +21,8 @@ module Commands
20
21
  exitCode=system("wget \"#{url}\" -O /tmp/artifact")
21
22
  if exitCode
22
23
  FileUtils.mv '/tmp/artifact', destination['dir']+"/"+destination['filename'], :force => true
24
+ else
25
+ raise "Can't download artifact"
23
26
  end
24
27
  end
25
28
  end
@@ -1,3 +1,3 @@
1
1
  module AppRunner
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafał Libik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-04 00:00:00.000000000 Z
11
+ date: 2017-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake