syncwrap 2.3.0 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.rdoc +12 -0
- data/examples/jruby.rb +1 -1
- data/lib/syncwrap/base.rb +1 -1
- data/lib/syncwrap/components/cruby_vm.rb +5 -5
- data/lib/syncwrap/components/jruby_vm.rb +2 -2
- data/lib/syncwrap/shell.rb +5 -1
- data/test/test_shell.rb +5 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3500abca37060701fb9e37fa8be04a5f1d50c8f4
|
4
|
+
data.tar.gz: e7f02b99eebccd0bf12e9d9b6b8dca69ac73dba1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdea13437020dbe472ccc9dd5b5d92b036960a9c267fcc3b92537c56e1c80905ad877caad057a37bf85f0ff212e765a45d5ec92ad808da3982f2c3cec0cfc8a5
|
7
|
+
data.tar.gz: 7295c65e3ff1ebe839d0da32a8a31012baa7e8302ec1be9b6956061ee3fe034fd988f6ee6ec6949370928e0318c73214f3323e6bc4cf06b5ba5bb992aa51beb2
|
data/History.rdoc
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
=== 2.4.0 (2015-1-2)
|
2
|
+
* Upgrade SyncWrap::CRubyVM default version to 2.1.5 and add libffi as
|
3
|
+
build dependency.
|
4
|
+
* Upgrade SyncWrap::JRubyVM default version to 1.7.17
|
5
|
+
* When using the sh :user option which uses `sudo` on the remote, add
|
6
|
+
a `cd /` to the start of the shell command sequence. Prior to this
|
7
|
+
change, the working directory remained the home directory of the ssh
|
8
|
+
user (by convention, a dev. user) which shouldn't be writable and
|
9
|
+
might not even by readable by the target :user (ex: runr). This
|
10
|
+
caused often cryptic warnings or even fatal errors when accessing
|
11
|
+
certain command line tools from the shell.
|
12
|
+
|
1
13
|
=== 2.3.0 (2014-9-20)
|
2
14
|
* Add SyncWrap::Debian (with Ubuntu as child), SyncWrap::CentOS and
|
3
15
|
SyncWrap::AmazonLinux (with RHEL as parent) to form a Distro
|
data/examples/jruby.rb
CHANGED
data/lib/syncwrap/base.rb
CHANGED
@@ -47,9 +47,9 @@ module SyncWrap
|
|
47
47
|
# The ruby version to install, as it appears in source packages
|
48
48
|
# from ruby-lang.org. Note that starting with 2.1.0, the patch
|
49
49
|
# release (p#) no longer appears in package names.
|
50
|
-
# (Default: 2.1.
|
50
|
+
# (Default: 2.1.5)
|
51
51
|
#
|
52
|
-
# Example values: '2.0.0-p481', '2.1.
|
52
|
+
# Example values: '2.0.0-p481', '2.1.5'
|
53
53
|
attr_accessor :ruby_version
|
54
54
|
|
55
55
|
# If true, attempt to uninstall any pre-existing distro packaged
|
@@ -58,7 +58,7 @@ module SyncWrap
|
|
58
58
|
attr_accessor :do_uninstall_distro_ruby
|
59
59
|
|
60
60
|
def initialize( opts = {} )
|
61
|
-
@ruby_version = "2.1.
|
61
|
+
@ruby_version = "2.1.5"
|
62
62
|
@do_uninstall_distro_ruby = true
|
63
63
|
|
64
64
|
super
|
@@ -121,10 +121,10 @@ module SyncWrap
|
|
121
121
|
def install_build_deps
|
122
122
|
if distro.is_a?( RHEL )
|
123
123
|
dist_install( %w[ gcc make autoconf zlib-devel
|
124
|
-
openssl-devel readline-devel libyaml-devel ] )
|
124
|
+
openssl-devel readline-devel libyaml-devel libffi-devel ] )
|
125
125
|
else
|
126
126
|
dist_install( %w[ gcc make autoconf zlib1g-dev
|
127
|
-
libssl-dev libreadline-dev libyaml-dev ] )
|
127
|
+
libssl-dev libreadline-dev libyaml-dev libffi-dev ] )
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
@@ -29,11 +29,11 @@ module SyncWrap
|
|
29
29
|
include VersionSupport
|
30
30
|
include RubySupport
|
31
31
|
|
32
|
-
# JRuby version to install (default: 1.7.
|
32
|
+
# JRuby version to install (default: 1.7.17)
|
33
33
|
attr_accessor :jruby_version
|
34
34
|
|
35
35
|
def initialize( opts = {} )
|
36
|
-
@jruby_version = '1.7.
|
36
|
+
@jruby_version = '1.7.17'
|
37
37
|
|
38
38
|
super( { ruby_command: 'jruby',
|
39
39
|
gem_command: 'jgem' }.merge( opts ) )
|
data/lib/syncwrap/shell.rb
CHANGED
@@ -102,6 +102,7 @@ module SyncWrap
|
|
102
102
|
if opts[ :sh_verbose ]
|
103
103
|
cmd << "set " << ( opts[ :sh_verbose ] == :x ? '-x' : '-v' ) << "\n"
|
104
104
|
end
|
105
|
+
cmd << "cd /\n" if opts[:user]
|
105
106
|
cmd << command_lines_cleanup( command )
|
106
107
|
args << cmd
|
107
108
|
else
|
@@ -109,7 +110,10 @@ module SyncWrap
|
|
109
110
|
args << ( opts[ :sh_verbose ] == :x ? '-x' : '-v' )
|
110
111
|
end
|
111
112
|
args << '-c'
|
112
|
-
|
113
|
+
cmd = ""
|
114
|
+
cmd << "cd /\n" if opts[:user]
|
115
|
+
cmd << command_lines_cleanup( command )
|
116
|
+
args << cmd
|
113
117
|
end
|
114
118
|
args
|
115
119
|
end
|
data/test/test_shell.rb
CHANGED
@@ -252,9 +252,10 @@ class TestShell < MiniTest::Unit::TestCase
|
|
252
252
|
cmd = ssh_args( SAFE_SSH, 'echo foo', sh_verbose: :v, user: :root )
|
253
253
|
exit_code, outputs = capture3( cmd )
|
254
254
|
assert_equal( 0, exit_code )
|
255
|
-
assert_equal(
|
256
|
-
|
257
|
-
|
255
|
+
assert_equal( "cd /\necho foo\n",
|
256
|
+
collect_stream( :err, outputs ) )
|
257
|
+
assert_equal( "foo\n",
|
258
|
+
collect_stream( :out, outputs ) )
|
258
259
|
end
|
259
260
|
|
260
261
|
def test_ssh_sudo_coalesce
|
@@ -268,7 +269,7 @@ class TestShell < MiniTest::Unit::TestCase
|
|
268
269
|
unmerged << [ stream, chunk ]
|
269
270
|
end
|
270
271
|
assert_equal( 0, exit_code )
|
271
|
-
assert_equal( [[:err, "
|
272
|
+
assert_equal( [[:err, "cd /\necho foo\nfoo\necho bar\nbar\n"]],
|
272
273
|
merged, merged )
|
273
274
|
post_merged = unmerged.map {|s,c| c}.inject( "", :+ )
|
274
275
|
assert_equal( merged[0][1], post_merged )
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: syncwrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Kellum
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: term-ansicolor
|