bin/screw_unit_server in screw-unit-0.3.3 vs bin/screw_unit_server in screw-unit-0.5.1

- old
+ new

@@ -1,10 +1,20 @@ #!/usr/bin/env ruby dir = File.dirname(__FILE__) $LOAD_PATH.unshift("#{dir}/../lib") require "screw_unit" +require "thin" -spec_root_path = ARGV[0] || raise("You need to pass in a spec root") -implementation_root_path = ARGV[1] || raise("You need to pass in an implementation root") -public_path = ARGV[2] || raise("You need to pass in a public path") -ScrewUnit::Server.run(spec_root_path, implementation_root_path, public_path) +unless ENV["SCREW_UNIT_SPEC_ROOT"] + ENV["SCREW_UNIT_SPEC_ROOT"] = ARGV[0] +end + +unless ENV["SCREW_UNIT_PUBLIC"] + ENV["SCREW_UNIT_PUBLIC"] = ARGV[1] +end + +Thin::Runner.new([ + "--port", "8080", + "--rackup", File.expand_path("#{dir}/../standalone.ru"), + "start"] +).run!