chef-zero 3.2 → 3.2.1

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: 4603478fc3f5f399df18a28c953d038cf823cb22
4
- data.tar.gz: 7056fd875014833bb81c4eb82b5877475faa750c
3
+ metadata.gz: a67838676c19271dd0c4c27482acb4abfea444d3
4
+ data.tar.gz: b141fd046001b162298e709f6ed8c081ebb77dd7
5
5
  SHA512:
6
- metadata.gz: a4ad51e269c42ee9ffa70dc36a2e1390e4d6258a8d47bd0dcff34577a8644490b7db96b4beee58530cdc579c5fd634384e8beb3c70a888713a58deb290f85fd4
7
- data.tar.gz: 9ee1343e5f781047c367149572684ad731c29b5b131542eda55d1a41d997429fbb211cf03186a7dcdd1819bdbf7f4fe35624f68e6946e4c987fbc3e484efdeb9
6
+ metadata.gz: e16bfe956d9c9ac05bad5db7edd343a788abc0fef12c875645aa6c88c3463f83904fc2c6f09ec56995d5dd400dccf9118244d39c82768ee5e8baeb4d069f90ac
7
+ data.tar.gz: bb4b01e2ad5a2667b9fea228555a2e59680837f9db24d0929cad75d90af22526303e6ca0ee8c53142091cb47582b1d4fc55067903aff2dc5f218a8f6e16fcef1
data/bin/chef-zero CHANGED
@@ -6,6 +6,7 @@ Signal.trap('INT') { exit 1 }
6
6
  require 'rubygems'
7
7
  $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
8
8
 
9
+ require 'chef_zero/log'
9
10
  require 'chef_zero/version'
10
11
  require 'chef_zero/server'
11
12
  require 'chef_zero/data_store/raw_file_store'
@@ -50,6 +51,10 @@ OptionParser.new do |opts|
50
51
  options[:log_level] = value
51
52
  end
52
53
 
54
+ opts.on("--log-file FILE", "Log to a file") do |value|
55
+ options[:log_file] = value
56
+ end
57
+
53
58
  opts.on("--multi-org", "Whether to run in multi-org mode") do |value|
54
59
  options[:single_org] = nil
55
60
  end
@@ -77,6 +82,10 @@ if options[:data_store]
77
82
  options[:data_store] = ChefZero::DataStore::DefaultFacade.new(options[:data_store], options[:single_org], false)
78
83
  end
79
84
 
85
+ if options[:log_file]
86
+ ChefZero::Log.init(options[:log_file])
87
+ end
88
+
80
89
  server = ChefZero::Server.new(options)
81
90
 
82
91
  if options[:daemon]
@@ -239,6 +239,7 @@ module ChefZero
239
239
  @running = true
240
240
  }
241
241
  )
242
+ ENV['HTTPS'] = 'on' if options[:ssl]
242
243
  @server.mount('/', Rack::Handler::WEBrick, app)
243
244
 
244
245
  # Pick a port
@@ -559,6 +560,9 @@ module ChefZero
559
560
  # Insert Server header
560
561
  response[1]['Server'] = 'chef-zero'
561
562
 
563
+ # Add CORS header
564
+ response[1]['Access-Control-Allow-Origin'] = '*'
565
+
562
566
  # Puma expects the response to be an array (chunked responses). Since
563
567
  # we are statically generating data, we won't ever have said chunked
564
568
  # response, so fake it.
@@ -1,3 +1,3 @@
1
1
  module ChefZero
2
- VERSION = '3.2'
2
+ VERSION = '3.2.1'
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: '3.2'
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Keiser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-27 00:00:00.000000000 Z
11
+ date: 2014-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-log
@@ -229,10 +229,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
229
  version: '0'
230
230
  requirements: []
231
231
  rubyforge_project:
232
- rubygems_version: 2.2.2
232
+ rubygems_version: 2.4.4
233
233
  signing_key:
234
234
  specification_version: 4
235
235
  summary: Self-contained, easy-setup, fast-start in-memory Chef server for testing
236
236
  and solo setup purposes
237
237
  test_files: []
238
- has_rdoc: