WIP
This commit is contained in:
parent
f43ffafcc0
commit
9976b47c93
18
AssetFile
18
AssetFile
|
@ -23,10 +23,20 @@ input assets.scripts do
|
|||
safe_concat assets.vendor_order, 'vendor.js'
|
||||
end
|
||||
|
||||
unless assets.production?
|
||||
match 'spec/**/*.{js,coffee}' do
|
||||
concat 'spec.js'
|
||||
end
|
||||
match 'spec/*.js' do
|
||||
concat 'spec/specs.js'
|
||||
end
|
||||
|
||||
match 'spec/support/*.js' do
|
||||
concat 'spec/support.js'
|
||||
end
|
||||
|
||||
match 'spec/vendor/*.js' do
|
||||
concat assets.spec_vendor_order, 'spec/vendor.js'
|
||||
end
|
||||
|
||||
match 'spec/{vendor,support,specs}.js' do
|
||||
concat ['spec/vendor.js', 'spec/support.js', 'spec/specs.js'], 'specs.js'
|
||||
end
|
||||
|
||||
match %r(^(?!vendor|spec).*\.js$) do
|
||||
|
|
|
@ -8,6 +8,7 @@ module Travis
|
|||
|
||||
TYPES = [:styles, :scripts, :images, :static, :vendor]
|
||||
VENDOR_ORDER = %w(jquery.min minispade handlebars ember)
|
||||
SPEC_VENDOR_ORDER = %w(jasmine jasmine-html jasmine-runner sinon)
|
||||
|
||||
attr_reader :roots, :env
|
||||
|
||||
|
@ -28,6 +29,10 @@ module Travis
|
|||
VENDOR_ORDER.map { |name| "vendor/#{name}.js" }
|
||||
end
|
||||
|
||||
def spec_vendor_order
|
||||
SPEC_VENDOR_ORDER.map { |name| "spec/vendor/#{name}.js" }
|
||||
end
|
||||
|
||||
def setup_compass
|
||||
Compass.configuration.images_path = images.first
|
||||
styles.each do |path|
|
||||
|
|
|
@ -7,13 +7,21 @@ class Travis::Web::App
|
|||
end
|
||||
|
||||
def initialize
|
||||
super([public_dir, index])
|
||||
super([public_dir, index, spec])
|
||||
end
|
||||
|
||||
def public_dir
|
||||
Rack::File.new('public')
|
||||
end
|
||||
|
||||
def spec
|
||||
proc do |env|
|
||||
status, headers, body = Rack::File.new(nil).tap { |f| f.path = 'public/spec.html' }.serving(env)
|
||||
headers.merge!(cache_headers(env['PATH_INFO']))
|
||||
[status, headers, body]
|
||||
end
|
||||
end
|
||||
|
||||
def index
|
||||
proc do |env|
|
||||
status, headers, body = Rack::File.new(nil).tap { |f| f.path = 'public/index.html' }.serving(env)
|
||||
|
|
21
public/scripts/app.min.js
vendored
21
public/scripts/app.min.js
vendored
File diff suppressed because one or more lines are too long
7887
public/scripts/specs.js
Normal file
7887
public/scripts/specs.js
Normal file
File diff suppressed because it is too large
Load Diff
34
public/spec.html
Normal file
34
public/spec.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta rel="travis.api_endpoint" href="https://api.travis-ci.org">
|
||||
<meta name="travis.pusher_key" value="23ed642e81512118260e">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Travis CI - Distributed Continuous Integration Platform for the Open Source Community</title>
|
||||
<link rel="icon" type="image/png" href="/favicon.ico">
|
||||
<link rel="stylesheet" href="/styles/app.css">
|
||||
<link rel="stylesheet" href="/styles/jasmine.css">
|
||||
<script src="/scripts/app.js"></script>
|
||||
<script>
|
||||
minispade.require('travis')
|
||||
</script>
|
||||
|
||||
<script src="/scripts/specs.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
window.cachedSearch = window.location.search;
|
||||
//minispade.require('mocks')
|
||||
|
||||
//for(key in minispade.modules)
|
||||
// if(key.match(/_spec$/))
|
||||
// minispade.require(key);
|
||||
|
||||
var console_reporter = new jasmine.ConsoleReporter();
|
||||
jasmine.getEnv().addReporter(new jasmine.HtmlReporter());
|
||||
jasmine.getEnv().addReporter(console_reporter);
|
||||
jasmine.getEnv().execute();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load Diff
|
@ -1 +1 @@
|
|||
71537665
|
||||
1f7bb007
|
Loading…
Reference in New Issue
Block a user