serverspec 2.0.0.beta10 → 2.0.0.beta11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/serverspec/matchers.rb +1 -0
- data/lib/serverspec/matchers/belong_to_primary_group.rb +5 -0
- data/lib/serverspec/setup.rb +29 -0
- data/lib/serverspec/type/user.rb +4 -0
- data/lib/serverspec/version.rb +1 -1
- data/serverspec.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e957c06e8e32ed7498f082132a63e9e88c4969c
|
4
|
+
data.tar.gz: 2b2e8cc776df290e1524ea011f0a31edeac132e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c483c85441a7f4ccfa65f5918726f32a186f7da2e436b7846d1232cce9378511354ac49721e63b109e3202503bd82f7503ecd0f85fdc94c982602277a2d84846
|
7
|
+
data.tar.gz: 59d94690c51f5552efbb093d3f0e4d5ec219bc0380845510d998f2cfde037c543de9ffa625508b09c65ddcb4ef299a331e8ae6a4a4c73338d422685bc9866b8e
|
data/lib/serverspec/matchers.rb
CHANGED
data/lib/serverspec/setup.rb
CHANGED
@@ -39,6 +39,7 @@ module Serverspec
|
|
39
39
|
safe_create_spec
|
40
40
|
safe_create_spec_helper
|
41
41
|
safe_create_rakefile
|
42
|
+
safe_create_dotrspec
|
42
43
|
end
|
43
44
|
|
44
45
|
def self.ask_os_type
|
@@ -285,9 +286,18 @@ options[:user] ||= Etc.getlogin
|
|
285
286
|
|
286
287
|
set :host, options[:host_name] || host
|
287
288
|
set :ssh_options, options
|
289
|
+
|
290
|
+
# Disable sudo
|
291
|
+
# set :disable_sudo, true
|
288
292
|
<%- end -%>
|
289
293
|
<%- end -%>
|
290
294
|
|
295
|
+
# Set environment variables
|
296
|
+
# set :env, 'LANG' => 'C', 'LC_MESSAGES' => 'C'
|
297
|
+
|
298
|
+
# Set PATH
|
299
|
+
# set :path, '/sbin:/usr/local/sbin:$PATH'
|
300
|
+
|
291
301
|
<% if @backend_type == 'WinRM'-%>
|
292
302
|
user = <username>
|
293
303
|
pass = <password>
|
@@ -299,5 +309,24 @@ c.winrm.set_timeout 300 # 5 minutes max timeout for any operation
|
|
299
309
|
EOF
|
300
310
|
template
|
301
311
|
end
|
312
|
+
|
313
|
+
def self.safe_create_dotrspec
|
314
|
+
content = <<-'EOF'
|
315
|
+
--color
|
316
|
+
--format documentation
|
317
|
+
EOF
|
318
|
+
if File.exists? '.rspec'
|
319
|
+
old_content = File.read('.rspec')
|
320
|
+
if old_content != content
|
321
|
+
$stderr.puts '!! .rspec already exists and differs from template'
|
322
|
+
end
|
323
|
+
else
|
324
|
+
File.open('.rspec', 'w') do |f|
|
325
|
+
f.puts content
|
326
|
+
end
|
327
|
+
puts ' + .rspec'
|
328
|
+
end
|
329
|
+
end
|
330
|
+
|
302
331
|
end
|
303
332
|
end
|
data/lib/serverspec/type/user.rb
CHANGED
@@ -9,6 +9,10 @@ module Serverspec
|
|
9
9
|
@runner.check_user_is_belonging_to_group(@name, group)
|
10
10
|
end
|
11
11
|
|
12
|
+
def belongs_to_primary_group?(group)
|
13
|
+
backend.check_belonging_primary_group(@name, group)
|
14
|
+
end
|
15
|
+
|
12
16
|
def has_uid?(uid)
|
13
17
|
@runner.check_user_has_uid(@name, uid)
|
14
18
|
end
|
data/lib/serverspec/version.rb
CHANGED
data/serverspec.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_runtime_dependency "rspec", "~> 3.0.0"
|
22
22
|
spec.add_runtime_dependency "rspec-its"
|
23
|
-
spec.add_runtime_dependency "specinfra", "~> 2.0.0.
|
23
|
+
spec.add_runtime_dependency "specinfra", "~> 2.0.0.beta10"
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.3"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.1.1"
|
26
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.beta11
|
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-07-
|
11
|
+
date: 2014-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.0.0.
|
47
|
+
version: 2.0.0.beta10
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.0.0.
|
54
|
+
version: 2.0.0.beta10
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,6 +115,7 @@ files:
|
|
115
115
|
- lib/serverspec/matchers/be_running.rb
|
116
116
|
- lib/serverspec/matchers/be_writable.rb
|
117
117
|
- lib/serverspec/matchers/belong_to_group.rb
|
118
|
+
- lib/serverspec/matchers/belong_to_primary_group.rb
|
118
119
|
- lib/serverspec/matchers/contain.rb
|
119
120
|
- lib/serverspec/matchers/have_entry.rb
|
120
121
|
- lib/serverspec/matchers/have_rule.rb
|