MuranoCLI 3.0.2 → 3.0.4
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 +4 -4
- data/.rubocop.yml +30 -59
- data/Gemfile +9 -3
- data/MuranoCLI.gemspec +11 -4
- data/bin/murano +2 -90
- data/lib/MrMurano.rb +5 -1
- data/lib/MrMurano/{spec_commander.rb → Commander-Entry.rb} +1 -2
- data/lib/MrMurano/Solution.rb +12 -15
- data/lib/MrMurano/SolutionId.rb +1 -5
- data/lib/MrMurano/SyncAllowed.rb +2 -2
- data/lib/MrMurano/SyncUpDown.rb +6 -3
- data/lib/MrMurano/progress.rb +11 -2
- data/lib/MrMurano/verbosing.rb +3 -2
- data/lib/MrMurano/version.rb +2 -2
- data/spec/Account-Passwords_spec.rb +34 -48
- data/spec/Account_spec.rb +58 -63
- data/spec/Business_spec.rb +151 -139
- data/spec/ConfigFile_spec.rb +15 -11
- data/spec/ConfigMigrate_spec.rb +23 -12
- data/spec/Config_spec.rb +57 -54
- data/spec/Content_spec.rb +233 -201
- data/spec/GatewayBase_spec.rb +35 -27
- data/spec/GatewayDevice_spec.rb +149 -149
- data/spec/GatewayResource_spec.rb +115 -102
- data/spec/GatewaySettings_spec.rb +69 -62
- data/spec/Http_spec.rb +66 -56
- data/spec/MakePretties_spec.rb +82 -73
- data/spec/Mock_spec.rb +38 -29
- data/spec/ProjectFile_spec.rb +118 -106
- data/spec/Setting_spec.rb +24 -15
- data/spec/Solution-ServiceConfig_spec.rb +168 -140
- data/spec/Solution-ServiceEventHandler_spec.rb +186 -188
- data/spec/Solution-ServiceModules_spec.rb +314 -232
- data/spec/Solution-UsersRoles_spec.rb +136 -86
- data/spec/Solution_spec.rb +78 -50
- data/spec/SyncRoot_spec.rb +26 -24
- data/spec/SyncUpDown_spec.rb +268 -249
- data/spec/Verbosing_spec.rb +95 -93
- data/spec/Webservice-Cors_spec.rb +141 -95
- data/spec/Webservice-Endpoint_spec.rb +382 -346
- data/spec/Webservice-File_spec.rb +148 -109
- data/spec/Webservice-Setting_spec.rb +47 -41
- data/spec/cmd_business_spec.rb +17 -17
- data/spec/cmd_common.rb +27 -7
- data/spec/cmd_config_spec.rb +31 -20
- data/spec/cmd_content_spec.rb +80 -68
- data/spec/cmd_cors_spec.rb +11 -5
- data/spec/cmd_device_spec.rb +16 -14
- data/spec/cmd_domain_spec.rb +10 -8
- data/spec/cmd_exchange_spec.rb +3 -3
- data/spec/cmd_init_spec.rb +100 -101
- data/spec/cmd_keystore_spec.rb +17 -12
- data/spec/cmd_link_spec.rb +22 -37
- data/spec/cmd_password_spec.rb +11 -7
- data/spec/cmd_setting_application_spec.rb +47 -33
- data/spec/cmd_setting_product_spec.rb +32 -27
- data/spec/cmd_status_spec.rb +125 -114
- data/spec/cmd_syncdown_spec.rb +70 -65
- data/spec/cmd_syncup_spec.rb +19 -15
- data/spec/cmd_usage_spec.rb +14 -10
- metadata +29 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec3cf38c4b880ec614977a7f6d95fc8b5ac69e68
|
4
|
+
data.tar.gz: 41b0bf32389f080867f13df0906262881ebad5ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9053361d890f83cf9037bfd811bac313b1893df69daf88a13b5dab2a744c01239c7f19fb49428b1949fb578a8d50ab11a61a3033b8d1dd65f202b706de0cd116
|
7
|
+
data.tar.gz: af31c49ad0e42dc9a6e6eb4a6953b591b98b58c2547377e9b7e0e8d3ae53fad38256c1c72a699cdb8e18a6848ef489234cbf7408c8739cbc318e0a99f407a2c4
|
data/.rubocop.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Last Modified: 2017.
|
1
|
+
# Last Modified: 2017.09.12 /coding: utf-8
|
2
2
|
# Copyright © 2016-2017 Exosite LLC.
|
3
3
|
# License: MIT. See LICENSE.txt.
|
4
4
|
# vim:tw=0:ts=2:sw=2:et:ai
|
@@ -28,8 +28,6 @@ Layout/TrailingBlankLines:
|
|
28
28
|
Lint/ScriptPermission:
|
29
29
|
Exclude:
|
30
30
|
- 'bin/murano'
|
31
|
-
# Also the rspec shim-link:
|
32
|
-
- 'lib/MrMurano/spec_commander.rb'
|
33
31
|
|
34
32
|
# "Assignment Branch Condition size for XXX is too high."
|
35
33
|
# http://wiki.c2.com/?AbcMetric
|
@@ -121,6 +119,7 @@ Style/FileName:
|
|
121
119
|
- 'lib/MrMurano/makePretty.rb'
|
122
120
|
- 'lib/MrMurano/Account.rb'
|
123
121
|
- 'lib/MrMurano/Business.rb'
|
122
|
+
- 'lib/MrMurano/Commander-Entry.rb'
|
124
123
|
- 'lib/MrMurano/Config-Migrate.rb'
|
125
124
|
- 'lib/MrMurano/Config.rb'
|
126
125
|
- 'lib/MrMurano/Content.rb'
|
@@ -146,6 +145,34 @@ Style/FileName:
|
|
146
145
|
- 'lib/MrMurano/Webservice-Endpoint.rb'
|
147
146
|
- 'lib/MrMurano/Webservice-File.rb'
|
148
147
|
- 'lib/MrMurano/Webservice.rb'
|
148
|
+
- 'spec/Account-Passwords_spec.rb'
|
149
|
+
- 'spec/Account_spec.rb'
|
150
|
+
- 'spec/Business_spec.rb'
|
151
|
+
- 'spec/ConfigFile_spec.rb'
|
152
|
+
- 'spec/ConfigMigrate_spec.rb'
|
153
|
+
- 'spec/Config_spec.rb'
|
154
|
+
- 'spec/Content_spec.rb'
|
155
|
+
- 'spec/GatewayBase_spec.rb'
|
156
|
+
- 'spec/GatewayDevice_spec.rb'
|
157
|
+
- 'spec/GatewayResource_spec.rb'
|
158
|
+
- 'spec/GatewaySettings_spec.rb'
|
159
|
+
- 'spec/Http_spec.rb'
|
160
|
+
- 'spec/MakePretties_spec.rb'
|
161
|
+
- 'spec/Mock_spec.rb'
|
162
|
+
- 'spec/ProjectFile_spec.rb'
|
163
|
+
- 'spec/Setting_spec.rb'
|
164
|
+
- 'spec/Solution-ServiceConfig_spec.rb'
|
165
|
+
- 'spec/Solution-ServiceEventHandler_spec.rb'
|
166
|
+
- 'spec/Solution-ServiceModules_spec.rb'
|
167
|
+
- 'spec/Solution-UsersRoles_spec.rb'
|
168
|
+
- 'spec/Solution_spec.rb'
|
169
|
+
- 'spec/SyncRoot_spec.rb'
|
170
|
+
- 'spec/SyncUpDown_spec.rb'
|
171
|
+
- 'spec/Verbosing_spec.rb'
|
172
|
+
- 'spec/Webservice-Cors_spec.rb'
|
173
|
+
- 'spec/Webservice-Endpoint_spec.rb'
|
174
|
+
- 'spec/Webservice-File_spec.rb'
|
175
|
+
- 'spec/Webservice-Setting_spec.rb'
|
149
176
|
|
150
177
|
# FIXME/2017-06-30: We should fix this one... put $cfg in MrMurano class.
|
151
178
|
# "Do not introduce global variables."
|
@@ -243,65 +270,9 @@ AllCops:
|
|
243
270
|
# 2017-08-16: Ug.
|
244
271
|
- 'lib/MrMurano/optparse.rb'
|
245
272
|
#
|
246
|
-
# 2017-08-29: A hack for rspec.
|
247
|
-
#- 'lib/Murano/spec_commander.rb'
|
248
|
-
#
|
249
273
|
# 2017-08-30: Ug. Loading orderedhash spits out warning gobbled by rspec fails test.
|
250
274
|
- 'lib/MrMurano/orderedhash.rb'
|
251
275
|
#
|
252
276
|
# The spec_helper is a generated file; don't care.
|
253
277
|
- 'spec/spec_helper.rb'
|
254
|
-
#
|
255
|
-
# 2017-07-25: It's probably not worth our time to lint the spec tests.
|
256
|
-
# 2017-07-31: 7735 offenses in the Spec tests -- not worth it to fix!!
|
257
|
-
#- 'spec/**/*'
|
258
|
-
- 'spec/Account-Passwords_spec.rb'
|
259
|
-
- 'spec/Account_spec.rb'
|
260
|
-
- 'spec/Business_spec.rb'
|
261
|
-
- 'spec/ConfigFile_spec.rb'
|
262
|
-
- 'spec/ConfigMigrate_spec.rb'
|
263
|
-
- 'spec/Config_spec.rb'
|
264
|
-
- 'spec/Content_spec.rb'
|
265
|
-
- 'spec/GatewayBase_spec.rb'
|
266
|
-
- 'spec/GatewayDevice_spec.rb'
|
267
|
-
- 'spec/GatewayResource_spec.rb'
|
268
|
-
- 'spec/GatewaySettings_spec.rb'
|
269
|
-
- 'spec/Http_spec.rb'
|
270
|
-
- 'spec/MakePretties_spec.rb'
|
271
|
-
- 'spec/Mock_spec.rb'
|
272
|
-
- 'spec/ProjectFile_spec.rb'
|
273
|
-
- 'spec/Setting_spec.rb'
|
274
|
-
- 'spec/Solution-ServiceConfig_spec.rb'
|
275
|
-
- 'spec/Solution-ServiceEventHandler_spec.rb'
|
276
|
-
- 'spec/Solution-ServiceModules_spec.rb'
|
277
|
-
- 'spec/Solution-UsersRoles_spec.rb'
|
278
|
-
- 'spec/Solution_spec.rb'
|
279
|
-
- 'spec/SyncRoot_spec.rb'
|
280
|
-
- 'spec/SyncUpDown_spec.rb'
|
281
|
-
- 'spec/Verbosing_spec.rb'
|
282
|
-
- 'spec/Webservice-Cors_spec.rb'
|
283
|
-
- 'spec/Webservice-Endpoint_spec.rb'
|
284
|
-
- 'spec/Webservice-File_spec.rb'
|
285
|
-
- 'spec/Webservice-Setting_spec.rb'
|
286
|
-
#- 'spec/_workspace.rb'
|
287
|
-
- 'spec/cmd_business_spec.rb'
|
288
|
-
#- 'spec/cmd_common.rb'
|
289
|
-
- 'spec/cmd_config_spec.rb'
|
290
|
-
- 'spec/cmd_content_spec.rb'
|
291
|
-
- 'spec/cmd_cors_spec.rb'
|
292
|
-
- 'spec/cmd_device_spec.rb'
|
293
|
-
- 'spec/cmd_domain_spec.rb'
|
294
|
-
#- 'spec/cmd_exchange_spec.rb'
|
295
|
-
#- 'spec/cmd_help_spec.rb'
|
296
|
-
- 'spec/cmd_init_spec.rb'
|
297
|
-
- 'spec/cmd_keystore_spec.rb'
|
298
|
-
- 'spec/cmd_link_spec.rb'
|
299
|
-
- 'spec/cmd_password_spec.rb'
|
300
|
-
- 'spec/cmd_setting_application_spec.rb'
|
301
|
-
- 'spec/cmd_setting_product_spec.rb'
|
302
|
-
- 'spec/cmd_status_spec.rb'
|
303
|
-
- 'spec/cmd_syncdown_spec.rb'
|
304
|
-
- 'spec/cmd_syncup_spec.rb'
|
305
|
-
- 'spec/cmd_usage_spec.rb'
|
306
|
-
#- 'spec/cmd_version_spec.rb'
|
307
278
|
|
data/Gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Last Modified: 2017.
|
1
|
+
# Last Modified: 2017.09.12 /coding: utf-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
# Copyright © 2016-2017 Exosite LLC.
|
@@ -22,11 +22,15 @@ gem 'json-schema', '~> 2.7.0'
|
|
22
22
|
gem 'mime-types', '~> 3.1'
|
23
23
|
gem 'mime-types-data', '~> 3.2016.0521'
|
24
24
|
#gem 'orderedhash', '~> 0.0.6'
|
25
|
+
gem 'os', '~> 1.0.0'
|
25
26
|
gem 'paint', '~> 2.0.0'
|
26
27
|
# 2017-08-04: public_suffix 3.0.0 is for Ruby >= 2.1.
|
27
28
|
# It's included by json, so make sure it's the old one.
|
28
29
|
gem 'public_suffix', '~> 2.0.5'
|
29
30
|
gem 'rainbow', '~> 2.2.2'
|
31
|
+
# LATER/2017-09-12: See MRMUR-160 and MRMUR-161:
|
32
|
+
# Windows build fails unless `rake` is packaged.
|
33
|
+
gem 'rake', '~> 12.1.0'
|
30
34
|
gem 'terminal-table', '~> 1.8.0'
|
31
35
|
gem 'vine', '~> 0.4'
|
32
36
|
gem 'whirly', '~> 0.2.4'
|
@@ -35,7 +39,7 @@ group :test do
|
|
35
39
|
#gem 'bundler', '~> 1.7.6'
|
36
40
|
gem 'byebug', '~> 9.0.6'
|
37
41
|
gem 'coderay', require: false
|
38
|
-
gem 'rake', '~> 10.1.1'
|
42
|
+
#gem 'rake', '~> 10.1.1'
|
39
43
|
gem 'rspec', '~> 3.5'
|
40
44
|
gem 'rubocop', '~> 0.49.1'
|
41
45
|
gem 'simplecov', require: false
|
@@ -45,6 +49,8 @@ group :test do
|
|
45
49
|
end
|
46
50
|
|
47
51
|
group :windows do
|
48
|
-
|
52
|
+
# FIXME/2017-09-12: Pin to 1.3.8 until x86 issue is resolved:
|
53
|
+
# https://github.com/larsch/ocra/issues/124
|
54
|
+
gem 'ocra', '1.3.8'
|
49
55
|
end
|
50
56
|
|
data/MuranoCLI.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Last Modified: 2017.
|
1
|
+
# Last Modified: 2017.09.12 /coding: utf-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
# Copyright © 2016-2017 Exosite LLC.
|
@@ -63,6 +63,7 @@ explicitly specifying the version. For instance,
|
|
63
63
|
s.add_runtime_dependency('mime-types', '~> 3.1')
|
64
64
|
s.add_runtime_dependency('mime-types-data', '~> 3.2016.0521')
|
65
65
|
#s.add_runtime_dependency('orderedhash', '~> 0.0.6')
|
66
|
+
s.add_runtime_dependency('os', '~> 1.0.0')
|
66
67
|
s.add_runtime_dependency('paint', '~> 2.0.0')
|
67
68
|
# 2017-08-04: public_suffix 3.0.0 is for Ruby >= 2.1.
|
68
69
|
# It's included by json, so make sure it's the old one.
|
@@ -71,11 +72,15 @@ explicitly specifying the version. For instance,
|
|
71
72
|
s.add_runtime_dependency('terminal-table', '~> 1.8.0')
|
72
73
|
s.add_runtime_dependency('vine', '~> 0.4')
|
73
74
|
s.add_runtime_dependency('whirly', '~> 0.2.4')
|
75
|
+
# LATER/2017-09-12: See MRMUR-160 and MRMUR-161:
|
76
|
+
# Windows build fails unless `rake` is packaged.
|
77
|
+
s.add_runtime_dependency('rake', '~> 12.1.0')
|
74
78
|
|
79
|
+
# `bundle install --with=test`
|
75
80
|
s.add_development_dependency('bundler', '~> 1.7.6')
|
76
81
|
s.add_development_dependency('byebug', '~> 9.0.6')
|
77
82
|
#s.add_development_dependency('coderay', '~> ???')
|
78
|
-
s.add_development_dependency('rake', '~>
|
83
|
+
#s.add_development_dependency('rake', '~> 12.1.0')
|
79
84
|
s.add_development_dependency('rspec', '~> 3.5')
|
80
85
|
s.add_development_dependency('rubocop', '~> 0.49.1')
|
81
86
|
s.add_development_dependency('simplecov')
|
@@ -83,7 +88,9 @@ explicitly specifying the version. For instance,
|
|
83
88
|
# maybe? s.add_development_dependency('vcr', '~> ???')
|
84
89
|
s.add_development_dependency('yard')
|
85
90
|
|
86
|
-
#
|
87
|
-
|
91
|
+
# `bundle install --with=windows`
|
92
|
+
# FIXME/2017-09-12: Pin to 1.3.8 until x86 issue is resolved:
|
93
|
+
# https://github.com/larsch/ocra/issues/124
|
94
|
+
s.add_development_dependency('ocra', '1.3.8')
|
88
95
|
end
|
89
96
|
|
data/bin/murano
CHANGED
@@ -1,98 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# Last Modified: 2017.
|
2
|
+
# Last Modified: 2017.09.12 /coding: utf-8
|
3
3
|
# frozen_string_literal: true
|
4
4
|
|
5
5
|
# Copyright © 2016-2017 Exosite LLC.
|
6
6
|
# License: MIT. See LICENSE.txt.
|
7
7
|
# vim:tw=0:ts=2:sw=2:et:ai
|
8
8
|
|
9
|
-
require '
|
10
|
-
require 'dotenv'
|
11
|
-
require 'English'
|
12
|
-
require 'highline'
|
13
|
-
require 'pathname'
|
14
|
-
#require 'pp'
|
15
|
-
require 'rainbow'
|
16
|
-
require 'rubygems'
|
17
|
-
require 'MrMurano'
|
18
|
-
require 'MrMurano/Config'
|
19
|
-
require 'MrMurano/ProjectFile'
|
20
|
-
|
21
|
-
# DEVs: Store environs in an .env file that gets loaded here. Alternatively,
|
22
|
-
# run a Bash or similar script before you start developing.
|
23
|
-
Dotenv.load
|
24
|
-
|
25
|
-
# Don't drop traces on ^C.
|
26
|
-
# EXPLAIN/2017-06-30: [lb] not sure what "drop traces" means.
|
27
|
-
# What happens if we don't trap Ctrl-C?
|
28
|
-
# NOTE: The second parameter is either a string, or a command or block to
|
29
|
-
# call or run. Ruby honors certain special strings, like 'EXIT':
|
30
|
-
# "If the command is “EXIT”, the script will be terminated by the signal."
|
31
|
-
# Per https://ruby-doc.org/core-2.2.0/Signal.html
|
32
|
-
Signal.trap('INT', 'EXIT')
|
33
|
-
|
34
|
-
program :version, MrMurano::VERSION
|
35
|
-
|
36
|
-
program :description, %(
|
37
|
-
Manage Applications and Products in Exosite's Murano
|
38
|
-
).strip
|
39
|
-
|
40
|
-
# If being piped, e.g.,
|
41
|
-
# murano command ... | ...
|
42
|
-
# or
|
43
|
-
# VAR=$(murano command ...)
|
44
|
-
# etc., then do not do progress.
|
45
|
-
# TEST/2017-08-23: Does this work on Windows?
|
46
|
-
ARGV.push('--no-progress') unless $stdout.tty? || ARGV.include?('--no-progress')
|
47
|
-
|
48
|
-
default_command :help
|
49
|
-
|
50
|
-
# Look for plug-ins.
|
51
|
-
pgds = [
|
52
|
-
Pathname.new(Dir.home) + '.mrmurano' + 'plugins',
|
53
|
-
Pathname.new(Dir.home) + '.murano' + 'plugins',
|
54
|
-
]
|
55
|
-
# Add plugin dirs from configs
|
56
|
-
# This is run before the command line options are parsed, so need to check old way.
|
57
|
-
unless ARGV.include? '--skip-plugins'
|
58
|
-
pgds << Pathname.new(ENV['MR_MURANO_PLUGIN_DIR']) if ENV.key? 'MR_MURANO_PLUGIN_DIR'
|
59
|
-
pgds << Pathname.new(ENV['MURANO_PLUGIN_DIR']) if ENV.key? 'MURANO_PLUGIN_DIR'
|
60
|
-
pgds.each do |path|
|
61
|
-
next unless path.exist?
|
62
|
-
path.each_child do |plugin|
|
63
|
-
next if plugin.directory?
|
64
|
-
next unless plugin.readable?
|
65
|
-
next if plugin.basename.fnmatch('.*') # don't read anything starting with .
|
66
|
-
begin
|
67
|
-
require plugin.to_s
|
68
|
-
#rescue Exception => err
|
69
|
-
rescue StandardError => err
|
70
|
-
$stderr.puts "Failed to load plugin at #{plugin} because #{err}"
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
# Look for .murano/config files.
|
77
|
-
$cfg = MrMurano::Config.new(::Commander::Runner.instance)
|
78
|
-
$cfg.load
|
79
|
-
$cfg.validate_cmd
|
80
|
-
|
81
|
-
# Look for a (legacy) Solutionfile.json.
|
82
|
-
$project = MrMurano::ProjectFile.new
|
83
|
-
$project.load
|
84
|
-
|
85
|
-
# The Commander defaults to paged help.
|
86
|
-
# The user can disable with --no-page, e.g.,
|
87
|
-
# alias murano='murano --no-page'
|
88
|
-
# We define this here and not in globals.rb because
|
89
|
-
# `murano --help` does not cause globals.rb to be sourced.
|
90
|
-
paging = nil
|
91
|
-
paging = true if ARGV.include?('--page')
|
92
|
-
paging = false if ARGV.include?('--no-page')
|
93
|
-
unless paging.nil?
|
94
|
-
program :help_paging, paging
|
95
|
-
$cfg['tool.no-page'] = !paging
|
96
|
-
end
|
97
|
-
# else, commander defaults to paging.
|
9
|
+
require 'MrMurano/Commander-Entry'
|
98
10
|
|
data/lib/MrMurano.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Last Modified: 2017.
|
1
|
+
# Last Modified: 2017.09.12 /coding: utf-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
# Copyright © 2016-2017 Exosite LLC.
|
@@ -50,3 +50,7 @@ require 'MrMurano/SubCmdGroupContext'
|
|
50
50
|
require 'MrMurano/ReCommander'
|
51
51
|
require 'MrMurano/commands'
|
52
52
|
|
53
|
+
# LATER/2017-09-12: See MRMUR-160 and MRMUR-161:
|
54
|
+
# Windows build fails unless `rake` is packaged.
|
55
|
+
require 'rake'
|
56
|
+
|
data/lib/MrMurano/Solution.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Last Modified: 2017.09.
|
1
|
+
# Last Modified: 2017.09.12 /coding: utf-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
# Copyright © 2016-2017 Exosite LLC.
|
@@ -252,20 +252,17 @@ module MrMurano
|
|
252
252
|
"but config says #{fancy_ticks(@name)}."
|
253
253
|
)
|
254
254
|
end
|
255
|
-
if
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
end
|
267
|
-
end
|
268
|
-
end
|
255
|
+
return if @meta[:name].to_s.empty?
|
256
|
+
# NOTE: Pre-ADC (a/k/a migrated) applications are not named, at least
|
257
|
+
# when you query the business/<bid>/solution/ endpoint. But when you
|
258
|
+
# call info_safe, which GETs the solution details, the name is
|
259
|
+
# the domain and contains dots, which is considered an illegal name!
|
260
|
+
return if @meta[:name] == @meta[:domain]
|
261
|
+
set_name(@meta[:name])
|
262
|
+
return if @valid_name || type == :solution
|
263
|
+
warning(
|
264
|
+
"Unexpected: Server returned invalid name: #{fancy_ticks(@meta[:name])}"
|
265
|
+
)
|
269
266
|
end
|
270
267
|
|
271
268
|
def domain
|
data/lib/MrMurano/SolutionId.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Last Modified: 2017.09.
|
1
|
+
# Last Modified: 2017.09.12 /coding: utf-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
# Copyright © 2016-2017 Exosite LLC.
|
@@ -64,10 +64,6 @@ module MrMurano
|
|
64
64
|
@valid_api_id
|
65
65
|
end
|
66
66
|
|
67
|
-
def api_id
|
68
|
-
@api_id
|
69
|
-
end
|
70
|
-
|
71
67
|
def endpoint(_path='')
|
72
68
|
# This is hopefully just a DEV error, and not something user will ever see!
|
73
69
|
return unless @uriparts[@uriparts_apidex] == INVALID_API_ID
|
data/lib/MrMurano/SyncAllowed.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Last Modified: 2017.
|
1
|
+
# Last Modified: 2017.09.13 /coding: utf-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
# Copyright © 2016-2017 Exosite LLC.
|
@@ -14,7 +14,7 @@ module MrMurano
|
|
14
14
|
def sync_item_allowed(actioning, item_name)
|
15
15
|
if $cfg['tool.dry']
|
16
16
|
MrMurano::Verbose.whirly_interject do
|
17
|
-
|
17
|
+
puts("--dry: Not #{actioning} item: #{fancy_ticks(item_name)}")
|
18
18
|
end
|
19
19
|
false
|
20
20
|
else
|
data/lib/MrMurano/SyncUpDown.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Last Modified: 2017.09.
|
1
|
+
# Last Modified: 2017.09.12 /coding: utf-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
# Copyright © 2016-2017 Exosite LLC.
|
@@ -10,6 +10,7 @@
|
|
10
10
|
|
11
11
|
require 'inflecto'
|
12
12
|
require 'open3'
|
13
|
+
require 'os'
|
13
14
|
require 'pathname'
|
14
15
|
#require 'shellwords'
|
15
16
|
require 'tempfile'
|
@@ -352,8 +353,10 @@ module MrMurano
|
|
352
353
|
# This happens on Windows...
|
353
354
|
require 'rbconfig'
|
354
355
|
# Check the platform, e.g., "linux-gnu", or other.
|
355
|
-
is_windows = (
|
356
|
-
|
356
|
+
#is_windows = (
|
357
|
+
# RbConfig::CONFIG['host_os'] =~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/
|
358
|
+
#)
|
359
|
+
unless OS.windows?
|
357
360
|
msg = 'Unexpected: touch failed on non-Windows machine'
|
358
361
|
$stderr.puts("#{msg} / host_os: #{RbConfig::CONFIG['host_os']} / err: #{err}")
|
359
362
|
end
|
data/lib/MrMurano/progress.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Last Modified: 2017.
|
1
|
+
# Last Modified: 2017.09.12 /coding: utf-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
# Copyright © 2016-2017 Exosite LLC.
|
@@ -7,6 +7,7 @@
|
|
7
7
|
|
8
8
|
require 'highline'
|
9
9
|
require 'inflecto'
|
10
|
+
require 'os'
|
10
11
|
require 'singleton'
|
11
12
|
require 'whirly'
|
12
13
|
|
@@ -60,12 +61,20 @@ module MrMurano
|
|
60
61
|
end
|
61
62
|
|
62
63
|
def whirly_show
|
64
|
+
if $cfg['tool.ascii'] || OS.windows?
|
65
|
+
spinner = EXO_QUADRANTS_7
|
66
|
+
ansi_escape_mode = 'line'
|
67
|
+
else
|
68
|
+
spinner = EXO_QUADRANTS
|
69
|
+
ansi_escape_mode = 'restore'
|
70
|
+
end
|
63
71
|
Whirly.start(
|
64
|
-
spinner:
|
72
|
+
spinner: spinner,
|
65
73
|
status: @whirly_msg,
|
66
74
|
append_newline: false,
|
67
75
|
#remove_after_stop: false,
|
68
76
|
#stream: $stderr,
|
77
|
+
ansi_escape_mode: ansi_escape_mode,
|
69
78
|
)
|
70
79
|
@whirly_time = Time.now
|
71
80
|
# The whitespace we add ends up getting picked up if you copy
|