diff --git a/collections/base/WEB-INF/web.xml.erb b/collections/http/WEB-INF/web.xml.erb similarity index 100% rename from collections/base/WEB-INF/web.xml.erb rename to collections/http/WEB-INF/web.xml.erb diff --git a/collections/base/vendor/jetty/etc/fake.crt b/collections/http/vendor/jetty/etc/fake.crt similarity index 100% rename from collections/base/vendor/jetty/etc/fake.crt rename to collections/http/vendor/jetty/etc/fake.crt diff --git a/collections/base/vendor/jetty/etc/fake.jceks b/collections/http/vendor/jetty/etc/fake.jceks similarity index 100% rename from collections/base/vendor/jetty/etc/fake.jceks rename to collections/http/vendor/jetty/etc/fake.jceks diff --git a/collections/base/vendor/jetty/etc/fake.key b/collections/http/vendor/jetty/etc/fake.key similarity index 100% rename from collections/base/vendor/jetty/etc/fake.key rename to collections/http/vendor/jetty/etc/fake.key diff --git a/collections/base/vendor/jetty/etc/fake.p12 b/collections/http/vendor/jetty/etc/fake.p12 similarity index 100% rename from collections/base/vendor/jetty/etc/fake.p12 rename to collections/http/vendor/jetty/etc/fake.p12 diff --git a/collections/base/vendor/jetty/etc/fake.pem b/collections/http/vendor/jetty/etc/fake.pem similarity index 100% rename from collections/base/vendor/jetty/etc/fake.pem rename to collections/http/vendor/jetty/etc/fake.pem diff --git a/collections/base/vendor/jetty/etc/jetty.xml.erb b/collections/http/vendor/jetty/etc/jetty.xml.erb similarity index 100% rename from collections/base/vendor/jetty/etc/jetty.xml.erb rename to collections/http/vendor/jetty/etc/jetty.xml.erb diff --git a/collections/base/vendor/jetty/jetty-init.erb b/collections/http/vendor/jetty/jetty-init.erb similarity index 100% rename from collections/base/vendor/jetty/jetty-init.erb rename to collections/http/vendor/jetty/jetty-init.erb diff --git a/collections/base/vendor/jetty/run/.gitkeep b/collections/http/vendor/jetty/run/.gitkeep similarity index 100% rename from collections/base/vendor/jetty/run/.gitkeep rename to collections/http/vendor/jetty/run/.gitkeep diff --git a/collections/base/vendor/jetty/start.ini b/collections/http/vendor/jetty/start.ini similarity index 100% rename from collections/base/vendor/jetty/start.ini rename to collections/http/vendor/jetty/start.ini diff --git a/collections/base/vendor/jetty/webapps/.gitkeep b/collections/http/vendor/jetty/webapps/.gitkeep similarity index 100% rename from collections/base/vendor/jetty/webapps/.gitkeep rename to collections/http/vendor/jetty/webapps/.gitkeep diff --git a/spec/basics_spec.rb b/spec/basics_spec.rb index b13308f..6497775 100644 --- a/spec/basics_spec.rb +++ b/spec/basics_spec.rb @@ -25,20 +25,6 @@ File.exists?("#{dest}/bin/rake").should == true end - describe "base bootstrap does too much, needs to go into another collection (+spec)" do - it "places config files" do - File.exists?("#{dest}/WEB-INF/web.xml").should == true - File.exists?("#{dest}/vendor/jetty/etc/jetty.xml").should == true - File.exists?("#{dest}/vendor/jetty/jetty-init").should == true - end - - it "places a launch script, and includes java_options" do - File.exists?("#{dest}/bin/launch").should == true - # File.read("#{dest}/bin/launch").should include("java -jar -Xmx256M") TODO - File.read("#{dest}/bin/launch").should include("start.jar") - end - end - describe "creates a ruby script that" do it "allows you to execute using the jruby jar." do rake_result = x(%{#{dest}/bin/ruby --version}) diff --git a/spec/optimize_spec.rb b/spec/optimize_spec.rb index fee3dc0..ead3b71 100644 --- a/spec/optimize_spec.rb +++ b/spec/optimize_spec.rb @@ -24,27 +24,11 @@ x!("bin/jetpack #{src} #{dest}") File.exists?("#{dest}/.jetpack-generated").should == true File.read("#{dest}/.jetpack-generated").should == -%{WEB-INF -WEB-INF/web.xml -bin +%{bin bin/.rake_runner bin/launch bin/rake bin/ruby -vendor/jetty -vendor/jetty/etc -vendor/jetty/etc/fake.crt -vendor/jetty/etc/fake.jceks -vendor/jetty/etc/fake.key -vendor/jetty/etc/fake.p12 -vendor/jetty/etc/fake.pem -vendor/jetty/etc/jetty.xml -vendor/jetty/jetty-init -vendor/jetty/run -vendor/jetty/run/.gitkeep -vendor/jetty/start.ini -vendor/jetty/webapps -vendor/jetty/webapps/.gitkeep vendor/jruby.jar } end diff --git a/spec/web_spec.rb b/spec/web_spec.rb index 351ff82..d7d7d15 100644 --- a/spec/web_spec.rb +++ b/spec/web_spec.rb @@ -8,13 +8,24 @@ before(:all) do reset FileUtils.cp_r("spec/sample_projects/webapp", "#{TEST_ROOT}/") - x!("bin/jetpack-bootstrap #{project} base") + x!("bin/jetpack-bootstrap #{project} http") @result = x!("bin/jetpack #{project} #{dest}") end after(:all) do reset end + describe "http bootstrap" do + it "places jetty config files" do + File.exists?("#{project}/config/jetpack_files/WEB-INF/web.xml.erb").should == true + File.exists?("#{project}/config/jetpack_files/vendor/jetty/etc/jetty.xml.erb").should == true + end + + it "places a launch script, and includes java_options" do + File.exists?("#{project}/config/jetpack_files/bin/launch.erb").should == true + end + end + it "will unzip jetty under vendor if jetty.xml is present" do @result[:stderr].should == "" @result[:exitstatus].should == 0