specinfra 0.5.7 → 0.5.8
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/exec.rb +8 -4
- data/lib/specinfra/command.rb +1 -1
- data/lib/specinfra/command/base.rb +1 -1
- data/lib/specinfra/command/freebsd10.rb +13 -0
- data/lib/specinfra/helper/os.rb +1 -0
- data/lib/specinfra/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ef7aa033a801726f811188a418cc0a69d8e61e5
|
4
|
+
data.tar.gz: 5f498638b1a934242bf042f52e3bc2bda6f22734
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13e5c402882f7f50e03124b211b8adcd63347f7274a3062122422728ceeecdebd56e1c4e152ced6ed4820f0d3ccfc769b35e0b8dde7bd93561ac514a8803cbea
|
7
|
+
data.tar.gz: 8acd3900038b66864231626d4da4ef6ff132f13261b822364ad2d06802907cedceeac42bdb8b33eceb6af00b2244c3b43f685c1363fdcc9dd1b43fe490eeeee3
|
@@ -53,7 +53,7 @@ module SpecInfra
|
|
53
53
|
|
54
54
|
def check_running(process)
|
55
55
|
ret = run_command(commands.check_running(process))
|
56
|
-
|
56
|
+
|
57
57
|
# In Ubuntu, some services are under upstart and "service foo status" returns
|
58
58
|
# exit status 0 even though they are stopped.
|
59
59
|
# So return false if stdout contains "stopped/waiting".
|
@@ -74,7 +74,7 @@ module SpecInfra
|
|
74
74
|
retlines = ret.stdout.split(/[\r\n]+/).map(&:strip)
|
75
75
|
proc_index = retlines.index("Process '#{process}'")
|
76
76
|
return false unless proc_index
|
77
|
-
|
77
|
+
|
78
78
|
retlines[proc_index+2].match(/\Amonitoring status\s+monitored\Z/i) != nil
|
79
79
|
end
|
80
80
|
|
@@ -221,8 +221,12 @@ module SpecInfra
|
|
221
221
|
end
|
222
222
|
elsif run_command('uname -s').stdout =~ /Darwin/i
|
223
223
|
{ :family => 'Darwin', :release => nil }
|
224
|
-
elsif run_command('uname -
|
225
|
-
|
224
|
+
elsif (os = run_command('uname -sr').stdout) && os =~ /FreeBSD/i
|
225
|
+
if os =~ /10./
|
226
|
+
{ :family => 'FreeBSD10', :release => nil }
|
227
|
+
else
|
228
|
+
{ :family => 'FreeBSD', :release => nil }
|
229
|
+
end
|
226
230
|
else
|
227
231
|
{ :family => 'Base', :release => nil }
|
228
232
|
end
|
data/lib/specinfra/command.rb
CHANGED
@@ -173,7 +173,7 @@ module SpecInfra
|
|
173
173
|
end
|
174
174
|
|
175
175
|
def check_link(link, target)
|
176
|
-
"stat -c %N #{escape(link)} | grep --
|
176
|
+
"stat -c %N #{escape(link)} | grep -- \"-> \\`#{escape(target)}'\""
|
177
177
|
end
|
178
178
|
|
179
179
|
def check_installed_by_gem(name, version=nil)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module SpecInfra
|
2
|
+
module Command
|
3
|
+
class FreeBSD10 < FreeBSD
|
4
|
+
def check_installed(package, version=nil)
|
5
|
+
if version
|
6
|
+
"pkg query %v #{escape(package)} | grep -- #{escape(version)}"
|
7
|
+
else
|
8
|
+
"pkg info #{escape(package)}"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/specinfra/helper/os.rb
CHANGED
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: 0.5.
|
4
|
+
version: 0.5.8
|
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-02-
|
11
|
+
date: 2014-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- lib/specinfra/command/darwin.rb
|
108
108
|
- lib/specinfra/command/debian.rb
|
109
109
|
- lib/specinfra/command/freebsd.rb
|
110
|
+
- lib/specinfra/command/freebsd10.rb
|
110
111
|
- lib/specinfra/command/gentoo.rb
|
111
112
|
- lib/specinfra/command/linux.rb
|
112
113
|
- lib/specinfra/command/plamo.rb
|