git-friendly 0.0.1 → 0.0.2

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.
data/README CHANGED
@@ -25,7 +25,7 @@ branch_name is optional. If you omit it, git-publish will assume you want to pub
25
25
 
26
26
  Here's what'll happen next:
27
27
  $ git publish remote_name [branch_name]
28
- >> Publish branch bug_fix/utf8_sphinx to jaw6 ? [Y/n]
28
+ >> Publish branch branch_name to remote_name ? [Y/n]
29
29
 
30
30
  If you hit enter, or y, or Y, or anything that isn't the letter n (n stands for "no"), then it'll go
31
31
  ahead and do this:
@@ -71,6 +71,8 @@ And then this will happen in the background:
71
71
 
72
72
  Do keep in mind
73
73
  ---------------
74
+ git-friendly is inspired by the fantastic git_remote_branch gem.
75
+
74
76
  If you like working with remote branches so much, you should also check out Aanand Prasad's fantastic
75
77
  git-up (https://github.com/aanand/git-up), which honestly has inspired quite a bit of what git-friendly
76
78
  is trying to do.
data/bin/git-follow CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/local/bin/ruby
2
2
 
3
+ require 'readline'
3
4
  require 'rubygems'
4
5
  require 'colored' rescue nil
5
6
 
@@ -55,14 +56,12 @@ end
55
56
 
56
57
  def get_remote_and_branch_from_user
57
58
  remote_name, branch_name = remote_and_branch(ARGV[0])
58
- print question1(branch_name, remote_name)
59
- answer = STDIN.gets.strip
59
+ answer = Readline.readline(question1(branch_name, remote_name)).strip
60
60
  answer.empty? ? [remote_name, branch_name] : remote_and_branch(answer)
61
61
  end
62
62
 
63
63
  def get_local_branch_name_from_user(branch_name)
64
- print question2(branch_name)
65
- answer = STDIN.gets.strip
64
+ answer = Readline.readline(question2(branch_name)).strip
66
65
  answer.empty? ? branch_name : answer
67
66
  end
68
67
 
data/bin/git-publish CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/local/bin/ruby
2
2
 
3
+ require 'readline'
3
4
  require 'rubygems'
4
5
  colored = require 'colored' rescue nil
5
6
 
@@ -33,11 +34,11 @@ def question(branch_name, remote_name, color=false)
33
34
  else
34
35
  msg = ">> Publish branch #{branch_name} to #{remote_name}? [Y/n] "
35
36
  end
36
- msg
37
+ answer = Readline.readline(msg).strip
37
38
  end
38
39
 
39
- print question(branch_name, remote_name, colored)
40
- if STDIN.gets != "n\n"
40
+ answer = question(branch_name, remote_name, colored)
41
+ unless answer.downcase == 'n'
41
42
  commands = []
42
43
  commands << push_to_remote = "git push #{remote_name} #{branch_name}:refs/heads/#{branch_name}"
43
44
  commands << fetch = "git fetch #{remote_name}"
data/lib/git-friendly.rb CHANGED
@@ -2,5 +2,5 @@ require 'colored'
2
2
  require 'grit'
3
3
 
4
4
  class GitFriendly
5
- VERSION = "0.0.1"
5
+ VERSION = "0.0.2"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-friendly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-05 00:00:00.000000000Z
12
+ date: 2011-10-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colored
16
- requirement: &2157432420 !ruby/object:Gem::Requirement
16
+ requirement: &2157352960 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '1.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2157432420
24
+ version_requirements: *2157352960
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: grit
27
- requirement: &2157431360 !ruby/object:Gem::Requirement
27
+ requirement: &2157352260 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2157431360
35
+ version_requirements: *2157352260
36
36
  description: GitFriendly currently contains two commands that make working with remote
37
37
  branches easier in git.
38
38
  email:
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  version: '0'
70
70
  requirements: []
71
71
  rubyforge_project:
72
- rubygems_version: 1.8.7
72
+ rubygems_version: 1.8.10
73
73
  signing_key:
74
74
  specification_version: 3
75
75
  summary: git commands to make tracking and publishing remote branches easier for everyone