MrMurano 1.12.6 → 1.12.8
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/lib/MrMurano/Config.rb +2 -13
- data/lib/MrMurano/Solution-Services.rb +4 -2
- data/lib/MrMurano/commands.rb +1 -0
- data/lib/MrMurano/version.rb +1 -1
- data/spec/Config_spec.rb +0 -128
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e591da051dc929f8d3102ad5d5e4e509cfc8f615
|
|
4
|
+
data.tar.gz: bcc33ba440e43735cccf0ecfd533cfaed7de6c5f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bc03f582fa7ef39dc93448f4ad3a01285bfb2758e89e959f2bc8aec4d7ad8088b7a1b4bf04822165afd7960329ea4612a07c371e3377bdc4d5c2bf9224692cae
|
|
7
|
+
data.tar.gz: 1dedb31aca67f814643b11bb29715708f3d857b7e4e0ae7ed242a084aac9418e2520c085d69acadce0c2b3cd84d72367ce6bc7701cc969c75ef472178a3ca963
|
data/lib/MrMurano/Config.rb
CHANGED
|
@@ -120,8 +120,8 @@ module MrMurano
|
|
|
120
120
|
dirNames=[CFG_DIR_NAME]
|
|
121
121
|
home = Pathname.new(Dir.home).realpath
|
|
122
122
|
pwd = Pathname.new(Dir.pwd).realpath
|
|
123
|
-
return
|
|
124
|
-
pwd.
|
|
123
|
+
return home if home == pwd
|
|
124
|
+
pwd.ascend do |i|
|
|
125
125
|
break unless result.nil?
|
|
126
126
|
break if i == home
|
|
127
127
|
fileNames.each do |f|
|
|
@@ -136,17 +136,6 @@ module MrMurano
|
|
|
136
136
|
end
|
|
137
137
|
end
|
|
138
138
|
|
|
139
|
-
# If nothing found, do a last ditch try by looking for .git/
|
|
140
|
-
if result.nil? then
|
|
141
|
-
pwd.dirname.ascend do |i|
|
|
142
|
-
break unless result.nil?
|
|
143
|
-
break if i == home
|
|
144
|
-
if (i + '.git').directory? then
|
|
145
|
-
result = i
|
|
146
|
-
end
|
|
147
|
-
end
|
|
148
|
-
end
|
|
149
|
-
|
|
150
139
|
# Now if nothing found, assume it will live in pwd.
|
|
151
140
|
result = Pathname.new(Dir.pwd) if result.nil?
|
|
152
141
|
return result
|
|
@@ -33,10 +33,12 @@ module MrMurano
|
|
|
33
33
|
raise "Missing name!" if name.nil?
|
|
34
34
|
raise "Empty name!" if name.empty?
|
|
35
35
|
ret = get('/'+CGI.escape(name))
|
|
36
|
+
error "Unexpected result type, assuming empty instead: #{ret}" unless ret.kind_of? Hash
|
|
37
|
+
ret = {} unless ret.kind_of? Hash
|
|
36
38
|
if block_given? then
|
|
37
|
-
yield ret[:script]
|
|
39
|
+
yield (ret[:script] or '')
|
|
38
40
|
else
|
|
39
|
-
ret[:script]
|
|
41
|
+
ret[:script] or ''
|
|
40
42
|
end
|
|
41
43
|
end
|
|
42
44
|
|
data/lib/MrMurano/commands.rb
CHANGED
|
@@ -19,6 +19,7 @@ require 'MrMurano/commands/productDeviceIdCmds'
|
|
|
19
19
|
require 'MrMurano/commands/productList'
|
|
20
20
|
require 'MrMurano/commands/productSpec'
|
|
21
21
|
require 'MrMurano/commands/productWrite'
|
|
22
|
+
require 'MrMurano/commands/show'
|
|
22
23
|
require 'MrMurano/commands/solution'
|
|
23
24
|
require 'MrMurano/commands/solutionCreate'
|
|
24
25
|
require 'MrMurano/commands/solutionDelete'
|
data/lib/MrMurano/version.rb
CHANGED
data/spec/Config_spec.rb
CHANGED
|
@@ -280,134 +280,6 @@ RSpec.describe MrMurano::Config do
|
|
|
280
280
|
end
|
|
281
281
|
end
|
|
282
282
|
|
|
283
|
-
context "Can find the project directory by .git/" do
|
|
284
|
-
before(:example) do
|
|
285
|
-
@tmpdir = Dir.tmpdir
|
|
286
|
-
path = '/home/work/project/some/where'
|
|
287
|
-
@projectDir = @tmpdir + '/home/work/project'
|
|
288
|
-
FileUtils.mkpath(@tmpdir + path)
|
|
289
|
-
FileUtils.mkpath(@projectDir + '/.git')
|
|
290
|
-
|
|
291
|
-
# Set ENV to override output of Dir.home
|
|
292
|
-
ENV['HOME'] = @tmpdir + '/home'
|
|
293
|
-
end
|
|
294
|
-
|
|
295
|
-
after(:example) do
|
|
296
|
-
FileUtils.remove_dir(@tmpdir + '/home', true) if FileTest.exist? @tmpdir
|
|
297
|
-
end
|
|
298
|
-
|
|
299
|
-
it "when in project directory" do
|
|
300
|
-
Dir.chdir(@projectDir) do
|
|
301
|
-
cfg = MrMurano::Config.new
|
|
302
|
-
cfg.load
|
|
303
|
-
# Follow symlinks to get the paths comparable.
|
|
304
|
-
locbase = cfg.get('location.base', :defaults).realdirpath
|
|
305
|
-
wkd = Pathname.new(@projectDir).realdirpath
|
|
306
|
-
expect(locbase).to eq(wkd)
|
|
307
|
-
end
|
|
308
|
-
end
|
|
309
|
-
|
|
310
|
-
it "when in sub directory" do
|
|
311
|
-
Dir.chdir(@projectDir + '/some/where') do
|
|
312
|
-
cfg = MrMurano::Config.new
|
|
313
|
-
cfg.load
|
|
314
|
-
# Follow symlinks to get the paths comparable.
|
|
315
|
-
locbase = cfg.get('location.base', :defaults).realdirpath
|
|
316
|
-
wkd = Pathname.new(@projectDir).realdirpath
|
|
317
|
-
expect(locbase).to eq(wkd)
|
|
318
|
-
end
|
|
319
|
-
end
|
|
320
|
-
end
|
|
321
|
-
|
|
322
|
-
context "Can find the project directory by .mrmuranorc but not sub .git/" do
|
|
323
|
-
#
|
|
324
|
-
# /home/work/project/
|
|
325
|
-
# /home/work/project/.mrmuranorc
|
|
326
|
-
# /home/work/project/some/.git
|
|
327
|
-
before(:example) do
|
|
328
|
-
@tmpdir = Dir.tmpdir
|
|
329
|
-
path = '/home/work/project/some/where'
|
|
330
|
-
@projectDir = @tmpdir + '/home/work/project'
|
|
331
|
-
FileUtils.mkpath(@tmpdir + path)
|
|
332
|
-
FileUtils.touch(@projectDir + '/.mrmuranorc')
|
|
333
|
-
FileUtils.mkpath(@projectDir + '/some/.git')
|
|
334
|
-
|
|
335
|
-
# Set ENV to override output of Dir.home
|
|
336
|
-
ENV['HOME'] = @tmpdir + '/home'
|
|
337
|
-
end
|
|
338
|
-
|
|
339
|
-
after(:example) do
|
|
340
|
-
FileUtils.remove_dir(@tmpdir + '/home', true) if FileTest.exist? @tmpdir
|
|
341
|
-
end
|
|
342
|
-
|
|
343
|
-
it "when in project directory" do
|
|
344
|
-
Dir.chdir(@projectDir) do
|
|
345
|
-
cfg = MrMurano::Config.new
|
|
346
|
-
cfg.load
|
|
347
|
-
# Follow symlinks to get the paths comparable.
|
|
348
|
-
locbase = cfg.get('location.base', :defaults).realdirpath
|
|
349
|
-
wkd = Pathname.new(@projectDir).realdirpath
|
|
350
|
-
expect(locbase).to eq(wkd)
|
|
351
|
-
end
|
|
352
|
-
end
|
|
353
|
-
|
|
354
|
-
it "when in sub directory" do
|
|
355
|
-
Dir.chdir(@projectDir + '/some/where') do
|
|
356
|
-
cfg = MrMurano::Config.new
|
|
357
|
-
cfg.load
|
|
358
|
-
# Follow symlinks to get the paths comparable.
|
|
359
|
-
locbase = cfg.get('location.base', :defaults).realdirpath
|
|
360
|
-
wkd = Pathname.new(@projectDir).realdirpath
|
|
361
|
-
expect(locbase).to eq(wkd)
|
|
362
|
-
end
|
|
363
|
-
end
|
|
364
|
-
end
|
|
365
|
-
|
|
366
|
-
context "Can find the project directory by .mrmuranorc but not parent .git/" do
|
|
367
|
-
# /home/work/project/
|
|
368
|
-
# /home/work/project/.git
|
|
369
|
-
# /home/work/project/some/.mrmuranorc
|
|
370
|
-
before(:example) do
|
|
371
|
-
@tmpdir = Dir.tmpdir
|
|
372
|
-
path = '/home/work/project/some/where'
|
|
373
|
-
@projectDir = @tmpdir + '/home/work/project'
|
|
374
|
-
FileUtils.mkpath(@tmpdir + path)
|
|
375
|
-
FileUtils.touch(@projectDir + '/some/.mrmuranorc')
|
|
376
|
-
FileUtils.mkpath(@projectDir + '/.git')
|
|
377
|
-
|
|
378
|
-
# Set ENV to override output of Dir.home
|
|
379
|
-
ENV['HOME'] = @tmpdir + '/home'
|
|
380
|
-
end
|
|
381
|
-
|
|
382
|
-
after(:example) do
|
|
383
|
-
FileUtils.remove_dir(@tmpdir + '/home', true) if FileTest.exist? @tmpdir
|
|
384
|
-
end
|
|
385
|
-
|
|
386
|
-
it "when in project directory" do
|
|
387
|
-
Dir.chdir(@projectDir) do
|
|
388
|
-
cfg = MrMurano::Config.new
|
|
389
|
-
cfg.load
|
|
390
|
-
# Follow symlinks to get the paths comparable.
|
|
391
|
-
locbase = cfg.get('location.base', :defaults).realdirpath
|
|
392
|
-
wkd = Pathname.new(@projectDir).realdirpath
|
|
393
|
-
# This will correctly assume that this project dir with .git is the
|
|
394
|
-
# location.base
|
|
395
|
-
expect(locbase).to eq(wkd)
|
|
396
|
-
end
|
|
397
|
-
end
|
|
398
|
-
|
|
399
|
-
it "when in sub directory" do
|
|
400
|
-
Dir.chdir(@projectDir + '/some/where') do
|
|
401
|
-
cfg = MrMurano::Config.new
|
|
402
|
-
cfg.load
|
|
403
|
-
# Follow symlinks to get the paths comparable.
|
|
404
|
-
locbase = cfg.get('location.base', :defaults).realdirpath
|
|
405
|
-
wkd = Pathname.new(@projectDir+'/some').realdirpath
|
|
406
|
-
expect(locbase).to eq(wkd)
|
|
407
|
-
end
|
|
408
|
-
end
|
|
409
|
-
end
|
|
410
|
-
|
|
411
283
|
context "When pwd is $HOME:" do
|
|
412
284
|
before(:example) do
|
|
413
285
|
@tmpdir = Dir.tmpdir
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: MrMurano
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.12.
|
|
4
|
+
version: 1.12.8
|
|
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: 2017-02-
|
|
11
|
+
date: 2017-02-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: commander
|