chef-zero 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef_zero/rspec.rb +12 -1
- data/lib/chef_zero/server.rb +2 -1
- data/lib/chef_zero/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: 0dc5c43b56067f314638042d649640166f83afde
|
4
|
+
data.tar.gz: c4dfa634c2d1a8293f19a890357f61d9419026c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51cd4eea5333d328bfae4577e3a69aa02d8b5f7ca92308954eaac265f77a851d4fd9c3df3e7c0243e74a026fc6c2bbcf25df6b4f43d0d14829f0e07bc2bd518f
|
7
|
+
data.tar.gz: 2fd500a4c7e70b64a99e3cfaca2f717190358944eaf3830689d51a030509cdccdb40cf4bc944b2ebe5422c1030cd3c953205fa6df71613068cb491092b978873
|
data/lib/chef_zero/rspec.rb
CHANGED
@@ -26,9 +26,20 @@ module ChefZero
|
|
26
26
|
def when_the_chef_server(description, *tags, &block)
|
27
27
|
context "When the Chef server #{description}", *tags do
|
28
28
|
before :each do
|
29
|
+
|
29
30
|
unless ChefZero::RSpec.server
|
31
|
+
default_opts = {:port => 8889, :signals => false, :log_requests => true}
|
32
|
+
server_opts = if self.respond_to?(:chef_zero_opts)
|
33
|
+
default_opts.merge(chef_zero_opts)
|
34
|
+
else
|
35
|
+
default_opts
|
36
|
+
end
|
37
|
+
|
38
|
+
# TODO: can this be logged easily?
|
39
|
+
# pp :zero_opts => server_opts
|
40
|
+
|
30
41
|
# Set up configuration so that clients will point to the server
|
31
|
-
ChefZero::RSpec.server = ChefZero::Server.new(
|
42
|
+
ChefZero::RSpec.server = ChefZero::Server.new(server_opts)
|
32
43
|
ChefZero::RSpec.client_key = Tempfile.new(['chef_zero_client_key', '.pem'])
|
33
44
|
ChefZero::RSpec.client_key.write(ChefZero::PRIVATE_KEY)
|
34
45
|
ChefZero::RSpec.client_key.close
|
data/lib/chef_zero/server.rb
CHANGED
@@ -69,7 +69,8 @@ module ChefZero
|
|
69
69
|
def initialize(options = {})
|
70
70
|
options = DEFAULT_OPTIONS.merge(options)
|
71
71
|
@options = options
|
72
|
-
|
72
|
+
uri_safe_host = options[:host].include?(":") ? "[#{options[:host]}]" : options[:host]
|
73
|
+
@url = "http://#{uri_safe_host}:#{options[:port]}"
|
73
74
|
@generate_real_keys = options[:generate_real_keys]
|
74
75
|
|
75
76
|
ChefZero::Log.level = options[:log_level].to_sym
|
data/lib/chef_zero/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-zero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Keiser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-log
|