cocoaseeds 0.8.1 → 0.8.2
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/cocoaseeds/core.rb +11 -9
- data/lib/cocoaseeds/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6cdbe62c6ee00c2baa9ca00eca588b5ac3fcca0
|
4
|
+
data.tar.gz: 18b06fc5001f3a194b2aa2975d72dc0484d4ea37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a341ecab4acdaa69300157afb3e994924c8b4e4ce02d8c40573d89eed02a01f01ebf1e0757973cd3512e3dad4b05201c7d88e77f31954e72681fc8367acacb0e
|
7
|
+
data.tar.gz: bf75941384b2f825a4d3d1f23a4f5d1b545ff8a2ed7e3c89604ac01a79042464d36472b064362c6067aaf36f00064565500cb81223a0d15202da40cfb6170fb6
|
data/lib/cocoaseeds/core.rb
CHANGED
@@ -413,9 +413,9 @@ module Seeds
|
|
413
413
|
self.seeds.sort.each do |name, seed|
|
414
414
|
dirname = File.join(self.root_path, "Seeds", seed.name)
|
415
415
|
if seed.instance_of? Seeds::Seed::LocalSeed
|
416
|
-
self.install_local_seed(seed,
|
416
|
+
self.install_local_seed(seed, dirname)
|
417
417
|
else
|
418
|
-
self.install_seed(seed,
|
418
|
+
self.install_seed(seed, dirname)
|
419
419
|
end
|
420
420
|
|
421
421
|
next if not seed.files
|
@@ -448,7 +448,7 @@ module Seeds
|
|
448
448
|
def install_seed(seed, dirname)
|
449
449
|
# if remote url has changed, remove directory and clone again
|
450
450
|
remote_url = `
|
451
|
-
cd #{dirname} 2>&1 &&
|
451
|
+
cd #{Shellwords.escape(dirname)} 2>&1 &&
|
452
452
|
git remote show origin -n | grep Fetch | awk '{ print $3 }' 2>&1
|
453
453
|
`.strip
|
454
454
|
if remote_url != seed.url
|
@@ -461,7 +461,7 @@ module Seeds
|
|
461
461
|
|
462
462
|
command = "git clone #{seed.url}"
|
463
463
|
command += " -b #{seed.version}" if seed.version
|
464
|
-
command += " #{dirname} 2>&1"
|
464
|
+
command += " #{Shellwords.escape(dirname)} 2>&1"
|
465
465
|
output = `#{command}`
|
466
466
|
|
467
467
|
unable_to_access = output.include?("unable to access")
|
@@ -480,7 +480,8 @@ module Seeds
|
|
480
480
|
end
|
481
481
|
|
482
482
|
if seed.commit and not seed.version # checkout to commit
|
483
|
-
output = `cd #{dirname} 2>&1
|
483
|
+
output = `cd #{Shellwords.escape(dirname)} 2>&1 &&\
|
484
|
+
git checkout #{seed.commit} 2>&1`
|
484
485
|
if output.include?("did not match any")
|
485
486
|
raise Seeds::Exception.new\
|
486
487
|
"#{seed.name}: Couldn't find the commit `#{seed.commit}`."
|
@@ -491,7 +492,7 @@ module Seeds
|
|
491
492
|
end
|
492
493
|
|
493
494
|
# discard local changes
|
494
|
-
`cd #{dirname} 2>&1 &&\
|
495
|
+
`cd #{Shellwords.escape(dirname)} 2>&1 &&\
|
495
496
|
git reset HEAD --hard 2>&1 &&\
|
496
497
|
git checkout . 2>&1 &&\
|
497
498
|
git clean -fd 2>&1`
|
@@ -509,7 +510,7 @@ module Seeds
|
|
509
510
|
if seed.version
|
510
511
|
say "Installing #{seed.name} #{seed.version}"\
|
511
512
|
" (was #{lock_version or lock_commit})".green
|
512
|
-
output = `cd #{dirname} 2>&1 &&\
|
513
|
+
output = `cd #{Shellwords.escape(dirname)} 2>&1 &&\
|
513
514
|
git fetch origin #{seed.version} --tags 2>&1 &&\
|
514
515
|
git checkout #{seed.version} 2>&1`
|
515
516
|
if output.include?("Couldn't find")
|
@@ -520,7 +521,7 @@ module Seeds
|
|
520
521
|
elsif seed.commit
|
521
522
|
say "Installing #{seed.name} #{seed.commit}"\
|
522
523
|
" (was #{lock_version or lock_commit})".green
|
523
|
-
output = `cd #{dirname} 2>&1 &&
|
524
|
+
output = `cd #{Shellwords.escape(dirname)} 2>&1 &&
|
524
525
|
git checkout master 2>&1 &&
|
525
526
|
git pull 2>&1 &&
|
526
527
|
git checkout #{seed.commit} 2>&1`
|
@@ -541,7 +542,8 @@ module Seeds
|
|
541
542
|
|
542
543
|
if seed.source_dir
|
543
544
|
full_source_path = File.expand_path(seed.source_dir)
|
544
|
-
command = "cp -R #{full_source_path}/*
|
545
|
+
command = "cp -R #{Shellwords.escape(full_source_path)}/* "\
|
546
|
+
"#{Shellwords.escape(self.root_path)}/Seeds/#{seed.name}"
|
545
547
|
output = `#{command}`
|
546
548
|
else
|
547
549
|
raise Seeds::Exception.new\
|
data/lib/cocoaseeds/version.rb
CHANGED