ssp 0.3.2 → 0.3.3
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/lib/ssp/application/pair.rb +12 -7
- data/lib/ssp/version.rb +1 -1
- metadata +4 -4
data/lib/ssp/application/pair.rb
CHANGED
@@ -25,27 +25,32 @@ class SSP::App::Pair < Thor
|
|
25
25
|
devs.each_with_index do |name, index|
|
26
26
|
say_status "#{index + 1}:", name, :cyan
|
27
27
|
end
|
28
|
+
say_status "g:", "Gumikacsa", :cyan
|
28
29
|
print "Enter the index of your pair or leave blank if not pairing: "
|
29
30
|
|
30
|
-
while (choice = File.new("/dev/tty").readline.chomp) !~ /\A\d
|
31
|
+
while (choice = File.new("/dev/tty").readline.chomp) !~ /\A\d*|[Gg]\Z/
|
31
32
|
say "Bad input `#{choice}'"
|
32
33
|
end
|
33
34
|
elsif pair =~ /^(|x|me|not)$/i
|
34
35
|
choice = ""
|
35
36
|
else
|
36
37
|
pair = pair.downcase
|
37
|
-
pair
|
38
|
-
|
39
|
-
|
38
|
+
if pair == "g"
|
39
|
+
choice = "g"
|
40
|
+
else
|
41
|
+
pair = devs.detect do |dev|
|
42
|
+
initial = dev.split(" ").map {|x| x[0..0]}.join.downcase
|
43
|
+
initial == pair or dev.downcase.split(" ").include?(pair)
|
44
|
+
end
|
45
|
+
raise Thor::Error, "No such pair" unless pair
|
46
|
+
choice = devs.index(pair) + 1
|
40
47
|
end
|
41
|
-
raise Thor::Error, "No such pair" unless pair
|
42
|
-
choice = devs.index(pair) + 1
|
43
48
|
end
|
44
49
|
|
45
50
|
commit_name, commit_email = if choice == ''
|
46
51
|
[me, my_email]
|
47
52
|
else
|
48
|
-
pair = devs[choice.to_i - 1]
|
53
|
+
pair = choice.downcase == "g" ? "Gumikacsa" : devs[choice.to_i - 1]
|
49
54
|
["#{me} & #{pair}", options[:pair_email].sub('@', initials(me, pair)+'@')]
|
50
55
|
end
|
51
56
|
|
data/lib/ssp/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ssp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- !binary |
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-
|
20
|
+
date: 2010-09-29 00:00:00 +02:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|