a few fixes for the binary, handles jasmine defaults now
This commit is contained in:
parent
f6aa2d0ac0
commit
1156f5c1ec
@ -12,15 +12,24 @@ files = [
|
|||||||
'file://' + File.join(gem_dir, 'jasmine/lib/jasmine.css')
|
'file://' + File.join(gem_dir, 'jasmine/lib/jasmine.css')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
DEFAULTS = {
|
||||||
|
'spec_files' => [ '**/*[sS]pec.js' ],
|
||||||
|
'helpers' => [ 'helpers/**/*.js' ]
|
||||||
|
}
|
||||||
|
|
||||||
files += [ [ 'src_files', 'src_dir' ], [ 'stylesheets', 'src_dir' ], [ 'helpers', 'spec_dir' ], [ 'spec_files', 'spec_dir' ] ].collect do |searches, root|
|
files += [ [ 'src_files', 'src_dir' ], [ 'stylesheets', 'src_dir' ], [ 'helpers', 'spec_dir' ], [ 'spec_files', 'spec_dir' ] ].collect do |searches, root|
|
||||||
|
data[searches] ||= DEFAULTS[searches]
|
||||||
|
|
||||||
|
if data[searches]
|
||||||
data[searches].collect do |search|
|
data[searches].collect do |search|
|
||||||
path = search
|
path = search
|
||||||
path = File.join(data[root], path) if data[root]
|
path = File.join(data[root], path) if data[root]
|
||||||
Dir[path]
|
Dir[path]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
files = files.flatten.collect { |file|
|
files = files.flatten.compact.collect { |file|
|
||||||
case File.extname(file)
|
case File.extname(file)
|
||||||
when '.js'
|
when '.js'
|
||||||
%{<script type="text/javascript" src="#{file}"></script>}
|
%{<script type="text/javascript" src="#{file}"></script>}
|
||||||
|
Loading…
Reference in New Issue
Block a user