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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0345825f5246e6d66a553508642ddf7251d9a4f07fdf9033169ed3474aba3072'
4
- data.tar.gz: 2becbc7c0a41fd47307a6b4ab7c1577a04f9474e9c50e826288443ef10536e6d
3
+ metadata.gz: 6dc30508c2560223be1a5e778a2e89b4c85a392389006fb12568fea28649c853
4
+ data.tar.gz: 25e5520bd62ae4d477a9e47d7fa1f7157b72053386a0cd8aa165cb350096d16e
5
5
  SHA512:
6
- metadata.gz: 4a326537cc36bb640805db961d557b1b083a96680b71ac41af28447806d6c8f4f7c82e561c16fccbc6bfcacd8d10e8a5e124d51cd8cb0996c31ae4c02506d294
7
- data.tar.gz: 88f84cfe06bf259b18ca45f501368f7766035cb592a994eafb18a00675bf632944c6ed3e09dd7a211fc6296d8361e95c36cb2672e41df616f9ef5cc1676e9605
6
+ metadata.gz: bf2d26c5199607e71d6a7d73e17aabc4b06ef4a2d22911942c9b66e53cc6927d0a23470b24d987d49c86642114277321fa32d1cb867618019c548d3a7c90e899
7
+ data.tar.gz: e2799174277e2ff287bea48274ed671924301efbd16afa074522d44c1bc0facda1313698b3a7b83e721cc47c916aac81820fdc0bbdf3730e4ce9e9ecad3368b4
@@ -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
- final_dest = Pathname(final_dest).dirname.to_s # cut last folder
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
@@ -1,3 +1,3 @@
1
1
  module GitRepoUpgrader
2
- VERSION = '0.0.4'.freeze
2
+ VERSION = '0.0.5'.freeze
3
3
  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
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-09-24 00:00:00.000000000 Z
11
+ date: 2020-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize