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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3c87ea6b9bb456e1c23566bfc7d96a60aa9eeb7e91afddb1ab0d0c4c3fff580
4
- data.tar.gz: b951e528a996d723877fca73999ffde0b59c09284bab9e488c73e4fb558e94a7
3
+ metadata.gz: b9f8fbcc12ad4ef1389aa39318a71543a190a2d984efea6d7cbcf1dc5622c316
4
+ data.tar.gz: dd187853373264f44bc376cf6b3de0e06b9f2b89a177be87558794e197adedc8
5
5
  SHA512:
6
- metadata.gz: cd6a7b9c91d7c99907b1973bf7a281f294ab8923a67bf1e1a012367d1a143a5dadbf750e256cfea4b459c9e12f772d70282a5970efe999da600478071e08b050
7
- data.tar.gz: 2a3a672ad7d3ef335d44054c744c9db45cd669675f553e82b35f07f1738284742f83ee1c5828265db82f2a0aa6a1cf300e7500720ca6e455daf62ec10924c7cd
6
+ metadata.gz: 1d996671bf0d31ca7a21166a65b28026e412b47bba7522973b8115b4611adcebb5a72eb0be57ca6ed106fc741dd569ca8c103d2c15348f6f02d4c5174726a9fa
7
+ data.tar.gz: 905e0701d375f91a021becdfe24be42b9eff2a180824583703472567328c428730ccc5f77db33fd948e87f2eef411ac9ccbd58b4d616d044b75ea0baee58b842
data/bin/checkout CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require_relative '../lib/checkout.rb'
4
- Checkout::Runner.new(ARGV[0]).run!
4
+ Checkout::Runner.new(ARGV[0])
@@ -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
- if max.nil?
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 ''
@@ -1,3 +1,3 @@
1
1
  module Checkout
2
- VERSION = '0.0.3'.freeze
2
+ VERSION = '0.0.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Lerner