scutil 0.1.1 → 0.1.2

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.
Files changed (5) hide show
  1. data/CHANGELOG +11 -0
  2. data/README +1 -0
  3. data/THANKS +8 -0
  4. data/lib/scutil.rb +6 -6
  5. metadata +9 -5
data/CHANGELOG ADDED
@@ -0,0 +1,11 @@
1
+
2
+ ===Changelog
3
+
4
+ ===0.1.2 | 2011-09-18
5
+
6
+ * Option :scutil_force_pty will now force _not_ requesting a PTY as
7
+ well.
8
+
9
+ ===0.1.1 | 2011-09-17
10
+
11
+ * Initial public release.
data/README CHANGED
@@ -1,5 +1,6 @@
1
1
 
2
2
  =scutil
3
+
3
4
  ==Description:
4
5
 
5
6
  Scutil <em>(pronounced "scuttle")</em> is a small Ruby library that
data/THANKS ADDED
@@ -0,0 +1,8 @@
1
+
2
+ ===Thanks
3
+
4
+ * Kevin McAllister <kevin@mcallister.com> for the name and much
5
+ feedback and discussion.
6
+
7
+ * Jamis Buck <jamis@37signals.com> for writing Net::SSH, on which
8
+ scutil is built.
data/lib/scutil.rb CHANGED
@@ -73,7 +73,7 @@ module Scutil
73
73
 
74
74
  # By default, buffer 10M of data before writing.
75
75
  DEFAULT_BUFFER_SIZE = 0xA00000
76
- SCUTIL_VERSION = '0.1'
76
+ SCUTIL_VERSION = '0.1.2'
77
77
  @connection_cache = ConnectionCache.new
78
78
  @buffer_size = DEFAULT_BUFFER_SIZE
79
79
 
@@ -157,7 +157,7 @@ module Scutil
157
157
  # { :scutil_force_pty => true,
158
158
  # :scutil_verbose => true
159
159
  # })
160
-
160
+ #
161
161
  class Exec
162
162
  include Scutil
163
163
  attr_reader :hostname,:username
@@ -220,14 +220,14 @@ module Scutil
220
220
  #
221
221
  # retval = Scutil.exec_command('hostname', 'username', '/bin/true')
222
222
  # puts "True is false!" if retval != 0
223
-
223
+ #
224
224
  def exec_command(hostname, username, cmd, output=nil, options={})
225
225
  # Do we need a PTY?
226
226
  # TODO: Add a callback to specify custom pty determinate function.
227
- if (options[:scutil_force_pty])
228
- pty_needed = true
229
- else
227
+ if (options[:scutil_force_pty].nil?)
230
228
  pty_needed = (cmd =~ /^\s*sudo/) ? true : false
229
+ else
230
+ pty_needed = options[:scutil_force_pty] ? true : false
231
231
  end
232
232
 
233
233
  # Check for an existing connection in the cache based on the hostname. If the
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scutil
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Marc Soda
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-17 00:00:00 -04:00
18
+ date: 2011-09-18 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -42,11 +42,15 @@ extensions: []
42
42
 
43
43
  extra_rdoc_files:
44
44
  - README
45
+ - THANKS
46
+ - CHANGELOG
45
47
  files:
46
48
  - lib/scutil.rb
47
49
  - README
50
+ - THANKS
51
+ - CHANGELOG
48
52
  has_rdoc: true
49
- homepage: http://scutil.github.com
53
+ homepage: http://marcantonio.github.com/scutil
50
54
  licenses:
51
55
  - MIT
52
56
  post_install_message: