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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d8d7b33a9426ee904733fe53b9d6ffbd1cebe3ea
4
- data.tar.gz: d55366a918a9fca40a44cead029bca4741fa678e
3
+ metadata.gz: 6ef7aa033a801726f811188a418cc0a69d8e61e5
4
+ data.tar.gz: 5f498638b1a934242bf042f52e3bc2bda6f22734
5
5
  SHA512:
6
- metadata.gz: 99c03de16c601652b044fecae7da678a086bfeba76ecd2d642bf3830ac869d966cd600a1757c3168050bbe228f53387da6f93f6a382374b08fc8e5b7bedf6a30
7
- data.tar.gz: ce8ff057cd8d6df76d66a99d51fc18df747ead841423f5920c8d07780fbc521e90cda8d76709520005dc1197e36510fe96b27896d8517600456000cc48ebe7b6
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 -s').stdout =~ /FreeBSD/i
225
- { :family => 'FreeBSD', :release => nil }
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
@@ -18,5 +18,5 @@ require "specinfra/command/smartos"
18
18
  require "specinfra/command/aix"
19
19
  require "specinfra/command/darwin"
20
20
  require "specinfra/command/freebsd"
21
+ require "specinfra/command/freebsd10"
21
22
  require "specinfra/command/windows"
22
-
@@ -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 -- #{escape(target)}"
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
@@ -6,6 +6,7 @@ module SpecInfra
6
6
  'Darwin',
7
7
  'Debian',
8
8
  'FreeBSD',
9
+ 'FreeBSD10',
9
10
  'Gentoo',
10
11
  'Plamo',
11
12
  'RedHat',
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "0.5.7"
2
+ VERSION = "0.5.8"
3
3
  end
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.7
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 00:00:00.000000000 Z
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