hitch 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/hitch.gemspec +1 -1
- data/lib/hitch.rb +2 -2
- data/spec/hitch_spec.rb +15 -3
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 721084c4633f44e81525934e2735712a2fceec8c
|
4
|
+
data.tar.gz: 051501fead1542702313d084357f11e0772713c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 551fdf140bea3acd13681fcb2821932bebfe1b784b9b869b4c6adf4fc4b1984a2d7c0d02795a3e2ae83102dc7f817a385846a13dca69de1db2df1f3c1242b117
|
7
|
+
data.tar.gz: cde32aaf43b1471c7692d9e3a88f1852e4e092da01044480f8bdc9c6425fb49974baf5ab6e054091115d5adf9360fe35bbb2de4f967e94088ce59dbf0dd788a2
|
data/README.md
CHANGED
@@ -35,6 +35,8 @@ Install:
|
|
35
35
|
* gem install hitch
|
36
36
|
* rvm users run this:
|
37
37
|
<pre><code>for x in $(rvm list strings); do rvm use $x@global && gem install hitch; done</code></pre>
|
38
|
+
* rbenv users run this:
|
39
|
+
<pre><code>for x in $(rbenv versions | cut -c 3- | awk '{print $1}'); do rbenv shell $x && gem install hitch; done</code></pre>
|
38
40
|
* hitch --setup >> ~/.bashrc
|
39
41
|
- this prints out the necessary shell function and aliases you need to add to your ~/.bashrc or ~/.zshrc
|
40
42
|
* Or copy/paste [the code](lib/hitch/hitch.sh) into your ~/.bashrc or ~/.zshrc
|
data/hitch.gemspec
CHANGED
data/lib/hitch.rb
CHANGED
@@ -6,7 +6,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), %w[.. lib hitch ui]))
|
|
6
6
|
|
7
7
|
module Hitch
|
8
8
|
|
9
|
-
VERSION = '1.0.
|
9
|
+
VERSION = '1.0.3'
|
10
10
|
|
11
11
|
def self.print_info
|
12
12
|
if Hitch.pairing? && STDOUT.tty?
|
@@ -31,7 +31,7 @@ module Hitch
|
|
31
31
|
|
32
32
|
def self.author_command
|
33
33
|
if Hitch.pairing?
|
34
|
-
|
34
|
+
%Q{export GIT_AUTHOR_NAME="#{Hitch.git_author_name}" GIT_AUTHOR_EMAIL="#{Hitch.git_author_email}"}
|
35
35
|
else
|
36
36
|
"unset GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL"
|
37
37
|
end
|
data/spec/hitch_spec.rb
CHANGED
@@ -2,7 +2,14 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Hitch do
|
4
4
|
|
5
|
-
let(:hitch_pairs)
|
5
|
+
let(:hitch_pairs) do
|
6
|
+
{
|
7
|
+
"conan" => "Conan O'Brien",
|
8
|
+
"fry" => "Philip J. Fry",
|
9
|
+
"leela" => "Turanga Leela",
|
10
|
+
"zoidberg" => "John A. Zoidberg"
|
11
|
+
}
|
12
|
+
end
|
6
13
|
|
7
14
|
let(:hitch_config) do
|
8
15
|
{ :group_email => 'dev@hashrocket.com',
|
@@ -47,7 +54,7 @@ describe Hitch do
|
|
47
54
|
context 'when pairing' do
|
48
55
|
it 'returns the export shell command for GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL' do
|
49
56
|
Hitch.current_pair = ['leela', 'fry']
|
50
|
-
Hitch.author_command.should ==
|
57
|
+
Hitch.author_command.should == %q{export GIT_AUTHOR_NAME="Philip J. Fry and Turanga Leela" GIT_AUTHOR_EMAIL="dev+fry+leela@hashrocket.com"}
|
51
58
|
end
|
52
59
|
end
|
53
60
|
|
@@ -61,10 +68,15 @@ describe Hitch do
|
|
61
68
|
context 'with more than 2 developers' do
|
62
69
|
it "joins 3+ developers together with commas and an 'and'" do
|
63
70
|
Hitch.current_pair = ['leela', 'fry', 'zoidberg']
|
64
|
-
Hitch.author_command.should ==
|
71
|
+
Hitch.author_command.should == %q{export GIT_AUTHOR_NAME="Philip J. Fry, Turanga Leela, and John A. Zoidberg" GIT_AUTHOR_EMAIL="dev+fry+leela+zoidberg@hashrocket.com"}
|
65
72
|
end
|
66
73
|
end
|
67
74
|
|
75
|
+
it 'escapes special characters' do
|
76
|
+
Hitch.current_pair = ["conan", "fry"]
|
77
|
+
Hitch.author_command.should == %q{export GIT_AUTHOR_NAME="Conan O'Brien and Philip J. Fry" GIT_AUTHOR_EMAIL="dev+conan+fry@hashrocket.com"}
|
78
|
+
end
|
79
|
+
|
68
80
|
end
|
69
81
|
|
70
82
|
describe '.unhitch' do
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hitch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rogelio J. Samour
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 2.6.0
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 2.6.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: highline
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.6.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.6.2
|
41
41
|
description: Git author attribution helper for pair programmers.
|
@@ -69,22 +69,22 @@ licenses: []
|
|
69
69
|
metadata: {}
|
70
70
|
post_install_message:
|
71
71
|
rdoc_options:
|
72
|
-
- --charset=UTF-8
|
72
|
+
- "--charset=UTF-8"
|
73
73
|
require_paths:
|
74
74
|
- lib
|
75
75
|
required_ruby_version: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
|
-
- -
|
77
|
+
- - ">="
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '0'
|
80
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
|
-
- -
|
82
|
+
- - ">="
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: '0'
|
85
85
|
requirements: []
|
86
86
|
rubyforge_project:
|
87
|
-
rubygems_version: 2.
|
87
|
+
rubygems_version: 2.4.5
|
88
88
|
signing_key:
|
89
89
|
specification_version: 3
|
90
90
|
summary: Hitch allows developers to be properly credited when Pair Programming and
|
@@ -95,3 +95,4 @@ test_files:
|
|
95
95
|
- spec/hitch/ui_spec.rb
|
96
96
|
- spec/hitch_spec.rb
|
97
97
|
- spec/spec_helper.rb
|
98
|
+
has_rdoc:
|