From 148317eb902907c311f680bad2f412708cf4b543 Mon Sep 17 00:00:00 2001 From: "Davis W. Frank" Date: Sun, 27 Feb 2011 12:26:38 -0800 Subject: [PATCH] 1.0.2, finishing to Frank for static pages --- Rakefile | 44 +++++++++++++++++--------------------------- lib/jasmine.js | 4 ++-- pages | 2 +- 3 files changed, 20 insertions(+), 30 deletions(-) diff --git a/Rakefile b/Rakefile index 18d4f03..be148fa 100644 --- a/Rakefile +++ b/Rakefile @@ -29,7 +29,11 @@ end namespace :jasmine do desc 'Prepares for distribution' - task :dist => ['jasmine:build', 'jasmine:doc', 'jasmine:build_example_project', 'jasmine:fill_index_downloads'] + task :dist => ['jasmine:build', + 'jasmine:doc', + 'jasmine:build_pages', + 'jasmine:build_example_project', + 'jasmine:fill_index_downloads'] desc 'Check jasmine sources for coding problems' task :lint do @@ -98,6 +102,18 @@ jasmine.version_= { end end + desc "Build the Github pages HTML" + task :build_pages => :need_pages_submodule do + Dir.chdir("pages") do + FileUtils.rm_r('pages_output') if File.exist?('pages_output') + Dir.chdir('pages_source') do + system("frank export ../pages_output") + end + puts "\nCopying Frank output to the root of the gh-pages branch\n\n" + system("cp -r pages_output/* .") + end + end + desc "Build jasmine documentation" task :doc => :need_pages_submodule do puts 'Creating Jasmine Documentation' @@ -151,32 +167,6 @@ jasmine.version_= { exec "cd #{temp_dir} && zip -r #{zip_file_name} . -x .[a-zA-Z0-9]*" end - task :fill_index_downloads do - require 'digest/sha1' - - download_html = "\n" - Dir.glob('pages/downloads/*.zip').sort.reverse.each do |f| - sha1 = Digest::SHA1.hexdigest File.read(f) - - fn = f.sub(/^pages\//, '') - version = /jasmine-standalone-(.*).zip/.match(f)[1] - prerelease = /\.rc/.match(f) - download_html += prerelease ? "\n" : "\n" - download_html += " #{fn.sub(/downloads\//, '')}\n" - download_html += " #{version}\n" - download_html += " #{File.size(f) / 1024}k\n" - download_html += " #{File.mtime(f).strftime("%Y/%m/%d %H:%M:%S %Z")}\n" - download_html += " #{sha1}\n" - download_html += "\n" - end - download_html += "" - - downloads_page = File.read(downloads_file) - matcher = /.*/m - downloads_page = downloads_page.sub(matcher, download_html) - File.open(downloads_file, 'w') {|f| f.write(downloads_page)} - puts "rewrote that file" - end end task :jasmine => ['jasmine:dist'] diff --git a/lib/jasmine.js b/lib/jasmine.js index 33605c1..63e415d 100644 --- a/lib/jasmine.js +++ b/lib/jasmine.js @@ -2416,6 +2416,6 @@ jasmine.getGlobal().clearInterval = function(timeoutKey) { jasmine.version_= { "major": 1, "minor": 0, - "build": 1, - "revision": 1298566700 + "build": 2, + "revision": 1298837858 }; diff --git a/pages b/pages index ae5da67..e7860d2 160000 --- a/pages +++ b/pages @@ -1 +1 @@ -Subproject commit ae5da671e3b47e3846ced7371722e9b5c6204e75 +Subproject commit e7860d25a8b5f592222a40ab24f8464608bbd4d0