MuranoCLI 3.2.0.beta.8 → 3.2.0.beta.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
  SHA256:
3
- metadata.gz: 8940564247a955849c5a89835b1915f57b3766f28b0fc52cd83e282ec9aef599
4
- data.tar.gz: dda30a89bf0f573fd124902dba05fe8c7f21b0b803dd951a6573ccd400a6293f
3
+ metadata.gz: d280f1504ef238178a4baea98ead2816f1e5e4e171b833c1905f2f9829e5f664
4
+ data.tar.gz: 57a8ba23b80836607343f7dad576c730747d7ca672b9b2c55318b69a0eb956cf
5
5
  SHA512:
6
- metadata.gz: e221c40000b55e2c6b18aa2738541ed3c8edbc4bdb61377a2e62342a0ca2f6e261731e455a846eff2a77b18893e1d90fc6c2bd74b9dee4d41ee23bdd8868a4ee
7
- data.tar.gz: 6d9076522f2a45cd76a95ffc2f362952e6f2d3978699571efcc93663906b062051e8e883edc58400758112ad7093632f14d087d3218ec87179d9f121473fd01c
6
+ metadata.gz: 81a67f95d05900d181d9ffd87eea654d0ccf44cb0e9d9dc83d76b8999d203595a8015e4f8a1a9aae83b028c5dd8b343450795bab7e05bf7c194c31a15112c7d3
7
+ data.tar.gz: 7a27339a72cd15419af5961680e178fb723919082f9a47cf7a9d8fbfd07db9936c3931b16ab665efae073ab58ee719d1f6689123d8babe878c7225d50d9e73dc
data/dockers/README.rst CHANGED
@@ -65,7 +65,7 @@ Jenkins project configuration: Murano CLI Tests
65
65
 
66
66
  - General configuration
67
67
 
68
- - Project name: ``Murano CLI Tests - Ruby 2.3``
68
+ - Project name: ``Murano_CLI_Tests__Ruby_2_3``
69
69
 
70
70
  - Discard old builds ``✓``
71
71
 
@@ -127,6 +127,8 @@ module MrMurano
127
127
  @runner = cmd_runner
128
128
  @curlfile_f = nil
129
129
 
130
+ @known_keys = {}
131
+
130
132
  @paths = []
131
133
  @paths << ConfigFile.new(:internal, nil, self, IniFile.new)
132
134
  # :specified --configfile FILE goes here. (see load_specific)
@@ -179,6 +181,7 @@ module MrMurano
179
181
  set_defaults_modules
180
182
  set_defaults_diff
181
183
  set_defaults_postgresql
184
+ set_defaults_project
182
185
  end
183
186
 
184
187
  def set_defaults_tool
@@ -329,6 +332,14 @@ module MrMurano
329
332
  set('postgresql.migrations_dir', 'sql-migrations', :defaults)
330
333
  end
331
334
 
335
+ def set_defaults_project
336
+ # Set these so that @known_keys is updated.
337
+ set('user.name', nil, :defaults)
338
+ set('business.id', nil, :defaults)
339
+ set('application.id', nil, :defaults)
340
+ set('solution.id', nil, :defaults)
341
+ end
342
+
332
343
  ## Find the root of this project Directory.
333
344
  #
334
345
  # The Project dir is the directory between PWD and HOME
@@ -490,15 +501,25 @@ module MrMurano
490
501
  def get(key, scope=CFG_SCOPES)
491
502
  scope = [scope] unless scope.is_a? Array
492
503
  paths = @paths.select { |p| scope.include? p.kind }
493
- paths = paths.reject { |p| @exclude_scopes.include? p.kind }
504
+ paths.reject { |p| @exclude_scopes.include? p.kind }
494
505
 
495
506
  section, ikey = key.split('.')
496
507
  paths.each do |path|
497
508
  next if path.data.nil?
498
509
  next unless path.data.has_section?(section)
499
510
  sec = path.data[section]
500
- return sec if ikey.nil?
501
- return sec[ikey] if sec.key?(ikey)
511
+ found = true
512
+ if ikey.nil?
513
+ value = sec
514
+ elsif sec.key?(ikey) && !sec[ikey].nil?
515
+ value = sec[ikey]
516
+ else
517
+ found = false
518
+ end
519
+ if found
520
+ warn_on_unknown_key(key, value)
521
+ return value
522
+ end
502
523
  end
503
524
  nil
504
525
  end
@@ -589,6 +610,7 @@ module MrMurano
589
610
  tomod = data[section]
590
611
  if !value.nil?
591
612
  change_value(key, tomod, ikey, value)
613
+ warn_on_unknown_key(key, value) if scope != :defaults
592
614
  else
593
615
  tomod.delete(ikey)
594
616
  end
@@ -602,6 +624,7 @@ module MrMurano
602
624
  data.each_section do |sectn|
603
625
  data.delete_section(sectn) if data[sectn].empty?
604
626
  end
627
+ @known_keys[key] = true if scope == :defaults
605
628
 
606
629
  cfg.write
607
630
  end
@@ -617,6 +640,15 @@ module MrMurano
617
640
  end
618
641
  end
619
642
 
643
+ def known_key?(key)
644
+ @known_keys.key?(key)
645
+ end
646
+
647
+ def warn_on_unknown_key(key, value)
648
+ return if known_key?(key)
649
+ warning %(WARNING: Unknown key #{fancy_ticks(key)} set to #{fancy_ticks(value)})
650
+ end
651
+
620
652
  def must_be_valid_values!
621
653
  return unless @value_errors > 0
622
654
  error('You must correct the errors in your config (listed above) to continue.')
@@ -370,7 +370,7 @@ module Commander
370
370
  def verify_solutions_unmanaged!
371
371
  return if $cfg['tool.skip-managed']
372
372
  # (lb): All @exosite.com employees are welcome behind the curtain.
373
- if $cfg['user.name'].end_with? "@exosite.com"
373
+ if $cfg['user.name'] && $cfg['user.name'].end_with?("@exosite.com")
374
374
  MrMurano::Verbose.verbose(
375
375
  "Welcome behind the curtain, #{$cfg['user.name']}!"
376
376
  )
@@ -26,7 +26,7 @@ module MrMurano
26
26
  # '3.0.0-beta.2' is changed to '3.0.0.pre.beta.2'
27
27
  # which breaks our build (which expects the version to match herein).
28
28
  # So stick to using the '.pre.X' syntax, which ruby/gems knows.
29
- VERSION = '3.2.0.beta.8'
29
+ VERSION = '3.2.0.beta.9'
30
30
  EXE_NAME = File.basename($PROGRAM_NAME)
31
31
  SIGN_UP_URL = 'https://exosite.com/signup/'
32
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: MuranoCLI
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0.beta.8
4
+ version: 3.2.0.beta.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Conrad Tadpol Tilstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-14 00:00:00.000000000 Z
11
+ date: 2018-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: certified