serverspec 0.11.5 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -5
  3. data/lib/serverspec.rb +2 -36
  4. data/lib/serverspec/helper.rb +2 -32
  5. data/lib/serverspec/helper/backend.rb +11 -0
  6. data/lib/serverspec/helper/os.rb +25 -0
  7. data/lib/serverspec/setup.rb +3 -3
  8. data/lib/serverspec/version.rb +1 -1
  9. data/serverspec.gemspec +1 -0
  10. data/spec/aix/command_spec.rb +1 -1
  11. data/spec/aix/cron_spec.rb +1 -1
  12. data/spec/aix/default_gateway_spec.rb +1 -1
  13. data/spec/aix/file_spec.rb +1 -1
  14. data/spec/aix/group_spec.rb +1 -1
  15. data/spec/aix/host_spec.rb +1 -1
  16. data/spec/aix/package_spec.rb +1 -1
  17. data/spec/aix/php_config_spec.rb +1 -1
  18. data/spec/aix/port_spec.rb +1 -1
  19. data/spec/aix/routing_table_spec.rb +1 -1
  20. data/spec/aix/service_spec.rb +1 -1
  21. data/spec/aix/user_spec.rb +1 -1
  22. data/spec/backend/cmd/configuration_spec.rb +2 -2
  23. data/spec/backend/exec/build_command_spec.rb +1 -1
  24. data/spec/backend/exec/configuration_spec.rb +2 -3
  25. data/spec/backend/powershell/script_helper_spec.rb +4 -4
  26. data/spec/backend/ssh/build_command_spec.rb +1 -1
  27. data/spec/backend/ssh/configuration_spec.rb +2 -3
  28. data/spec/backend/winrm/configuration_spec.rb +2 -2
  29. data/spec/darwin/command_spec.rb +1 -1
  30. data/spec/darwin/cron_spec.rb +1 -1
  31. data/spec/darwin/default_gateway_spec.rb +1 -1
  32. data/spec/darwin/file_spec.rb +1 -1
  33. data/spec/darwin/group_spec.rb +1 -1
  34. data/spec/darwin/host_spec.rb +1 -1
  35. data/spec/darwin/mail_alias_spec.rb +1 -1
  36. data/spec/darwin/package_spec.rb +1 -1
  37. data/spec/darwin/php_config_spec.rb +1 -1
  38. data/spec/darwin/port_spec.rb +1 -1
  39. data/spec/darwin/routing_table_spec.rb +1 -1
  40. data/spec/darwin/service_spec.rb +1 -1
  41. data/spec/darwin/user_spec.rb +1 -1
  42. data/spec/debian/cgroup_spec.rb +1 -1
  43. data/spec/debian/command_spec.rb +1 -1
  44. data/spec/debian/cron_spec.rb +1 -1
  45. data/spec/debian/default_gateway_spec.rb +1 -1
  46. data/spec/debian/file_spec.rb +1 -1
  47. data/spec/debian/group_spec.rb +1 -1
  48. data/spec/debian/host_spec.rb +1 -1
  49. data/spec/debian/interface_spec.rb +1 -1
  50. data/spec/debian/iptables_spec.rb +1 -1
  51. data/spec/debian/kernel_module_spec.rb +1 -1
  52. data/spec/debian/linux_kernel_parameter_spec.rb +1 -1
  53. data/spec/debian/lxc_spec.rb +1 -1
  54. data/spec/debian/mail_alias_spec.rb +1 -1
  55. data/spec/debian/package_spec.rb +1 -1
  56. data/spec/debian/php_config_spec.rb +1 -1
  57. data/spec/debian/port_spec.rb +1 -1
  58. data/spec/debian/routing_table_spec.rb +1 -1
  59. data/spec/debian/selinux_spec.rb +1 -1
  60. data/spec/debian/service_spec.rb +1 -1
  61. data/spec/debian/user_spec.rb +1 -1
  62. data/spec/debian/zfs_spec.rb +1 -1
  63. data/spec/freebsd/command_spec.rb +1 -1
  64. data/spec/freebsd/cron_spec.rb +1 -1
  65. data/spec/freebsd/default_gateway_spec.rb +1 -1
  66. data/spec/freebsd/file_spec.rb +1 -1
  67. data/spec/freebsd/group_spec.rb +1 -1
  68. data/spec/freebsd/host_spec.rb +1 -1
  69. data/spec/freebsd/package_spec.rb +1 -1
  70. data/spec/freebsd/php_config_spec.rb +1 -1
  71. data/spec/freebsd/port_spec.rb +1 -1
  72. data/spec/freebsd/routing_table_spec.rb +1 -1
  73. data/spec/freebsd/service_spec.rb +1 -1
  74. data/spec/freebsd/user_spec.rb +1 -1
  75. data/spec/gentoo/cgroup_spec.rb +1 -1
  76. data/spec/gentoo/command_spec.rb +1 -1
  77. data/spec/gentoo/cron_spec.rb +1 -1
  78. data/spec/gentoo/default_gateway_spec.rb +1 -1
  79. data/spec/gentoo/file_spec.rb +1 -1
  80. data/spec/gentoo/group_spec.rb +1 -1
  81. data/spec/gentoo/host_spec.rb +1 -1
  82. data/spec/gentoo/interface_spec.rb +1 -1
  83. data/spec/gentoo/iptables_spec.rb +1 -1
  84. data/spec/gentoo/kernel_module_spec.rb +1 -1
  85. data/spec/gentoo/linux_kernel_parameter_spec.rb +1 -1
  86. data/spec/gentoo/lxc_spec.rb +1 -1
  87. data/spec/gentoo/mail_alias_spec.rb +1 -1
  88. data/spec/gentoo/package_spec.rb +1 -1
  89. data/spec/gentoo/php_config_spec.rb +1 -1
  90. data/spec/gentoo/port_spec.rb +1 -1
  91. data/spec/gentoo/routing_table_spec.rb +1 -1
  92. data/spec/gentoo/selinux_spec.rb +1 -1
  93. data/spec/gentoo/service_spec.rb +1 -1
  94. data/spec/gentoo/user_spec.rb +1 -1
  95. data/spec/gentoo/zfs_spec.rb +1 -1
  96. data/spec/plamo/cgroup_spec.rb +1 -1
  97. data/spec/plamo/command_spec.rb +1 -1
  98. data/spec/plamo/cron_spec.rb +1 -1
  99. data/spec/plamo/default_gateway_spec.rb +1 -1
  100. data/spec/plamo/file_spec.rb +1 -1
  101. data/spec/plamo/group_spec.rb +1 -1
  102. data/spec/plamo/host_spec.rb +1 -1
  103. data/spec/plamo/interface_spec.rb +1 -1
  104. data/spec/plamo/iptables_spec.rb +1 -1
  105. data/spec/plamo/kernel_module_spec.rb +1 -1
  106. data/spec/plamo/linux_kernel_parameter_spec.rb +1 -1
  107. data/spec/plamo/lxc_spec.rb +1 -1
  108. data/spec/plamo/mail_alias_spec.rb +1 -1
  109. data/spec/plamo/package_spec.rb +1 -1
  110. data/spec/plamo/php_config_spec.rb +1 -1
  111. data/spec/plamo/port_spec.rb +1 -1
  112. data/spec/plamo/routing_table_spec.rb +1 -1
  113. data/spec/plamo/selinux_spec.rb +1 -1
  114. data/spec/plamo/service_spec.rb +1 -1
  115. data/spec/plamo/user_spec.rb +1 -1
  116. data/spec/plamo/zfs_spec.rb +1 -1
  117. data/spec/redhat/cgroup_spec.rb +1 -1
  118. data/spec/redhat/command_spec.rb +1 -1
  119. data/spec/redhat/cron_spec.rb +1 -1
  120. data/spec/redhat/default_gateway_spec.rb +1 -1
  121. data/spec/redhat/file_spec.rb +1 -1
  122. data/spec/redhat/group_spec.rb +1 -1
  123. data/spec/redhat/host_spec.rb +1 -1
  124. data/spec/redhat/interface_spec.rb +1 -1
  125. data/spec/redhat/iptables_spec.rb +1 -1
  126. data/spec/redhat/kernel_module_spec.rb +1 -1
  127. data/spec/redhat/linux_kernel_parameter_spec.rb +1 -1
  128. data/spec/redhat/lxc_spec.rb +1 -1
  129. data/spec/redhat/mail_alias_spec.rb +1 -1
  130. data/spec/redhat/package_spec.rb +1 -1
  131. data/spec/redhat/php_config_spec.rb +1 -1
  132. data/spec/redhat/port_spec.rb +1 -1
  133. data/spec/redhat/routing_table_spec.rb +1 -1
  134. data/spec/redhat/selinux_spec.rb +1 -1
  135. data/spec/redhat/service_spec.rb +1 -1
  136. data/spec/redhat/user_spec.rb +1 -1
  137. data/spec/redhat/yumrepo_spec.rb +1 -1
  138. data/spec/redhat/zfs_spec.rb +1 -1
  139. data/spec/smartos/mail_alias_spec.rb +1 -1
  140. data/spec/solaris/command_spec.rb +1 -1
  141. data/spec/solaris/cron_spec.rb +1 -1
  142. data/spec/solaris/default_gateway_spec.rb +1 -1
  143. data/spec/solaris/file_spec.rb +1 -1
  144. data/spec/solaris/group_spec.rb +1 -1
  145. data/spec/solaris/host_spec.rb +1 -1
  146. data/spec/solaris/ipfilter_spec.rb +1 -1
  147. data/spec/solaris/ipnat_spec.rb +1 -1
  148. data/spec/solaris/mail_alias_spec.rb +1 -1
  149. data/spec/solaris/package_spec.rb +1 -1
  150. data/spec/solaris/php_config_spec.rb +1 -1
  151. data/spec/solaris/port_spec.rb +1 -1
  152. data/spec/solaris/routing_table_spec.rb +1 -1
  153. data/spec/solaris/service_spec.rb +1 -1
  154. data/spec/solaris/svcprop_spec.rb +1 -1
  155. data/spec/solaris/user_spec.rb +1 -1
  156. data/spec/solaris/zfs_spec.rb +1 -1
  157. data/spec/solaris10/file_spec.rb +1 -1
  158. data/spec/solaris10/group_spec.rb +1 -1
  159. data/spec/solaris10/mail_alias_spec.rb +1 -1
  160. data/spec/solaris10/package_spec.rb +1 -1
  161. data/spec/solaris10/php_config_spec.rb +1 -1
  162. data/spec/solaris10/user_spec.rb +1 -1
  163. data/spec/solaris11/command_spec.rb +1 -1
  164. data/spec/solaris11/cron_spec.rb +1 -1
  165. data/spec/solaris11/default_gateway_spec.rb +1 -1
  166. data/spec/solaris11/file_spec.rb +1 -1
  167. data/spec/solaris11/group_spec.rb +1 -1
  168. data/spec/solaris11/host_spec.rb +1 -1
  169. data/spec/solaris11/ipfilter_spec.rb +1 -1
  170. data/spec/solaris11/ipnat_spec.rb +1 -1
  171. data/spec/solaris11/mail_alias_spec.rb +1 -1
  172. data/spec/solaris11/package_spec.rb +1 -1
  173. data/spec/solaris11/php_config_spec.rb +1 -1
  174. data/spec/solaris11/port_spec.rb +1 -1
  175. data/spec/solaris11/routing_table_spec.rb +1 -1
  176. data/spec/solaris11/service_spec.rb +1 -1
  177. data/spec/solaris11/svcprop_spec.rb +1 -1
  178. data/spec/solaris11/user_spec.rb +1 -1
  179. data/spec/solaris11/zfs_spec.rb +1 -1
  180. data/spec/spec_helper.rb +8 -6
  181. data/spec/windows/command_spec.rb +2 -2
  182. data/spec/windows/file_spec.rb +2 -2
  183. data/spec/windows/group_spec.rb +2 -2
  184. data/spec/windows/port_spec.rb +2 -2
  185. data/spec/windows/service_spec.rb +2 -2
  186. data/spec/windows/user_spec.rb +2 -2
  187. data/spec/windows/windows_registry_key_spec.rb +2 -2
  188. metadata +18 -45
  189. data/lib/serverspec/attributes.rb +0 -17
  190. data/lib/serverspec/backend.rb +0 -7
  191. data/lib/serverspec/backend/base.rb +0 -31
  192. data/lib/serverspec/backend/cmd.rb +0 -39
  193. data/lib/serverspec/backend/exec.rb +0 -218
  194. data/lib/serverspec/backend/powershell/command.rb +0 -40
  195. data/lib/serverspec/backend/powershell/script_helper.rb +0 -85
  196. data/lib/serverspec/backend/powershell/support/check_file_access_rules.ps1 +0 -8
  197. data/lib/serverspec/backend/powershell/support/crop_text.ps1 +0 -11
  198. data/lib/serverspec/backend/powershell/support/find_group.ps1 +0 -8
  199. data/lib/serverspec/backend/powershell/support/find_installed_application.ps1 +0 -7
  200. data/lib/serverspec/backend/powershell/support/find_service.ps1 +0 -5
  201. data/lib/serverspec/backend/powershell/support/find_user.ps1 +0 -8
  202. data/lib/serverspec/backend/powershell/support/find_usergroup.ps1 +0 -9
  203. data/lib/serverspec/backend/powershell/support/is_port_listening.ps1 +0 -13
  204. data/lib/serverspec/backend/ssh.rb +0 -93
  205. data/lib/serverspec/backend/winrm.rb +0 -26
  206. data/lib/serverspec/configuration.rb +0 -12
  207. data/lib/serverspec/helper/aix.rb +0 -9
  208. data/lib/serverspec/helper/attributes.rb +0 -16
  209. data/lib/serverspec/helper/base.rb +0 -9
  210. data/lib/serverspec/helper/cmd.rb +0 -15
  211. data/lib/serverspec/helper/configuration.rb +0 -37
  212. data/lib/serverspec/helper/darwin.rb +0 -9
  213. data/lib/serverspec/helper/debian.rb +0 -9
  214. data/lib/serverspec/helper/detect_os.rb +0 -19
  215. data/lib/serverspec/helper/exec.rb +0 -14
  216. data/lib/serverspec/helper/freebsd.rb +0 -9
  217. data/lib/serverspec/helper/gentoo.rb +0 -9
  218. data/lib/serverspec/helper/plamo.rb +0 -9
  219. data/lib/serverspec/helper/properties.rb +0 -14
  220. data/lib/serverspec/helper/puppet.rb +0 -9
  221. data/lib/serverspec/helper/redhat.rb +0 -9
  222. data/lib/serverspec/helper/smartos.rb +0 -10
  223. data/lib/serverspec/helper/solaris.rb +0 -9
  224. data/lib/serverspec/helper/solaris10.rb +0 -9
  225. data/lib/serverspec/helper/solaris11.rb +0 -9
  226. data/lib/serverspec/helper/ssh.rb +0 -15
  227. data/lib/serverspec/helper/windows.rb +0 -9
  228. data/lib/serverspec/helper/winrm.rb +0 -15
  229. data/lib/serverspec/properties.rb +0 -17
  230. data/spec/helpers/properties_spec.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d0e94326e10e8838a093f4a2c1933fc19234e22
4
- data.tar.gz: e4611fc653f06aad2bafa91be2e24b4830944915
3
+ metadata.gz: 752400de68f58e7d7e2605e2d7249e19c7e9031f
4
+ data.tar.gz: ad2e694640b507b888251fc6e34af0df35164f1a
5
5
  SHA512:
6
- metadata.gz: 81186006639054360b2fab02607e8f663efa81363db6a575dd1eeede8729291a40afb2bb4184a9c7754e5e941dd2ca0ec3db71c20d1c5030542698fa4593ad04
7
- data.tar.gz: b51ce84ca5748afcc2f657cab24b57d4a4a034033910dfce8a835d02ee2021ec5a1f13a48dc76fecdec1b1fc9985f045c895a1d90cb675fdfa5f22d9b9f996d7
6
+ metadata.gz: c9d8eb41562f89d01e9a3d13c482b213b05dbf8f8bcfa78da00c3890cb08b1443652c151fae61e81f71cdb2487f77c2ec6b175fd02f78b145f899f582dc2a7ce
7
+ data.tar.gz: 0ee62224c780f3e79f0152bcb382d4141435cde8accbd12f3e52511d73a2d70c0bd5762caeb8cfac7eda16458a63264524e3bf4ce79fd811b9e08f7683ff0dfb
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ task :spec => 'spec:all'
6
6
  namespace :spec do
7
7
  oses = %w( darwin debian gentoo plamo redhat aix solaris solaris10 solaris11 smartos windows freebsd)
8
8
 
9
- task :all => [ oses.map {|os| "spec:#{os}" }, :helpers, :exec, :ssh, :cmd, :winrm, :powershell ].flatten
9
+ task :all => [ oses.map {|os| "spec:#{os}" }, :exec, :ssh, :cmd, :winrm, :powershell ].flatten
10
10
 
11
11
  oses.each do |os|
12
12
  RSpec::Core::RakeTask.new(os.to_sym) do |t|
@@ -14,10 +14,6 @@ namespace :spec do
14
14
  end
15
15
  end
16
16
 
17
- RSpec::Core::RakeTask.new(:helpers) do |t|
18
- t.pattern = "spec/helpers/*_spec.rb"
19
- end
20
-
21
17
  [:exec, :ssh, :cmd, :winrm, :powershell].each do |backend|
22
18
  RSpec::Core::RakeTask.new(backend) do |t|
23
19
  t.pattern = "spec/backend/#{backend.to_s}/*_spec.rb"
data/lib/serverspec.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  require 'rubygems'
2
2
  require 'rspec'
3
+ require 'specinfra'
3
4
  require 'serverspec/version'
4
5
  require 'serverspec/matchers'
5
- require 'serverspec/backend'
6
6
  require 'serverspec/helper'
7
7
  require 'serverspec/setup'
8
8
  require 'serverspec/subject'
@@ -20,43 +20,9 @@ require 'serverspec/commands/smartos'
20
20
  require 'serverspec/commands/darwin'
21
21
  require 'serverspec/commands/windows'
22
22
  require 'serverspec/commands/freebsd'
23
- require 'serverspec/configuration'
24
23
  require 'rspec/core/formatters/base_formatter'
25
24
 
26
- include Serverspec
27
-
28
- module Serverspec
29
- class << self
30
- def configuration
31
- Serverspec::Configuration
32
- end
33
- end
34
- end
35
-
36
- RSpec.configure do |c|
37
- c.include(Serverspec::Helper::Configuration)
38
- c.include(Serverspec::Helper::RedHat, :os => :redhat)
39
- c.include(Serverspec::Helper::Debian, :os => :debian)
40
- c.include(Serverspec::Helper::Gentoo, :os => :gentoo)
41
- c.include(Serverspec::Helper::Plamo, :os => :plamo)
42
- c.include(Serverspec::Helper::AIX, :os => :aix)
43
- c.include(Serverspec::Helper::Solaris, :os => :solaris)
44
- c.include(Serverspec::Helper::Solaris10, :os => :solaris10)
45
- c.include(Serverspec::Helper::Solaris11, :os => :solaris11)
46
- c.include(Serverspec::Helper::SmartOS, :os => :smartos)
47
- c.include(Serverspec::Helper::Darwin, :os => :darwin)
48
- c.include(Serverspec::Helper::Windows, :os => :windows)
49
- c.include(Serverspec::Helper::FreeBSD, :os => :freebsd)
50
- c.add_setting :os, :default => nil
51
- c.add_setting :host, :default => nil
52
- c.add_setting :ssh, :default => nil
53
- c.add_setting :sudo_password, :default => nil
54
- c.add_setting :winrm, :default => nil
55
- Serverspec.configuration.defaults.each { |k, v| c.add_setting k, :default => v }
56
- c.before :each do
57
- backend.set_example(example)
58
- end
59
- end
25
+ SPEC_TYPE = 'Serverspec'
60
26
 
61
27
  module RSpec
62
28
  module Core
@@ -1,37 +1,7 @@
1
- require 'etc'
2
-
3
- # Backend helpers
4
- require 'serverspec/helper/ssh'
5
- require 'serverspec/helper/exec'
6
- require 'serverspec/helper/cmd'
7
- require 'serverspec/helper/winrm'
8
- require 'serverspec/helper/puppet'
9
-
10
- # Command helpers
11
- require 'serverspec/helper/redhat'
12
- require 'serverspec/helper/debian'
13
- require 'serverspec/helper/gentoo'
14
- require 'serverspec/helper/plamo'
15
- require 'serverspec/helper/aix'
16
- require 'serverspec/helper/solaris'
17
- require 'serverspec/helper/solaris10'
18
- require 'serverspec/helper/solaris11'
19
- require 'serverspec/helper/smartos'
20
- require 'serverspec/helper/darwin'
21
- require 'serverspec/helper/windows'
22
- require 'serverspec/helper/freebsd'
23
- require 'serverspec/helper/detect_os'
24
-
25
- # Attributes helper
26
- require 'serverspec/helper/attributes'
27
- include Serverspec::Helper::Attributes
28
-
29
- # Properties helper
30
- require 'serverspec/helper/properties'
31
- include Serverspec::Helper::Properties
1
+ require 'serverspec/helper/os'
2
+ require 'serverspec/helper/backend'
32
3
 
33
4
  # Subject type helper
34
5
  require 'serverspec/helper/type'
35
6
  include Serverspec::Helper::Type
36
7
 
37
- require 'serverspec/helper/configuration'
@@ -0,0 +1,11 @@
1
+ module Serverspec
2
+ module Helper
3
+ ['Exec', 'Ssh', 'Cmd', 'WinRM'].each do |backend|
4
+ eval <<-EOF
5
+ module #{backend}
6
+ include self.class.const_get('SpecInfra').const_get('Helper').const_get('#{backend}')
7
+ end
8
+ EOF
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,25 @@
1
+ module Serverspec
2
+ module Helper
3
+ [
4
+ 'DetectOS',
5
+ 'AIX',
6
+ 'Darwin',
7
+ 'Debian',
8
+ 'FreeBSD',
9
+ 'Gentoo',
10
+ 'Plamo',
11
+ 'RedHat',
12
+ 'SmartOS',
13
+ 'Solaris',
14
+ 'Solaris10',
15
+ 'Solaris11',
16
+ 'Windows',
17
+ ].each do |os|
18
+ eval <<-EOF
19
+ module #{os}
20
+ include self.class.const_get('SpecInfra').const_get('Helper').const_get('#{os}')
21
+ end
22
+ EOF
23
+ end
24
+ end
25
+ end
@@ -224,11 +224,11 @@ require 'net/ssh'
224
224
  require 'winrm'
225
225
  <% end -%>
226
226
 
227
- include Serverspec::Helper::<%= @backend_type %>
227
+ include SpecInfra::Helper::<%= @backend_type %>
228
228
  <% if @os_type == 'UN*X' -%>
229
- include Serverspec::Helper::DetectOS
229
+ include SpecInfra::Helper::DetectOS
230
230
  <% else -%>
231
- include Serverspec::Helper::Windows
231
+ include SpecInfra::Helper::Windows
232
232
  <% end -%>
233
233
 
234
234
  <% if @os_type == 'UN*X' -%>
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "0.11.5"
2
+ VERSION = "0.12.0"
3
3
  end
data/serverspec.gemspec CHANGED
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_runtime_dependency "net-ssh"
22
22
  spec.add_runtime_dependency "rspec", ">= 2.13.0"
23
23
  spec.add_runtime_dependency "highline"
24
+ spec.add_runtime_dependency "specinfra", ">= 0.0.2"
24
25
  spec.add_development_dependency "bundler", "~> 1.3"
25
26
  spec.add_development_dependency "rake"
26
27
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::AIX
3
+ include SpecInfra::Helper::AIX
4
4
 
5
5
  describe command('cat /etc/resolv.conf') do
6
6
  let(:stdout) { "nameserver 127.0.0.1\r\n" }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::AIX
3
+ include SpecInfra::Helper::AIX
4
4
 
5
5
  describe cron do
6
6
  it { should have_entry '* * * * * /usr/local/bin/batch.sh' }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::AIX
3
+ include SpecInfra::Helper::AIX
4
4
 
5
5
  describe default_gateway do
6
6
  let(:stdout) { "default via 192.168.1.1 dev eth1 \r\n" }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::AIX
3
+ include SpecInfra::Helper::AIX
4
4
 
5
5
  describe file('/etc/ssh/sshd_config') do
6
6
  it { should be_file }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::AIX
3
+ include SpecInfra::Helper::AIX
4
4
 
5
5
  describe group('root') do
6
6
  it { should exist }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::AIX
3
+ include SpecInfra::Helper::AIX
4
4
 
5
5
  describe host('127.0.0.1') do
6
6
  it { should be_resolvable }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::AIX
3
+ include SpecInfra::Helper::AIX
4
4
 
5
5
  describe package('httpd') do
6
6
  it { should be_installed }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::AIX
3
+ include SpecInfra::Helper::AIX
4
4
 
5
5
  describe php_config('default_mimetype') do
6
6
  let(:stdout) { 'text/html' }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::AIX
3
+ include SpecInfra::Helper::AIX
4
4
 
5
5
  describe port(80) do
6
6
  it { should be_listening }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::AIX
3
+ include SpecInfra::Helper::AIX
4
4
 
5
5
  describe routing_table do
6
6
  let(:stdout) { "192.168.100.0/24 dev eth1 proto kernel scope link src 192.168.100.10 \r\ndefault via 192.168.100.1 dev eth0 \r\n" }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::AIX
3
+ include SpecInfra::Helper::AIX
4
4
 
5
5
  describe service('sshd') do
6
6
  it { should be_enabled }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::AIX
3
+ include SpecInfra::Helper::AIX
4
4
 
5
5
  describe user('root') do
6
6
  it { should exist }
@@ -1,8 +1,8 @@
1
1
  require 'spec_helper'
2
2
  require 'support/powershell_command_runner'
3
3
 
4
- include Serverspec::Helper::Cmd
5
- include Serverspec::Helper::Windows
4
+ include SpecInfra::Helper::Cmd
5
+ include SpecInfra::Helper::Windows
6
6
 
7
7
  describe "Cmd" do
8
8
  it_behaves_like "a powershell command runner"
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::Exec
3
+ include SpecInfra::Helper::Exec
4
4
 
5
5
  describe 'build command with path' do
6
6
  before :each do
@@ -1,8 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
- require 'serverspec/helper/base'
4
- include Serverspec::Helper::RedHat
5
- include Serverspec::Helper::Exec
3
+ include SpecInfra::Helper::RedHat
4
+ include SpecInfra::Helper::Exec
6
5
 
7
6
  describe 'configurations are not set' do
8
7
  context file('/etc/passwd') do
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Backend::PowerShell::ScriptHelper
3
+ include SpecInfra::Backend::PowerShell::ScriptHelper
4
4
 
5
5
  describe 'build command with path' do
6
6
  before :each do
@@ -26,7 +26,7 @@ end
26
26
 
27
27
  describe 'add pre-command' do
28
28
  before :each do
29
- Serverspec.configuration.pre_command = 'test_pre_command'
29
+ SpecInfra.configuration.pre_command = 'test_pre_command'
30
30
  end
31
31
 
32
32
  it "should add the test for pre_command before the command" do
@@ -65,7 +65,7 @@ eof
65
65
  end
66
66
 
67
67
  after :each do
68
- Serverspec.configuration.pre_command = nil
68
+ SpecInfra.configuration.pre_command = nil
69
69
  end
70
70
  end
71
71
 
@@ -101,4 +101,4 @@ eof
101
101
  context 'simple command' do
102
102
  create_script('test command').should == 'test command'
103
103
  end
104
- end
104
+ end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::Ssh
3
+ include SpecInfra::Helper::Ssh
4
4
 
5
5
  ssh = double
6
6
 
@@ -1,8 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
- require 'serverspec/helper/base'
4
- include Serverspec::Helper::RedHat
5
- include Serverspec::Helper::Ssh
3
+ include SpecInfra::Helper::RedHat
4
+ include SpecInfra::Helper::Ssh
6
5
 
7
6
  ssh = double
8
7
 
@@ -1,8 +1,8 @@
1
1
  require 'spec_helper'
2
2
  require 'support/powershell_command_runner'
3
3
 
4
- include Serverspec::Helper::WinRM
5
- include Serverspec::Helper::Windows
4
+ include SpecInfra::Helper::WinRM
5
+ include SpecInfra::Helper::Windows
6
6
 
7
7
  describe "WinRM" do
8
8
  it_behaves_like "a powershell command runner"
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::Darwin
3
+ include SpecInfra::Helper::Darwin
4
4
 
5
5
  describe command('cat /etc/resolv.conf') do
6
6
  let(:stdout) { "nameserver 127.0.0.1\r\n" }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::Darwin
3
+ include SpecInfra::Helper::Darwin
4
4
 
5
5
  describe cron do
6
6
  it { should have_entry '* * * * * /usr/local/bin/batch.sh' }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::Darwin
3
+ include SpecInfra::Helper::Darwin
4
4
 
5
5
  describe default_gateway do
6
6
  let(:stdout) { "default via 192.168.1.1 dev eth1 \r\n" }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- include Serverspec::Helper::Darwin
3
+ include SpecInfra::Helper::Darwin
4
4
 
5
5
  describe file('/etc/ssh/sshd_config') do
6
6
  it { should be_file }