gitcopier 0.1.8 → 0.1.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2cbcb2f87394cf7cc79d461bc6b676f116ae68d9
4
- data.tar.gz: e1151f86602623493d31335579f901b6f3703d2e
3
+ metadata.gz: a92ef8ec9c7b0d07b007b2c07bf8b75a6ea3f682
4
+ data.tar.gz: 7f4b3e003e6e2f3dd3bb858fe8e23ded95b641e7
5
5
  SHA512:
6
- metadata.gz: 2b34598a704fd962224dc9e0c70bc4f25761def16da1a2440d59205193269273bc687ae9fed7d79dcf82ada762d946fafdcd2ab877ace99d3c8349d43c5cd7ab
7
- data.tar.gz: d8055374880087eb46d633f7f5d335efa30552e5271e3ab7604f14f86ee7988fa13c2e8a20081bc153e8184193291264e993cdb92aa7e43b2530bb3d1254d748
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|
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Gitcopier
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
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.8
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-21 00:00:00.000000000 Z
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/integrator
78
+ homepage: https://github.com/tranvictor/gitcopier
79
79
  licenses:
80
80
  - MIT
81
81
  metadata: {}