shellutils 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -112,6 +112,7 @@ module ShellUtils
112
112
  def exec_cmd_and_clear_password(cmd)
113
113
  puts cmd
114
114
  PTY.spawn(cmd) do |r, w|
115
+ w.flush
115
116
  w.sync = true
116
117
  w.flush
117
118
  if r.expect(/[Pp]assword.*:.*$/)
@@ -119,16 +120,18 @@ module ShellUtils
119
120
  w.puts(get_sudo_pwd)
120
121
  w.flush
121
122
  begin
123
+ w.flush
122
124
  if r.expect(/[Pp]assword.*:.*$/)
123
125
  error("the sudo password is incorrect. password=#{get_sudo_pwd}\nPlease change the password ex) set_sudo_pwd PASSWORD")
124
126
  end
125
127
  rescue
126
128
  end
127
129
  end
130
+ w.flush
128
131
  puts "-> ok"
129
- w.flush
130
- begin
131
- puts r.read
132
+ w.flush
133
+ begin
134
+ puts r.read
132
135
  rescue Errno::EIO # GNU/Linux raises EIO.
133
136
  end
134
137
  end
@@ -1,3 +1,3 @@
1
1
  module Shellutils
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shellutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-17 00:00:00.000000000Z
12
+ date: 2012-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &70202562527320 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70202562527320
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: rspec
27
- requirement: &70202562526900 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,7 +37,12 @@ dependencies:
32
37
  version: '0'
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *70202562526900
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  description: Shell utils
37
47
  email:
38
48
  - kyamada@sonix.asia
@@ -72,11 +82,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
82
  version: '0'
73
83
  requirements: []
74
84
  rubyforge_project:
75
- rubygems_version: 1.8.6
85
+ rubygems_version: 1.8.24
76
86
  signing_key:
77
87
  specification_version: 3
78
88
  summary: Shell utils
79
89
  test_files:
80
90
  - spec/shellutils_spec.rb
81
91
  - spec/spec_helper.rb
82
- has_rdoc: