checkout 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/checkout +1 -1
- data/lib/checkout/runner.rb +9 -5
- data/lib/checkout/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9f8fbcc12ad4ef1389aa39318a71543a190a2d984efea6d7cbcf1dc5622c316
|
4
|
+
data.tar.gz: dd187853373264f44bc376cf6b3de0e06b9f2b89a177be87558794e197adedc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d996671bf0d31ca7a21166a65b28026e412b47bba7522973b8115b4611adcebb5a72eb0be57ca6ed106fc741dd569ca8c103d2c15348f6f02d4c5174726a9fa
|
7
|
+
data.tar.gz: 905e0701d375f91a021becdfe24be42b9eff2a180824583703472567328c428730ccc5f77db33fd948e87f2eef411ac9ccbd58b4d616d044b75ea0baee58b842
|
data/bin/checkout
CHANGED
data/lib/checkout/runner.rb
CHANGED
@@ -5,11 +5,7 @@ module Checkout
|
|
5
5
|
attr_accessor :max, :branches, :branch_choice_object, :selection, :branch
|
6
6
|
|
7
7
|
def initialize(max)
|
8
|
-
|
9
|
-
@max ||= 10
|
10
|
-
else
|
11
|
-
@max ||= max.to_i
|
12
|
-
end
|
8
|
+
get_max(max)
|
13
9
|
run!
|
14
10
|
end
|
15
11
|
|
@@ -21,6 +17,14 @@ module Checkout
|
|
21
17
|
|
22
18
|
private
|
23
19
|
|
20
|
+
def get_max(val)
|
21
|
+
if val.nil?
|
22
|
+
@max ||= 10
|
23
|
+
else
|
24
|
+
@max = val
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
24
28
|
def ask_for_selection
|
25
29
|
puts 'Choose a branch...'
|
26
30
|
puts ''
|
data/lib/checkout/version.rb
CHANGED