gitcopier 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/gitcopier.rb +3 -0
- data/lib/gitcopier/decisions.rb +2 -0
- data/lib/gitcopier/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a92ef8ec9c7b0d07b007b2c07bf8b75a6ea3f682
|
4
|
+
data.tar.gz: 7f4b3e003e6e2f3dd3bb858fe8e23ded95b641e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18deaeed1fc1f830dc5a35a39d21b71645aea2edb22b30ad506c1046734ea4b31a10af27f104b56220da30dfd0a3225a5add642f7b9778715338623e49a6b25b
|
7
|
+
data.tar.gz: ff1f1eb591af611519b516ac44b82f10d68d3c18bb0c238d187970a33247a568cbcd019e87fa3e66f8152b6bdc29c9862364dff6a3eb3df86edab7db7af78fe8
|
data/README.md
CHANGED
@@ -61,6 +61,7 @@ Usage: gitcopier [options]
|
|
61
61
|
### Working with git merge
|
62
62
|
After you `git pull` in external repository, `Gitcopier` will prompt your decision
|
63
63
|
where to copy the changed files.
|
64
|
+
![Gitcopier prompt](http://puu.sh/kSEKl/bcdf8898e6.gif)
|
64
65
|
|
65
66
|
## Contributing
|
66
67
|
|
data/lib/gitcopier.rb
CHANGED
@@ -30,8 +30,10 @@ module Gitcopier
|
|
30
30
|
|
31
31
|
def copy(source, des)
|
32
32
|
# source is a directory, copy its content
|
33
|
+
# TODO: create destination if it doesnt exist
|
33
34
|
if source.end_with? '/'
|
34
35
|
puts "Copy #{(source + '*').colorize(:green)} to #{des.colorize(:green)}."
|
36
|
+
FileUtils.mkdir_p(des)
|
35
37
|
FileUtils.cp_r(Dir["#{source}*"], des)
|
36
38
|
else # source is a file, copy it to destination
|
37
39
|
puts "Copy #{source.colorize(:green)} to #{des.colorize(:green)}."
|
@@ -54,6 +56,7 @@ module Gitcopier
|
|
54
56
|
end
|
55
57
|
|
56
58
|
def integrate_all_changes
|
59
|
+
STDIN.reopen('/dev/tty')
|
57
60
|
print_integration_info
|
58
61
|
dir_tree = DirTree.new(@root_path, changed_files)
|
59
62
|
dir_tree.travel do |changed_file|
|
data/lib/gitcopier/decisions.rb
CHANGED
@@ -34,6 +34,8 @@ module Gitcopier
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def prompt_decision(changed_file)
|
37
|
+
source_file = @source_root + changed_file
|
38
|
+
source_file << "*" if source_file[-1] == "/"
|
37
39
|
while true do
|
38
40
|
print "Where do you want to copy #{(@source_root + changed_file).colorize(:green)}? (type h for instruction): "
|
39
41
|
user_input = Readline.readline("", true).strip
|
data/lib/gitcopier/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitcopier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Tran
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -75,7 +75,7 @@ files:
|
|
75
75
|
- lib/gitcopier/decisions/decisions.json
|
76
76
|
- lib/gitcopier/dir_tree.rb
|
77
77
|
- lib/gitcopier/version.rb
|
78
|
-
homepage: https://github.com/tranvictor/
|
78
|
+
homepage: https://github.com/tranvictor/gitcopier
|
79
79
|
licenses:
|
80
80
|
- MIT
|
81
81
|
metadata: {}
|