shexy 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/CHANGELOG.md +9 -0
  2. data/lib/shexy.rb +10 -2
  3. metadata +40 -40
@@ -1,3 +1,12 @@
1
+ # 0.3.3
2
+
3
+ * Always request_pty by default
4
+
5
+ http://net-ssh.github.com/net-ssh/classes/Net/SSH/Connection/Channel.html#method-i-request_pty
6
+
7
+ Useful to be able to use sudo when requiretty is enabled in /etc/sudoers
8
+ without having to Shexy.use_sudo
9
+
1
10
  # 0.3.2
2
11
 
3
12
  * Fix Shexy.wait_for_ssh
@@ -33,7 +33,7 @@ require 'net/scp'
33
33
 
34
34
  module Shexy
35
35
 
36
- VERSION = '0.3.2'
36
+ VERSION = '0.3.3'
37
37
 
38
38
  [:user, :password, :key, :cmd, :host].each do |n|
39
39
  instance_eval %{
@@ -93,8 +93,16 @@ module Shexy
93
93
  self.flags[:keys] = [self.key] if self.key
94
94
  Net::SSH.start(self.host, self.user, self.flags) do |sh|
95
95
  sh.open_channel do |ch|
96
+ #
97
+ # Note, too, that when a pty is requested, user's shell configuration
98
+ # scripts (.bashrc and such) are not run by default,
99
+ # whereas they are run when a pty is not present.
100
+ #
101
+ # http://net-ssh.github.com/net-ssh/classes/Net/SSH/Connection/Channel.html#method-i-request_pty
102
+ #
103
+ # FIXME: may not be successful, warn about it
104
+ ch.request_pty
96
105
  if sudo?
97
- ch.request_pty
98
106
  if cmd =~ /(&&|\|\||&|\|)/
99
107
  self.cmd = cmd.gsub(/(&&|\|\||&|\|)/, $1 + 'sudo')
100
108
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shexy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,120 +9,120 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-16 00:00:00.000000000 Z
12
+ date: 2012-12-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: net-ssh
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
20
  none: false
21
+ version_requirements: !ruby/object:Gem::Requirement
26
22
  requirements:
27
23
  - - ! '>='
28
24
  - !ruby/object:Gem::Version
29
25
  version: '0'
26
+ none: false
27
+ name: net-ssh
28
+ prerelease: false
29
+ type: :runtime
30
30
  - !ruby/object:Gem::Dependency
31
- name: net-scp
32
31
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
32
  requirements:
35
33
  - - ! '>='
36
34
  - !ruby/object:Gem::Version
37
35
  version: '0'
38
- type: :runtime
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
36
  none: false
37
+ version_requirements: !ruby/object:Gem::Requirement
42
38
  requirements:
43
39
  - - ! '>='
44
40
  - !ruby/object:Gem::Version
45
41
  version: '0'
42
+ none: false
43
+ name: net-scp
44
+ prerelease: false
45
+ type: :runtime
46
46
  - !ruby/object:Gem::Dependency
47
- name: shoulda
48
47
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
48
  requirements:
51
49
  - - ! '>='
52
50
  - !ruby/object:Gem::Version
53
51
  version: '0'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
52
  none: false
53
+ version_requirements: !ruby/object:Gem::Requirement
58
54
  requirements:
59
55
  - - ! '>='
60
56
  - !ruby/object:Gem::Version
61
57
  version: '0'
58
+ none: false
59
+ name: shoulda
60
+ prerelease: false
61
+ type: :development
62
62
  - !ruby/object:Gem::Dependency
63
- name: rdoc
64
63
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
64
  requirements:
67
65
  - - ! '>='
68
66
  - !ruby/object:Gem::Version
69
67
  version: '3.12'
70
- type: :development
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
68
  none: false
69
+ version_requirements: !ruby/object:Gem::Requirement
74
70
  requirements:
75
71
  - - ! '>='
76
72
  - !ruby/object:Gem::Version
77
73
  version: '3.12'
74
+ none: false
75
+ name: rdoc
76
+ prerelease: false
77
+ type: :development
78
78
  - !ruby/object:Gem::Dependency
79
- name: bundler
80
79
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
80
  requirements:
83
81
  - - ! '>='
84
82
  - !ruby/object:Gem::Version
85
83
  version: 1.0.0
86
- type: :development
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
84
  none: false
85
+ version_requirements: !ruby/object:Gem::Requirement
90
86
  requirements:
91
87
  - - ! '>='
92
88
  - !ruby/object:Gem::Version
93
89
  version: 1.0.0
90
+ none: false
91
+ name: bundler
92
+ prerelease: false
93
+ type: :development
94
94
  - !ruby/object:Gem::Dependency
95
- name: jeweler
96
95
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
96
  requirements:
99
97
  - - ! '>='
100
98
  - !ruby/object:Gem::Version
101
99
  version: 1.8.4
102
- type: :development
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
100
  none: false
101
+ version_requirements: !ruby/object:Gem::Requirement
106
102
  requirements:
107
103
  - - ! '>='
108
104
  - !ruby/object:Gem::Version
109
105
  version: 1.8.4
106
+ none: false
107
+ name: jeweler
108
+ prerelease: false
109
+ type: :development
110
110
  - !ruby/object:Gem::Dependency
111
- name: simplecov
112
111
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
112
  requirements:
115
113
  - - ! '>='
116
114
  - !ruby/object:Gem::Version
117
115
  version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
116
  none: false
117
+ version_requirements: !ruby/object:Gem::Requirement
122
118
  requirements:
123
119
  - - ! '>='
124
120
  - !ruby/object:Gem::Version
125
121
  version: '0'
122
+ none: false
123
+ name: simplecov
124
+ prerelease: false
125
+ type: :development
126
126
  description: ! '[extremely] thin wrapper around net-ssh and net-scp'
127
127
  email: rubiojr@frameos.org
128
128
  executables: []
@@ -147,20 +147,20 @@ rdoc_options: []
147
147
  require_paths:
148
148
  - lib
149
149
  required_ruby_version: !ruby/object:Gem::Requirement
150
- none: false
151
150
  requirements:
152
151
  - - ! '>='
153
152
  - !ruby/object:Gem::Version
153
+ hash: 2272871698138737244
154
154
  version: '0'
155
155
  segments:
156
156
  - 0
157
- hash: -3031077169156747780
158
- required_rubygems_version: !ruby/object:Gem::Requirement
159
157
  none: false
158
+ required_rubygems_version: !ruby/object:Gem::Requirement
160
159
  requirements:
161
160
  - - ! '>='
162
161
  - !ruby/object:Gem::Version
163
162
  version: '0'
163
+ none: false
164
164
  requirements: []
165
165
  rubyforge_project:
166
166
  rubygems_version: 1.8.24