Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating rack #332

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .expeditor/verify.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ expeditor:

steps:

- label: run-lint-and-specs-ruby-3.0
command:
- .expeditor/run_linux_tests.sh rake spec pedant style
expeditor:
executor:
docker:
image: ruby:3.0

- label: run-lint-and-specs-ruby-3.1
command:
- .expeditor/run_linux_tests.sh rake spec pedant style
Expand All @@ -22,20 +14,6 @@ steps:
docker:
image: ruby:3.1

- label: run-specs-windows-ruby-3.0
command:
- .expeditor/run_windows_tests.ps1
expeditor:
executor:
docker:
host_os: windows
shell: ["powershell", "-Command"]
image: rubydistros/windows-2019:3.0
environment:
- FORCE_FFI_YAJL=ext
- EXPIRE_CACHE=true
- CHEF_LICENSE=accept-no-persist

- label: run-specs-windows-ruby-3.1
command:
- .expeditor/run_windows_tests.ps1
Expand Down
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ group :pedant do
gem "oc-chef-pedant", git: "https://github.com/chef/chef-server.git", branch: "main"
end

gem "ffi", ">= 1.15.5", "< 1.17.0"

group :development, :test do
gem "chefstyle"
gem "rake"
Expand All @@ -18,8 +20,8 @@ if ENV["GEMFILE_MOD"]
puts "GEMFILE_MOD: #{ENV["GEMFILE_MOD"]}"
instance_eval(ENV["GEMFILE_MOD"])
else
gem "chef", "~> 14.0"
gem "ohai", "~> 14.0"
gem "chef", "~> 18.6"
gem "ohai", "~> 18.0"
end

group :debug do
Expand Down
3 changes: 2 additions & 1 deletion chef-zero.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Gem::Specification.new do |s|
s.add_dependency "hashie", ">= 2.0", "< 5.0"
s.add_dependency "uuidtools", "~> 2.1"
s.add_dependency "ffi-yajl", "~> 2.2"
s.add_dependency "rack", "~> 2.0", ">= 2.0.6"
s.add_dependency "rack", "~> 3.1", ">= 3.1.10"
s.add_dependency "rackup", "~> 2.2", ">= 2.2.1"
s.add_dependency "webrick"

s.bindir = "bin"
Expand Down
3 changes: 2 additions & 1 deletion lib/chef_zero/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
require "stringio" unless defined?(StringIO)

require "rack" unless defined?(Rack)
require "rackup" unless defined?(Rackup)
require "webrick" unless defined?(WEBrick)
require "webrick/https"

Expand Down Expand Up @@ -295,7 +296,7 @@ def start_background(wait = 5)
end
)
ENV["HTTPS"] = "on" if options[:ssl]
@server.mount("/", Rack::Handler::WEBrick, app)
@server.mount("/", Rackup::Handler::WEBrick, app)

# Pick a port
# If options[:port] can be an Enumerator, an Array, or an Integer,
Expand Down