hitch 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +6 -6
- data/hitch.gemspec +2 -1
- data/lib/hitch.rb +3 -5
- data/lib/hitch/ui.rb +1 -1
- data/spec/acceptance/hitch_spec.rb +29 -0
- metadata +12 -16
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ce5be922beeb7f8383826fdb6322b673078399c6
|
4
|
+
data.tar.gz: f2c9837dd625d5b772182bb1d2076ddd5b1303dc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 268ed05c2a6532a2585cd43b9edee9f6ecf9ab28d388217f4de51d690d52a2ea6c40fc0479617f814b7a461564ea0d9808b95e103107fc0b3610fc072cf29480
|
7
|
+
data.tar.gz: eb1247f110ae0a90a99761a878ff7afeef6bae22e18f10d33cc4bc670491aa1522901a0e88bf3d34e81c8de195a5cc542f878fad60a7aa21a7fad7744f0e6434
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -3,13 +3,13 @@ GEM
|
|
3
3
|
specs:
|
4
4
|
coderay (1.0.9)
|
5
5
|
diff-lcs (1.1.3)
|
6
|
-
highline (1.6.
|
7
|
-
method_source (0.8.
|
8
|
-
pry (0.9.12.
|
6
|
+
highline (1.6.20)
|
7
|
+
method_source (0.8.2)
|
8
|
+
pry (0.9.12.2)
|
9
9
|
coderay (~> 1.0.5)
|
10
10
|
method_source (~> 0.8)
|
11
11
|
slop (~> 3.4)
|
12
|
-
rake (
|
12
|
+
rake (10.1.0)
|
13
13
|
rspec (2.6.0)
|
14
14
|
rspec-core (~> 2.6.0)
|
15
15
|
rspec-expectations (~> 2.6.0)
|
@@ -18,13 +18,13 @@ GEM
|
|
18
18
|
rspec-expectations (2.6.0)
|
19
19
|
diff-lcs (~> 1.1.2)
|
20
20
|
rspec-mocks (2.6.0)
|
21
|
-
slop (3.4.
|
21
|
+
slop (3.4.6)
|
22
22
|
|
23
23
|
PLATFORMS
|
24
24
|
ruby
|
25
25
|
|
26
26
|
DEPENDENCIES
|
27
|
-
highline (
|
27
|
+
highline (~> 1.6.2)
|
28
28
|
pry
|
29
29
|
rake
|
30
30
|
rspec (~> 2.6.0)
|
data/hitch.gemspec
CHANGED
@@ -5,7 +5,7 @@ Gem::Specification.new do |s|
|
|
5
5
|
s.rubygems_version = '1.3.5'
|
6
6
|
|
7
7
|
s.name = %q{hitch}
|
8
|
-
s.version = '1.0.
|
8
|
+
s.version = '1.0.2'
|
9
9
|
s.date = Time.now.strftime('%F')
|
10
10
|
|
11
11
|
s.description = %q{Git author attribution helper for pair programmers.}
|
@@ -49,6 +49,7 @@ Gem::Specification.new do |s|
|
|
49
49
|
lib/hitch/author.rb
|
50
50
|
lib/hitch/hitch.sh
|
51
51
|
lib/hitch/ui.rb
|
52
|
+
spec/acceptance/hitch_spec.rb
|
52
53
|
spec/hitch/author_spec.rb
|
53
54
|
spec/hitch/ui_spec.rb
|
54
55
|
spec/hitch_spec.rb
|
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.2'
|
10
10
|
|
11
11
|
def self.print_info
|
12
12
|
if Hitch.pairing? && STDOUT.tty?
|
@@ -67,10 +67,8 @@ module Hitch
|
|
67
67
|
def self.git_author_name
|
68
68
|
devs = current_pair.sort.map {|pair| Hitch::Author.find(pair)}
|
69
69
|
case devs.length
|
70
|
-
when 1
|
71
|
-
devs
|
72
|
-
when 2
|
73
|
-
"#{devs[0]} and #{devs[1]}"
|
70
|
+
when 1, 2
|
71
|
+
devs.join(" and ")
|
74
72
|
else
|
75
73
|
"#{devs[0...-1].join(', ')}, and #{devs[-1]}"
|
76
74
|
end
|
data/lib/hitch/ui.rb
CHANGED
@@ -7,7 +7,7 @@ module Hitch
|
|
7
7
|
Hitch.group_email = highline.ask("What is the group email? e.g. dev@hashrocket.com will become dev+therubymug+leshill@hashrocket.com") do |q|
|
8
8
|
q.case = :down
|
9
9
|
q.validate = /\A[a-zA-Z0-9_\.\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+\z/
|
10
|
-
end
|
10
|
+
end.to_s
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.prompt_for_pair(new_author)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'stringio'
|
3
|
+
|
4
|
+
describe Hitch do
|
5
|
+
describe 'configuration file' do
|
6
|
+
let(:hitchrc){ Tempfile.new('hitchrc') }
|
7
|
+
|
8
|
+
before do
|
9
|
+
described_class.stub(:hitchrc => hitchrc.path)
|
10
|
+
end
|
11
|
+
|
12
|
+
def with_custom_input_io(io)
|
13
|
+
old_stdin = $stdin
|
14
|
+
$stdin = io
|
15
|
+
yield
|
16
|
+
ensure
|
17
|
+
$stdin = old_stdin
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'contains the group email address' do
|
21
|
+
email = StringIO.new('test@example.com')
|
22
|
+
with_custom_input_io(email) do
|
23
|
+
described_class.group_email
|
24
|
+
end
|
25
|
+
|
26
|
+
hitchrc.read.should include(email.string)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,46 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hitch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Rogelio J. Samour
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-11-18 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rspec
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 2.6.0
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 2.6.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: highline
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: 1.6.2
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: 1.6.2
|
46
41
|
description: Git author attribution helper for pair programmers.
|
@@ -64,37 +59,38 @@ files:
|
|
64
59
|
- lib/hitch/author.rb
|
65
60
|
- lib/hitch/hitch.sh
|
66
61
|
- lib/hitch/ui.rb
|
62
|
+
- spec/acceptance/hitch_spec.rb
|
67
63
|
- spec/hitch/author_spec.rb
|
68
64
|
- spec/hitch/ui_spec.rb
|
69
65
|
- spec/hitch_spec.rb
|
70
66
|
- spec/spec_helper.rb
|
71
67
|
homepage: http://github.com/therubymug/hitch
|
72
68
|
licenses: []
|
69
|
+
metadata: {}
|
73
70
|
post_install_message:
|
74
71
|
rdoc_options:
|
75
72
|
- --charset=UTF-8
|
76
73
|
require_paths:
|
77
74
|
- lib
|
78
75
|
required_ruby_version: !ruby/object:Gem::Requirement
|
79
|
-
none: false
|
80
76
|
requirements:
|
81
|
-
- -
|
77
|
+
- - '>='
|
82
78
|
- !ruby/object:Gem::Version
|
83
79
|
version: '0'
|
84
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
-
none: false
|
86
81
|
requirements:
|
87
|
-
- -
|
82
|
+
- - '>='
|
88
83
|
- !ruby/object:Gem::Version
|
89
84
|
version: '0'
|
90
85
|
requirements: []
|
91
86
|
rubyforge_project:
|
92
|
-
rubygems_version:
|
87
|
+
rubygems_version: 2.0.5
|
93
88
|
signing_key:
|
94
89
|
specification_version: 3
|
95
90
|
summary: Hitch allows developers to be properly credited when Pair Programming and
|
96
91
|
using Git.
|
97
92
|
test_files:
|
93
|
+
- spec/acceptance/hitch_spec.rb
|
98
94
|
- spec/hitch/author_spec.rb
|
99
95
|
- spec/hitch/ui_spec.rb
|
100
96
|
- spec/hitch_spec.rb
|