specinfra 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/specinfra/backend/ssh.rb +6 -2
- data/lib/specinfra/command/debian.rb +2 -2
- data/lib/specinfra/configuration.rb +2 -1
- data/lib/specinfra/version.rb +1 -1
- 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: f9d36561ba5c3bec832fa2088e7eaa25f0da4edd
|
4
|
+
data.tar.gz: 6e2a9f7498671b0a7c0cfb87cd82e0900dea92ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a1eed7f15f4e770955e3957265c5009615f6b786691057e441b4e797abb98e69fca75a876814f551d06957e09a5c7b22707e308cd2dd6f4d88560db9d865725
|
7
|
+
data.tar.gz: 1a01e0781977ce32a18ace566a8a5eb6d3a8db3cedc0293df8a8e4d75ac34418b1036df1a28853949729de9d5d8c605dec54578566a0fc3cbf7b52944f08bd02
|
@@ -61,8 +61,7 @@ module SpecInfra
|
|
61
61
|
|
62
62
|
ssh = SpecInfra.configuration.ssh
|
63
63
|
ssh.open_channel do |channel|
|
64
|
-
if
|
65
|
-
# We don't need a PTY because we don't have a sudo password
|
64
|
+
if SpecInfra.configuration.sudo_password or SpecInfra.configuration.request_pty
|
66
65
|
channel.request_pty do |ch, success|
|
67
66
|
abort "Could not obtain pty " if !success
|
68
67
|
end
|
@@ -78,6 +77,11 @@ module SpecInfra
|
|
78
77
|
end
|
79
78
|
|
80
79
|
channel.on_extended_data do |ch, type, data|
|
80
|
+
if data.match /you must have a tty to run sudo/
|
81
|
+
puts data
|
82
|
+
abort 'Please set "SpecInfra.configuration.request_pty = true" or "c.request_pty = true" in your spec_helper.rb or other appropreate file.'
|
83
|
+
end
|
84
|
+
|
81
85
|
if data.match /^sudo: no tty present and no askpass program specified/
|
82
86
|
abort "Please set sudo password by using SUDO_PASSWORD or ASK_SUDO_PASSWORD environment variable"
|
83
87
|
else
|
@@ -9,9 +9,9 @@ module SpecInfra
|
|
9
9
|
def check_installed(package, version=nil)
|
10
10
|
escaped_package = escape(package)
|
11
11
|
if version
|
12
|
-
cmd = "dpkg-query -f '${Status} ${Version}' -W #{escaped_package} | grep -E '
|
12
|
+
cmd = "dpkg-query -f '${Status} ${Version}' -W #{escaped_package} | grep -E '^\\(install\\|hold\\) ok installed #{escape(version)}$'"
|
13
13
|
else
|
14
|
-
cmd = "dpkg-query -f '${Status}' -W #{escaped_package} | grep '
|
14
|
+
cmd = "dpkg-query -f '${Status}' -W #{escaped_package} | grep '^\\(install\\|hold\\) ok installed$'"
|
15
15
|
end
|
16
16
|
cmd
|
17
17
|
end
|
data/lib/specinfra/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: specinfra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|