stack-service-base 0.0.26 → 0.0.27
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/stack-service-base/command_init.rb +23 -1
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8645f0987b9ed7a867a3393f45204c7c93904509188c8292292df6dbede9a707
|
4
|
+
data.tar.gz: 621fb5de718dced1d606fc2422378351d74ba269e75d7c3347f6647592e6345a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87d17c8d1682ab21e7b0051e41626d2b5ceaf04e0d08966ab74ff0513a715462173834a2ba3c5800249a6d60b6d820fd5cbfef2fda3b1dd27dd438681c05769d
|
7
|
+
data.tar.gz: 3602e01ebd65e4ec37275a034a63218a36078c49ace2c56a3e6e096921802ac1a682be7d8b4d3008293c70c0daab313ae172ac6b94a6acdcbc7e5f7398236934
|
@@ -25,10 +25,32 @@ SSBase::CommandLine::COMMANDS[:init] = Class.new do
|
|
25
25
|
update_service_name args.shift
|
26
26
|
end
|
27
27
|
|
28
|
+
def cp_r(src, dst)
|
29
|
+
# Mimics cp -rn src/. dst/ behavior.
|
30
|
+
Dir.glob("#{src}/**/{*,.*}", File::FNM_DOTMATCH).each do |source_path|
|
31
|
+
next if ['.', '..'].include?(File.basename(source_path))
|
32
|
+
|
33
|
+
rel_path = source_path.sub(/^#{Regexp.escape(src)}\/?/, '')
|
34
|
+
dest_path = File.join(dst, rel_path)
|
35
|
+
|
36
|
+
next if File.exist?(dest_path)
|
37
|
+
|
38
|
+
if File.directory?(source_path)
|
39
|
+
FileUtils.mkdir_p(dest_path, verbose: true)
|
40
|
+
else
|
41
|
+
$stdout.puts "add -> #{dest_path}"
|
42
|
+
FileUtils.cp(source_path, dest_path)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
|
28
48
|
def copy_folder( f_name)
|
29
49
|
$stdout.puts "Copy template: #{f_name}"
|
50
|
+
cp_r "#{__dir__}/project_template/#{f_name}/.", '.'
|
51
|
+
# FileUtils.cp_r "#{__dir__}/project_template/#{f_name}/.", '.', verbose: true
|
30
52
|
# system "cp -rv --update=none #{__dir__}/project_template/#{f_name}/. ."
|
31
|
-
system "rsync -av --ignore-existing --info=NAME,progress0,stats0 #{__dir__}/project_template/#{f_name}/ ./ | grep -v '^sending incremental file list$' | grep -v '/$' "
|
53
|
+
#system "rsync -av --ignore-existing --info=NAME,progress0,stats0 #{__dir__}/project_template/#{f_name}/ ./ | grep -v '^sending incremental file list$' | grep -v '/$' "
|
32
54
|
end
|
33
55
|
|
34
56
|
def update_service_name(s_name)
|
data/lib/version.rb
CHANGED