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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 33e9da4826b7c811df4e0bdf35383788e850bb26
4
- data.tar.gz: 47dec9e45bb96c348427ecbaab2a9bc045fada2e
3
+ metadata.gz: 7fed7d34a4ba2506161886daa161deea7189afdf
4
+ data.tar.gz: 4a0fc3a7f7ec689e8b4fa6471b94ab4858bd29aa
5
5
  SHA512:
6
- metadata.gz: 2a4a98b7de3530d277542c38b1bff58d1b8a1b821eeec9bfe1e5c31222c05d7372fa38882f88f0896dff22da878f76c0427e6dbe21fd346a5b60f667835350fa
7
- data.tar.gz: f135b5a38316ca0db25d998a85867749638ff897d863458b0d0168a9accb4f0b3debd82ff846f04bf29c21dbd74788eabc6fab241c4680cd86bae5253b7c8522
6
+ metadata.gz: c1f0f0c82351be0c09c9c6aeffee78c78ab6d2aacfbed0adbd4603cf3e9ab0a1910897b8e1dedd8c99dcf4837d9f01d8bd7ce1225b12add1d9fed39b07bd36d2
7
+ data.tar.gz: 1dc74865f74328811d78feb315630ac3747f954a7c8de041011b3c493c1ed10acdfa4e518172900e3d25021c7433650bceb4d4e201aece24331ddcff1eaf7083
@@ -24,7 +24,6 @@ class GeneratorCLI < ::Thor
24
24
  else
25
25
  generator.upload(out, options)
26
26
  end
27
-
28
27
  end
29
28
  end
30
29
 
@@ -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']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cps-property-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Call