Add warning to SpecRunner.html when running from non-built source.

This commit is contained in:
Christian Williams 2010-07-27 18:47:12 -07:00
parent 15955df258
commit 6562b5a3b4
2 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@ task :default => 'jasmine:dist'
def substitute_jasmine_version(filename) def substitute_jasmine_version(filename)
contents = File.read(filename) contents = File.read(filename)
contents = contents.gsub(/##JASMINE_VERSION##/, (jasmine_version)) contents = contents.gsub(/##JASMINE_VERSION##/, (jasmine_version))
contents = contents.gsub(/[^\n]*REMOVE_THIS_LINE_FROM_BUILD[^\n]*/, '')
File.open(filename, 'w') { |f| f.write(contents) } File.open(filename, 'w') { |f| f.write(contents) }
end end

View File

@ -17,6 +17,7 @@
</head> </head>
<body> <body>
<div id="REMOVE_THIS_LINE_FROM_BUILD"><p>You must be trying to look at examples in the Jasmine source tree.</p><p>Please download a distribution version of Jasmine at <a href="http://pivotal.github.com/jasmine/">http://pivotal.github.com/jasmine/</a>.</p></div>
<script type="text/javascript"> <script type="text/javascript">
jasmine.getEnv().addReporter(new jasmine.TrivialReporter()); jasmine.getEnv().addReporter(new jasmine.TrivialReporter());
jasmine.getEnv().execute(); jasmine.getEnv().execute();
@ -24,4 +25,3 @@
</body> </body>
</html> </html>