cps-property-generator 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/cps-property-generator +0 -1
- data/lib/generator/generator.rb +8 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fed7d34a4ba2506161886daa161deea7189afdf
|
4
|
+
data.tar.gz: 4a0fc3a7f7ec689e8b4fa6471b94ab4858bd29aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1f0f0c82351be0c09c9c6aeffee78c78ab6d2aacfbed0adbd4603cf3e9ab0a1910897b8e1dedd8c99dcf4837d9f01d8bd7ce1225b12add1d9fed39b07bd36d2
|
7
|
+
data.tar.gz: 1dc74865f74328811d78feb315630ac3747f954a7c8de041011b3c493c1ed10acdfa4e518172900e3d25021c7433650bceb4d4e201aece24331ddcff1eaf7083
|
data/bin/cps-property-generator
CHANGED
data/lib/generator/generator.rb
CHANGED
@@ -15,10 +15,11 @@ module PropertyGenerator
|
|
15
15
|
@configs = PropertyGenerator::Config.new(project_path)
|
16
16
|
@globals = PropertyGenerator::Globals.new(project_path, @configs)
|
17
17
|
@globals = @globals.globals
|
18
|
+
@accounts = @configs.accounts
|
19
|
+
|
18
20
|
@output_path = "#{File.expand_path(options['output'])}/properties/#{SecureRandom.hex}"
|
19
21
|
puts "Properties will be output here #{@output_path}"
|
20
22
|
@service_list = PropertyGenerator.read_services(project_path)
|
21
|
-
|
22
23
|
end
|
23
24
|
|
24
25
|
def generate
|
@@ -36,6 +37,12 @@ module PropertyGenerator
|
|
36
37
|
end
|
37
38
|
|
38
39
|
def upload(out, config)
|
40
|
+
account = config['upload_account']
|
41
|
+
|
42
|
+
if !@accounts.include?(account.to_i)
|
43
|
+
abort("The specified account (#{account}) is not configured, please add it to config/config.yml")
|
44
|
+
end
|
45
|
+
|
39
46
|
upload_account = config['upload_account']
|
40
47
|
upload_region = config['upload_region']
|
41
48
|
upload_bucket = config['upload_bucket']
|