chef-zero 14.0.12 → 14.0.13

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
  SHA256:
3
- metadata.gz: 18556b1f6a192914d736e3477f8ae1813a92c9635c812a3fad3ea13936730fc2
4
- data.tar.gz: 29565bf8101772bc167f881f85f61b53535e542b2eef15c87e9e27c7d95ee319
3
+ metadata.gz: 8f0e22b3dea494e8b561ec5f724f8854c0441f3b0695528f925737f4f9c9e768
4
+ data.tar.gz: d7e7e8b3d22f9d2ecea27799b04c40bc73c9765aabb353eac88442f7359da98b
5
5
  SHA512:
6
- metadata.gz: e72fd5c1e0f749c4d5437a9e29daa60f6704eba864414dad242eb755f0c9466f9771de45d61670d82121a775cb0110e1e4872118391cc80ef419c280abb2d688
7
- data.tar.gz: 14c97ab83e709f967fe5ca74537fbb1667672220810901c82d81f0d2b3150d92f55cdfaf39eb4a5a2eb852ff8f7b19adafbc49b0189e81587507abe7dd01dc69
6
+ metadata.gz: f3ba2f87dfa20516459d5a17bde60a0dc7925f1fe245700707c328fe9c99f8dcbe110cb6daaeed70c92dcc85bda18f63eb1b8868e27e50a284443078abbe6d4b
7
+ data.tar.gz: 405b1b2b070dd2b8c2d6537de6af2a029cd9cf05378b17e9ea10351b52b8230621acd3468ada349d2bafccccb4abbf448a62e62c9714f211f3af27df3f0dd785
@@ -7,6 +7,7 @@ require "rubygems"
7
7
  $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
8
8
 
9
9
  require "chef_zero/log"
10
+ require "chef_zero/dist"
10
11
  require "chef_zero/version"
11
12
  require "chef_zero/server"
12
13
  require "chef_zero/data_store/raw_file_store"
@@ -28,7 +29,7 @@ end
28
29
  options = {}
29
30
 
30
31
  OptionParser.new do |opts|
31
- opts.banner = "Usage: chef-zero [ARGS]"
32
+ opts.banner = "Usage: #{ChefZero::Dist::CLIENT} [ARGS]"
32
33
 
33
34
  opts.on("-H", "--host HOST", "Host to bind to (default: 127.0.0.1)") do |value|
34
35
  options[:host] ||= []
@@ -100,7 +101,7 @@ if options[:daemon]
100
101
  server.start(true)
101
102
  else
102
103
  if ENV["OS"] == "Windows_NT"
103
- abort "Daemonization is not supported on Windows. Running 'start chef-zero' will fork the process."
104
+ abort "Daemonization is not supported on Windows. Running 'start #{ChefZero::Dist::CLIENT}' will fork the process."
104
105
  else
105
106
  abort "Process.daemon requires Ruby >= 1.9"
106
107
  end
@@ -0,0 +1,9 @@
1
+ module ChefZero
2
+ class Dist
3
+ # When referencing a product directly
4
+ PRODUCT = "Chef Zero".freeze
5
+
6
+ # The binary alias
7
+ CLIENT = "chef-zero".freeze
8
+ end
9
+ end
@@ -1,14 +1,15 @@
1
+ require "chef_zero/dist"
1
2
  module ChefZero
2
3
  module Endpoints
3
4
  # /organizations/ORG/controls
4
5
  class ControlsEndpoint < RestBase
5
6
  # ours is not to wonder why; ours is but to make the pedant specs pass.
6
7
  def get(request)
7
- error(410, "Server says 410, chef-zero says 410.")
8
+ error(410, "Server says 410, #{ChefZero::Dist::CLIENT} says 410.")
8
9
  end
9
10
 
10
11
  def post(request)
11
- error(410, "Server says 410, chef-zero says 410.")
12
+ error(410, "Server says 410, #{ChefZero::Dist::CLIENT} says 410.")
12
13
  end
13
14
  end
14
15
  end
@@ -1,11 +1,12 @@
1
1
  require "chef_zero/rest_base"
2
+ require "chef_zero/dist"
2
3
 
3
4
  module ChefZero
4
5
  module Endpoints
5
6
  # /version
6
7
  class VersionEndpoint < RestBase
7
8
  def get(request)
8
- text_response(200, "chef-zero #{ChefZero::VERSION}\n")
9
+ text_response(200, "#{ChefZero::Dist::CLIENT} #{ChefZero::VERSION}\n")
9
10
  end
10
11
  end
11
12
  end
@@ -42,7 +42,7 @@ module ChefZero
42
42
  extend RSpecClassMethods
43
43
 
44
44
  def when_the_chef_server(description, *tags, &block)
45
- context "When the Chef server #{description}", *tags do
45
+ context "When the #{ChefZero::Dist::PRODUCT} server #{description}", *tags do
46
46
  extend WhenTheChefServerClassMethods
47
47
  include WhenTheChefServerInstanceMethods
48
48
 
@@ -69,7 +69,7 @@ module ChefZero
69
69
  if chef_server_options[:server_scope] != self.class.chef_server_options[:server_scope]
70
70
  raise "server_scope: #{chef_server_options[:server_scope]} will not be honored: it can only be set on when_the_chef_server!"
71
71
  end
72
- Log.info("Starting Chef server with options #{chef_server_options}")
72
+ Log.info("Starting #{ChefZero::Dist::PRODUCT} server with options #{chef_server_options}")
73
73
 
74
74
  ChefZero::RSpec.set_server_options(chef_server_options)
75
75
 
@@ -35,6 +35,7 @@ require "chef_zero/data_store/memory_store_v2"
35
35
  require "chef_zero/data_store/v1_to_v2_adapter"
36
36
  require "chef_zero/data_store/default_facade"
37
37
  require "chef_zero/version"
38
+ require "chef_zero/dist.rb"
38
39
 
39
40
  require "chef_zero/endpoints/rest_list_endpoint"
40
41
  require "chef_zero/endpoints/authenticate_user_endpoint"
@@ -231,7 +232,7 @@ module ChefZero
231
232
  if publish
232
233
  output = publish.respond_to?(:puts) ? publish : STDOUT
233
234
  output.puts <<-EOH.gsub(/^ {10}/, "")
234
- >> Starting Chef Zero (v#{ChefZero::VERSION})...
235
+ >> Starting #{ChefZero::Dist::PRODUCT} (v#{ChefZero::VERSION})...
235
236
  EOH
236
237
  end
237
238
 
@@ -248,7 +249,7 @@ module ChefZero
248
249
 
249
250
  %w{INT TERM}.each do |signal|
250
251
  Signal.trap(signal) do
251
- puts "\n>> Stopping Chef Zero..."
252
+ puts "\n>> Stopping #{ChefZero::Dist::PRODUCT}..."
252
253
  @server.shutdown
253
254
  end
254
255
  end
@@ -362,7 +363,7 @@ module ChefZero
362
363
  end
363
364
  rescue Timeout::Error
364
365
  if @thread
365
- ChefZero::Log.error("Chef Zero did not stop within #{wait} seconds! Killing...")
366
+ ChefZero::Log.error("#{ChefZero::Dist::PRODUCT} did not stop within #{wait} seconds! Killing...")
366
367
  @thread.kill
367
368
  SocketlessServerMap.deregister(port)
368
369
  end
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "thread"
20
20
  require "singleton"
21
+ require "chef_zero/dist"
21
22
 
22
23
  module ChefZero
23
24
 
@@ -83,7 +84,7 @@ module ChefZero
83
84
 
84
85
  def request(port, request_env)
85
86
  server = @servers_by_port[port]
86
- raise ServerNotFound, "No socketless chef-zero server on given port #{port.inspect}" unless server
87
+ raise ServerNotFound, "No socketless #{ChefZero::Dist::PRODUCT} server on given port #{port.inspect}" unless server
87
88
  server.handle_socketless_request(request_env)
88
89
  end
89
90
 
@@ -1,3 +1,3 @@
1
1
  module ChefZero
2
- VERSION = "14.0.12".freeze
2
+ VERSION = "14.0.13".freeze
3
3
  end
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: 14.0.12
4
+ version: 14.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Software, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-19 00:00:00.000000000 Z
11
+ date: 2019-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-log
@@ -155,6 +155,7 @@ files:
155
155
  - lib/chef_zero/data_store/raw_file_store.rb
156
156
  - lib/chef_zero/data_store/v1_to_v2_adapter.rb
157
157
  - lib/chef_zero/data_store/v2_to_v1_adapter.rb
158
+ - lib/chef_zero/dist.rb
158
159
  - lib/chef_zero/endpoints/acl_endpoint.rb
159
160
  - lib/chef_zero/endpoints/acls_endpoint.rb
160
161
  - lib/chef_zero/endpoints/actor_default_key_endpoint.rb
@@ -272,7 +273,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
272
273
  - !ruby/object:Gem::Version
273
274
  version: '0'
274
275
  requirements: []
275
- rubygems_version: 3.0.1
276
+ rubygems_version: 3.0.3
276
277
  signing_key:
277
278
  specification_version: 4
278
279
  summary: Self-contained, easy-setup, fast-start in-memory Chef server for testing