git_repo_upgrader 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/git_repo_upgrader.rb +3 -1
- data/lib/git_repo_upgrader/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: 6dc30508c2560223be1a5e778a2e89b4c85a392389006fb12568fea28649c853
|
4
|
+
data.tar.gz: 25e5520bd62ae4d477a9e47d7fa1f7157b72053386a0cd8aa165cb350096d16e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf2d26c5199607e71d6a7d73e17aabc4b06ef4a2d22911942c9b66e53cc6927d0a23470b24d987d49c86642114277321fa32d1cb867618019c548d3a7c90e899
|
7
|
+
data.tar.gz: e2799174277e2ff287bea48274ed671924301efbd16afa074522d44c1bc0facda1313698b3a7b83e721cc47c916aac81820fdc0bbdf3730e4ce9e9ecad3368b4
|
data/lib/git_repo_upgrader.rb
CHANGED
@@ -87,7 +87,9 @@ module GitRepoUpgrader
|
|
87
87
|
final_dest = PROJECT_DIR + '/' + dest
|
88
88
|
# remove last folder from path, because FileUtils.cp_r creates the last folder in dest implicitly
|
89
89
|
final_dest = final_dest[0...-1] if final_dest.end_with? '/' # cut / at the end if available
|
90
|
-
|
90
|
+
if (File.basename(source) == File.basename(dest))
|
91
|
+
final_dest = Pathname(final_dest).dirname.to_s # cut last folder if identical names are used to avoid duplicates
|
92
|
+
end
|
91
93
|
FileUtils.cp_r(repo_dir + '/' + source, final_dest)
|
92
94
|
end
|
93
95
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_repo_upgrader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthäus J. N. Beyrle
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|