shexy 0.3 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -0
- data/Rakefile +1 -1
- data/lib/shexy.rb +4 -3
- metadata +3 -3
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -18,7 +18,7 @@ Jeweler::Tasks.new do |gem|
|
|
18
18
|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
19
19
|
gem.version = Shexy::VERSION
|
20
20
|
gem.name = "shexy"
|
21
|
-
gem.homepage = "http://github.com/
|
21
|
+
gem.homepage = "http://rubiojr.github.com/shexy"
|
22
22
|
gem.license = "MIT"
|
23
23
|
gem.summary = %Q{SSH, the way I like it}
|
24
24
|
gem.description = %Q{[extremely] thin wrapper around net-ssh and net-scp}
|
data/lib/shexy.rb
CHANGED
@@ -33,7 +33,7 @@ require 'net/scp'
|
|
33
33
|
|
34
34
|
module Shexy
|
35
35
|
|
36
|
-
VERSION = '0.3'
|
36
|
+
VERSION = '0.3.1'
|
37
37
|
|
38
38
|
[:user, :password, :key, :cmd, :host].each do |n|
|
39
39
|
instance_eval %{
|
@@ -242,11 +242,12 @@ module Shexy
|
|
242
242
|
unless value =~ /^(yes|no|without-password)$/
|
243
243
|
raise ArgumentError.new "Argument should be yes|no|without-password"
|
244
244
|
end
|
245
|
+
|
245
246
|
using_sudo = Shexy.sudo?
|
246
|
-
Shexy.use_sudo
|
247
|
+
Shexy.use_sudo unless Shexy.user == 'root'
|
247
248
|
out, err = batch do
|
248
249
|
script <<-EOH
|
249
|
-
sed -i 's
|
250
|
+
sed -i 's/^#\\?PermitRootLogin.*$/PermitRootLogin\\ #{value}/' /etc/ssh/sshd_config
|
250
251
|
test -f /etc/init.d/ssh && /etc/init.d/ssh restart
|
251
252
|
test -f /etc/init.d/sshd && /etc/init.d/sshd restart
|
252
253
|
EOH
|
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:
|
4
|
+
version: 0.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -139,7 +139,7 @@ files:
|
|
139
139
|
- Rakefile
|
140
140
|
- lib/shexy.rb
|
141
141
|
- spec/spec_helper.rb
|
142
|
-
homepage: http://github.com/
|
142
|
+
homepage: http://rubiojr.github.com/shexy
|
143
143
|
licenses:
|
144
144
|
- MIT
|
145
145
|
post_install_message:
|
@@ -154,7 +154,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
154
154
|
version: '0'
|
155
155
|
segments:
|
156
156
|
- 0
|
157
|
-
hash:
|
157
|
+
hash: 1420840912196924587
|
158
158
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
159
|
none: false
|
160
160
|
requirements:
|