vara 0.18.0 → 0.19.0

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
  SHA1:
3
- metadata.gz: 8620fbfdfd18af314cc45d3e02e44088523d3e8b
4
- data.tar.gz: fe6a19b66417313cf0473d477a15b96d363805c1
3
+ metadata.gz: e41d610b2187ae48c3fd50782d51cac3453588a0
4
+ data.tar.gz: 9c450bf99a4a73351c510ba95287abf7f6562b4c
5
5
  SHA512:
6
- metadata.gz: c723d85456760a5171762141d9ca7d9107af884c1a97cbac7344a6ae4308ff254c9e2b619bbf60fe0c8634b26fa1a05fa57d36e4c621acf1116eedf3576cba34
7
- data.tar.gz: 46767ec90d9b672340e8ae0ba3e8bf0ec46969f41835938eb9ca1bdae9ec74289e1993cfc4029dda5433c661e229617d1f73b3587a79cdabacbd2d4c93f6a27f
6
+ metadata.gz: 255859e178c8e8ea85f902d80700072c8534584b8ff80bd062c2e21cc7b65c2e923b3ed07004f3bcb7040d3aaf0175ba044fc6a177d787b513498d020c528e63
7
+ data.tar.gz: 7b62a9c3dc6f952f0d6e3c41a5fd98bc1538fe4bbbc4798d9e0b4852000f423aa48f8cbcc962db1591a6fc45760ca64b9a5e000f5952c32c9d0c59266187ed31
data/lib/vara/log.rb CHANGED
@@ -17,7 +17,11 @@ module Vara
17
17
  end
18
18
 
19
19
  def self.included(other_module)
20
- def other_module.log
20
+ other_module.extend(ClassMethods)
21
+ end
22
+
23
+ module ClassMethods
24
+ def log
21
25
  @_releng_class_log ||= LoggerWithProgName.new(name)
22
26
  end
23
27
  end
@@ -57,7 +57,16 @@ module Vara
57
57
  end
58
58
 
59
59
  FileUtils.mkdir('metadata')
60
- FileUtils.cp(product_contents.metadata_path, 'metadata')
60
+ metadata = YAML.load_file(product_contents.metadata_path)
61
+
62
+ metadata.fetch('releases').each do |r|
63
+ r.delete('aws')
64
+ end
65
+
66
+ File.write(
67
+ File.join('metadata', File.basename(product_contents.metadata_path)),
68
+ metadata.to_yaml
69
+ )
61
70
  end
62
71
 
63
72
  def copy_and_validate_releases(product_metadata)
@@ -31,9 +31,9 @@ module Vara
31
31
 
32
32
  attr_reader :product_dir, :versioner, :external_release_paths
33
33
 
34
- REQUIRED_RELEASE_KEYS = %w(file name md5 version)
35
- EXCLUSIVE_KEYS = %w(url aws)
36
- REQUIRED_AWS_KEYS = %w(access_key_id secret_access_key bucket_name region filename)
34
+ REQUIRED_RELEASE_KEYS = %w(file name md5 version).freeze
35
+ EXCLUSIVE_KEYS = %w(url aws).freeze
36
+ REQUIRED_AWS_KEYS = %w(access_key_id secret_access_key bucket_name region filename).freeze
37
37
 
38
38
  def merged_metadata
39
39
  binaries_path = File.join(product_dir, 'metadata_parts', 'binaries.yml')
data/lib/vara/tarball.rb CHANGED
@@ -50,11 +50,9 @@ module Vara
50
50
  stderr_string = stderr.read
51
51
  end
52
52
 
53
- if status.success?
54
- log.info("Verified that #{path_to_binary} as a valid tar file")
55
- else
56
- fail "Invalid tarball: #{path_to_binary}. Tar command STDOUT: #{stdout_string}\n STDERR:#{stderr_string}"
57
- end
53
+ fail "Invalid tarball: #{path_to_binary}. Tar command STDOUT: #{stdout_string}\n STDERR:#{stderr_string}" unless status.success?
54
+
55
+ log.info("Verified that #{path_to_binary} as a valid tar file")
58
56
  end
59
57
 
60
58
  def validate_checksum
data/lib/vara/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Vara
2
- VERSION = '0.18.0'
2
+ VERSION = '0.19.0'.freeze
3
3
  end
4
4
 
5
5
  # Copyright (c) 2014-2015 Pivotal Software, Inc.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - CF Release Engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-22 00:00:00.000000000 Z
11
+ date: 2016-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor