Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

Commit

Permalink
WIP - separate http collection from base
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Conover & Taylor Phillips committed Jun 14, 2012
1 parent 07e3466 commit 343e266
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 32 deletions.
File renamed without changes.
14 changes: 0 additions & 14 deletions spec/basics_spec.rb
Expand Up @@ -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})
Expand Down
18 changes: 1 addition & 17 deletions spec/optimize_spec.rb
Expand Up @@ -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
Expand Down
13 changes: 12 additions & 1 deletion spec/web_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit 343e266

Please sign in to comment.