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 +4 -4
- data/dockers/README.rst +1 -1
- data/lib/MrMurano/Config.rb +35 -3
- data/lib/MrMurano/ReCommander.rb +1 -1
- data/lib/MrMurano/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d280f1504ef238178a4baea98ead2816f1e5e4e171b833c1905f2f9829e5f664
|
4
|
+
data.tar.gz: 57a8ba23b80836607343f7dad576c730747d7ca672b9b2c55318b69a0eb956cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81a67f95d05900d181d9ffd87eea654d0ccf44cb0e9d9dc83d76b8999d203595a8015e4f8a1a9aae83b028c5dd8b343450795bab7e05bf7c194c31a15112c7d3
|
7
|
+
data.tar.gz: 7a27339a72cd15419af5961680e178fb723919082f9a47cf7a9d8fbfd07db9936c3931b16ab665efae073ab58ee719d1f6689123d8babe878c7225d50d9e73dc
|
data/dockers/README.rst
CHANGED
data/lib/MrMurano/Config.rb
CHANGED
@@ -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
|
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
|
-
|
501
|
-
|
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.')
|
data/lib/MrMurano/ReCommander.rb
CHANGED
@@ -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?
|
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
|
)
|
data/lib/MrMurano/version.rb
CHANGED
@@ -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.
|
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.
|
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-
|
11
|
+
date: 2018-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: certified
|