easyoperate 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/easyoperate.rb +1 -1
  2. data/lib/eo/eo.rb +4 -3
  3. metadata +1 -1
data/lib/easyoperate.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  $LOAD_PATH << File.dirname(__FILE__)
2
2
 
3
3
  module Easyoperate
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
data/lib/eo/eo.rb CHANGED
@@ -19,7 +19,8 @@ class Eo
19
19
  loop do
20
20
  printf("\e[33mInput Commands (q to quit| h for help) : \e[0m")
21
21
  input = STDIN.gets.split(' ',2)
22
- input[1].strip!
22
+ input[1] ? input[1].strip! : next
23
+
23
24
  case input[0].to_s
24
25
  when /S/i then show(input[1])
25
26
  when /C/i then choose(input[1])
@@ -46,7 +47,7 @@ class Eo
46
47
  repos = pick(args,false)
47
48
  puts "\e[33mAll Repo match < #{args} > :\e[0m"
48
49
  repos.each_index do |x|
49
- printf "\e[32m %-15s\t\e[0m" % [repos[x].rstrip]
50
+ printf "\e[32m %-12s\t\e[0m" % [repos[x].rstrip]
50
51
  printf("\n") if (x+1)%4==0
51
52
  end
52
53
  puts "\n" if repos.size%4 != 0
@@ -108,7 +109,7 @@ class Eo
108
109
  puts "\e[33mPlease Choose One of them : \e[0m"
109
110
 
110
111
  args.each_index do |x|
111
- printf "\e[32m%-2d\e[0m %-15s\t" % [x+1,args[x].rstrip]
112
+ printf "\e[32m%-2d\e[0m %-12s\t" % [x+1,args[x].rstrip]
112
113
  printf "\n" if (x+1)%4 == 0
113
114
  end
114
115
  printf "\n" if args.size%4 != 0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easyoperate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jinzhu Zhang