From 61241140e835d6b6dc9d7af7b0925923ebe5bdd9 Mon Sep 17 00:00:00 2001 From: Christian Williams & David Goudreau Date: Mon, 5 Oct 2009 10:19:02 -0700 Subject: [PATCH 1/7] Add no-op test:unit and test:integration tasks for EMI build only. --- Rakefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Rakefile b/Rakefile index 767a100..22974fa 100644 --- a/Rakefile +++ b/Rakefile @@ -89,6 +89,12 @@ jasmine.version_= { Rake::Task[:lambda_ci].invoke end + task :unit do + # for EMI build + end + task :integration do + # for EMI build + end end end \ No newline at end of file From cbc15d733dd1a569bec0314fb76d0884349c7162 Mon Sep 17 00:00:00 2001 From: Christian Williams & David Goudreau Date: Mon, 5 Oct 2009 10:47:26 -0700 Subject: [PATCH 2/7] Revert "Add no-op test:unit and test:integration tasks for EMI build only." This reverts commit 61241140e835d6b6dc9d7af7b0925923ebe5bdd9. --- Rakefile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Rakefile b/Rakefile index 22974fa..767a100 100644 --- a/Rakefile +++ b/Rakefile @@ -89,12 +89,6 @@ jasmine.version_= { Rake::Task[:lambda_ci].invoke end - task :unit do - # for EMI build - end - task :integration do - # for EMI build - end end end \ No newline at end of file From 6d8557608c34c477ba293cd45dbbfa27ea573cb0 Mon Sep 17 00:00:00 2001 From: Rajan Agaskar & Ryan Dy Date: Tue, 13 Oct 2009 15:12:35 -0700 Subject: [PATCH 3/7] Allow jasmine::runner to take an optional list of styesheets --- contrib/ruby/jasmine_runner.rb | 4 +++- doc/files.html | 2 +- doc/index.html | 2 +- doc/symbols/_global_.html | 2 +- doc/symbols/jasmine.Block.html | 2 +- doc/symbols/jasmine.Env.html | 2 +- doc/symbols/jasmine.JsApiReporter.html | 2 +- doc/symbols/jasmine.MultiReporter.html | 2 +- doc/symbols/jasmine.NestedResults.html | 2 +- doc/symbols/jasmine.Reporter.html | 2 +- doc/symbols/jasmine.Runner.html | 2 +- doc/symbols/jasmine.Spec.html | 2 +- doc/symbols/jasmine.Spy.html | 2 +- doc/symbols/jasmine.Suite.html | 2 +- doc/symbols/jasmine.html | 2 +- doc/symbols/jasmine.util.html | 2 +- doc/symbols/src/lib_jasmine-0.9.0.js.html | 2 +- lib/jasmine-0.9.0.js | 2 +- 18 files changed, 20 insertions(+), 18 deletions(-) diff --git a/contrib/ruby/jasmine_runner.rb b/contrib/ruby/jasmine_runner.rb index ce98c1e..6d27b6b 100644 --- a/contrib/ruby/jasmine_runner.rb +++ b/contrib/ruby/jasmine_runner.rb @@ -186,6 +186,8 @@ module Jasmine @dir_mappings = dir_mappings @jasmine_files = jasmine_files @browser = options[:browser] || 'firefox' + @stylesheets = options[:stylesheets] || [] + @selenium_pid = nil @jasmine_server_pid = nil @@ -214,7 +216,7 @@ module Jasmine @jasmine_server_pid = fork do Process.setpgrp - Jasmine::SimpleServer.start(@jasmine_server_port, @spec_files, @dir_mappings, @jasmine_files) + Jasmine::SimpleServer.start(@jasmine_server_port, @spec_files, @dir_mappings, @jasmine_files, @stylesheets) exit! 0 end puts "jasmine server started. pid is #{@jasmine_server_pid}" diff --git a/doc/files.html b/doc/files.html index e2c07cb..9aebbd2 100644 --- a/doc/files.html +++ b/doc/files.html @@ -258,7 +258,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:34 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT)
\ No newline at end of file diff --git a/doc/index.html b/doc/index.html index b31cb22..21a111f 100644 --- a/doc/index.html +++ b/doc/index.html @@ -300,7 +300,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:34 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT)
\ No newline at end of file diff --git a/doc/symbols/_global_.html b/doc/symbols/_global_.html index 95ab2d1..26453fd 100644 --- a/doc/symbols/_global_.html +++ b/doc/symbols/_global_.html @@ -908,7 +908,7 @@ A convenience method that allows existing specs to be disabled temporarily durin
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Block.html b/doc/symbols/jasmine.Block.html index e7536c2..d56c25f 100644 --- a/doc/symbols/jasmine.Block.html +++ b/doc/symbols/jasmine.Block.html @@ -339,7 +339,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Env.html b/doc/symbols/jasmine.Env.html index 5a0113e..3383b6d 100644 --- a/doc/symbols/jasmine.Env.html +++ b/doc/symbols/jasmine.Env.html @@ -507,7 +507,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.JsApiReporter.html b/doc/symbols/jasmine.JsApiReporter.html index 1c3ab1d..4ec6569 100644 --- a/doc/symbols/jasmine.JsApiReporter.html +++ b/doc/symbols/jasmine.JsApiReporter.html @@ -316,7 +316,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.MultiReporter.html b/doc/symbols/jasmine.MultiReporter.html index 505481e..aa4c810 100644 --- a/doc/symbols/jasmine.MultiReporter.html +++ b/doc/symbols/jasmine.MultiReporter.html @@ -316,7 +316,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.NestedResults.html b/doc/symbols/jasmine.NestedResults.html index 84abe18..1fdedfb 100644 --- a/doc/symbols/jasmine.NestedResults.html +++ b/doc/symbols/jasmine.NestedResults.html @@ -700,7 +700,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Reporter.html b/doc/symbols/jasmine.Reporter.html index 45b5260..0c19fbe 100644 --- a/doc/symbols/jasmine.Reporter.html +++ b/doc/symbols/jasmine.Reporter.html @@ -316,7 +316,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Runner.html b/doc/symbols/jasmine.Runner.html index 31dd340..150c159 100644 --- a/doc/symbols/jasmine.Runner.html +++ b/doc/symbols/jasmine.Runner.html @@ -418,7 +418,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Spec.html b/doc/symbols/jasmine.Spec.html index 5974b47..76ea4c8 100644 --- a/doc/symbols/jasmine.Spec.html +++ b/doc/symbols/jasmine.Spec.html @@ -396,7 +396,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Spy.html b/doc/symbols/jasmine.Spy.html index 235cd81..f11d83c 100644 --- a/doc/symbols/jasmine.Spy.html +++ b/doc/symbols/jasmine.Spy.html @@ -845,7 +845,7 @@ expect(foo.bar.callCount).toEqual(0);
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:34 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Suite.html b/doc/symbols/jasmine.Suite.html index 43a3c6d..7c62201 100644 --- a/doc/symbols/jasmine.Suite.html +++ b/doc/symbols/jasmine.Suite.html @@ -436,7 +436,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:34 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.html b/doc/symbols/jasmine.html index 3064179..9328f40 100644 --- a/doc/symbols/jasmine.html +++ b/doc/symbols/jasmine.html @@ -728,7 +728,7 @@ Jasmine environment.
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.util.html b/doc/symbols/jasmine.util.html index 66bbe36..979d846 100644 --- a/doc/symbols/jasmine.util.html +++ b/doc/symbols/jasmine.util.html @@ -316,7 +316,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:34 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT)
diff --git a/doc/symbols/src/lib_jasmine-0.9.0.js.html b/doc/symbols/src/lib_jasmine-0.9.0.js.html index a077a2a..b077621 100644 --- a/doc/symbols/src/lib_jasmine-0.9.0.js.html +++ b/doc/symbols/src/lib_jasmine-0.9.0.js.html @@ -529,7 +529,7 @@ 522 "major": 0, 523 "minor": 9, 524 "build": 0, -525 "revision": 1255469309 +525 "revision": 1255470394 526 }; 527 /** 528 * @namespace diff --git a/lib/jasmine-0.9.0.js b/lib/jasmine-0.9.0.js index 3e8825a..b403f9e 100644 --- a/lib/jasmine-0.9.0.js +++ b/lib/jasmine-0.9.0.js @@ -522,7 +522,7 @@ jasmine.version_= { "major": 0, "minor": 9, "build": 0, - "revision": 1255470394 + "revision": 1255471725 }; /** * @namespace From e7865295ddba6aca5bd41dd52c3cbe863c2e6489 Mon Sep 17 00:00:00 2001 From: Rajan Agaskar & Ryan Dy Date: Tue, 13 Oct 2009 15:14:07 -0700 Subject: [PATCH 4/7] Revert "Allow jasmine::runner to take an optional list of styesheets" This reverts commit 6d8557608c34c477ba293cd45dbbfa27ea573cb0. --- contrib/ruby/jasmine_runner.rb | 4 +--- doc/files.html | 2 +- doc/index.html | 2 +- doc/symbols/_global_.html | 2 +- doc/symbols/jasmine.Block.html | 2 +- doc/symbols/jasmine.Env.html | 2 +- doc/symbols/jasmine.JsApiReporter.html | 2 +- doc/symbols/jasmine.MultiReporter.html | 2 +- doc/symbols/jasmine.NestedResults.html | 2 +- doc/symbols/jasmine.Reporter.html | 2 +- doc/symbols/jasmine.Runner.html | 2 +- doc/symbols/jasmine.Spec.html | 2 +- doc/symbols/jasmine.Spy.html | 2 +- doc/symbols/jasmine.Suite.html | 2 +- doc/symbols/jasmine.html | 2 +- doc/symbols/jasmine.util.html | 2 +- doc/symbols/src/lib_jasmine-0.9.0.js.html | 2 +- lib/jasmine-0.9.0.js | 2 +- 18 files changed, 18 insertions(+), 20 deletions(-) diff --git a/contrib/ruby/jasmine_runner.rb b/contrib/ruby/jasmine_runner.rb index 6d27b6b..ce98c1e 100644 --- a/contrib/ruby/jasmine_runner.rb +++ b/contrib/ruby/jasmine_runner.rb @@ -186,8 +186,6 @@ module Jasmine @dir_mappings = dir_mappings @jasmine_files = jasmine_files @browser = options[:browser] || 'firefox' - @stylesheets = options[:stylesheets] || [] - @selenium_pid = nil @jasmine_server_pid = nil @@ -216,7 +214,7 @@ module Jasmine @jasmine_server_pid = fork do Process.setpgrp - Jasmine::SimpleServer.start(@jasmine_server_port, @spec_files, @dir_mappings, @jasmine_files, @stylesheets) + Jasmine::SimpleServer.start(@jasmine_server_port, @spec_files, @dir_mappings, @jasmine_files) exit! 0 end puts "jasmine server started. pid is #{@jasmine_server_pid}" diff --git a/doc/files.html b/doc/files.html index 9aebbd2..e2c07cb 100644 --- a/doc/files.html +++ b/doc/files.html @@ -258,7 +258,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:34 GMT-0700 (PDT)
\ No newline at end of file diff --git a/doc/index.html b/doc/index.html index 21a111f..b31cb22 100644 --- a/doc/index.html +++ b/doc/index.html @@ -300,7 +300,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:34 GMT-0700 (PDT)
\ No newline at end of file diff --git a/doc/symbols/_global_.html b/doc/symbols/_global_.html index 26453fd..95ab2d1 100644 --- a/doc/symbols/_global_.html +++ b/doc/symbols/_global_.html @@ -908,7 +908,7 @@ A convenience method that allows existing specs to be disabled temporarily durin
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Block.html b/doc/symbols/jasmine.Block.html index d56c25f..e7536c2 100644 --- a/doc/symbols/jasmine.Block.html +++ b/doc/symbols/jasmine.Block.html @@ -339,7 +339,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Env.html b/doc/symbols/jasmine.Env.html index 3383b6d..5a0113e 100644 --- a/doc/symbols/jasmine.Env.html +++ b/doc/symbols/jasmine.Env.html @@ -507,7 +507,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.JsApiReporter.html b/doc/symbols/jasmine.JsApiReporter.html index 4ec6569..1c3ab1d 100644 --- a/doc/symbols/jasmine.JsApiReporter.html +++ b/doc/symbols/jasmine.JsApiReporter.html @@ -316,7 +316,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.MultiReporter.html b/doc/symbols/jasmine.MultiReporter.html index aa4c810..505481e 100644 --- a/doc/symbols/jasmine.MultiReporter.html +++ b/doc/symbols/jasmine.MultiReporter.html @@ -316,7 +316,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.NestedResults.html b/doc/symbols/jasmine.NestedResults.html index 1fdedfb..84abe18 100644 --- a/doc/symbols/jasmine.NestedResults.html +++ b/doc/symbols/jasmine.NestedResults.html @@ -700,7 +700,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Reporter.html b/doc/symbols/jasmine.Reporter.html index 0c19fbe..45b5260 100644 --- a/doc/symbols/jasmine.Reporter.html +++ b/doc/symbols/jasmine.Reporter.html @@ -316,7 +316,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Runner.html b/doc/symbols/jasmine.Runner.html index 150c159..31dd340 100644 --- a/doc/symbols/jasmine.Runner.html +++ b/doc/symbols/jasmine.Runner.html @@ -418,7 +418,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Spec.html b/doc/symbols/jasmine.Spec.html index 76ea4c8..5974b47 100644 --- a/doc/symbols/jasmine.Spec.html +++ b/doc/symbols/jasmine.Spec.html @@ -396,7 +396,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Spy.html b/doc/symbols/jasmine.Spy.html index f11d83c..235cd81 100644 --- a/doc/symbols/jasmine.Spy.html +++ b/doc/symbols/jasmine.Spy.html @@ -845,7 +845,7 @@ expect(foo.bar.callCount).toEqual(0);
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:34 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.Suite.html b/doc/symbols/jasmine.Suite.html index 7c62201..43a3c6d 100644 --- a/doc/symbols/jasmine.Suite.html +++ b/doc/symbols/jasmine.Suite.html @@ -436,7 +436,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:34 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.html b/doc/symbols/jasmine.html index 9328f40..3064179 100644 --- a/doc/symbols/jasmine.html +++ b/doc/symbols/jasmine.html @@ -728,7 +728,7 @@ Jasmine environment.
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:33 GMT-0700 (PDT)
diff --git a/doc/symbols/jasmine.util.html b/doc/symbols/jasmine.util.html index 979d846..66bbe36 100644 --- a/doc/symbols/jasmine.util.html +++ b/doc/symbols/jasmine.util.html @@ -316,7 +316,7 @@ ul.inheritsList
- Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 15:08:45 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Oct 13 2009 14:46:34 GMT-0700 (PDT)
diff --git a/doc/symbols/src/lib_jasmine-0.9.0.js.html b/doc/symbols/src/lib_jasmine-0.9.0.js.html index b077621..a077a2a 100644 --- a/doc/symbols/src/lib_jasmine-0.9.0.js.html +++ b/doc/symbols/src/lib_jasmine-0.9.0.js.html @@ -529,7 +529,7 @@ 522
"major": 0, 523 "minor": 9, 524 "build": 0, -525 "revision": 1255470394 +525 "revision": 1255469309 526 }; 527 /** 528 * @namespace diff --git a/lib/jasmine-0.9.0.js b/lib/jasmine-0.9.0.js index b403f9e..3e8825a 100644 --- a/lib/jasmine-0.9.0.js +++ b/lib/jasmine-0.9.0.js @@ -522,7 +522,7 @@ jasmine.version_= { "major": 0, "minor": 9, "build": 0, - "revision": 1255471725 + "revision": 1255470394 }; /** * @namespace From beddbaf5c7efbd0891a3bdb042c033bc6643ce16 Mon Sep 17 00:00:00 2001 From: Rajan Agaskar & Ryan Dy Date: Wed, 14 Oct 2009 10:28:23 -0700 Subject: [PATCH 5/7] update jasmine runner to take focus spec --- contrib/ruby/jasmine_runner.rb | 67 ++++++++++++++++++++++++++-------- contrib/ruby/run.html | 4 ++ 2 files changed, 56 insertions(+), 15 deletions(-) diff --git a/contrib/ruby/jasmine_runner.rb b/contrib/ruby/jasmine_runner.rb index 6d27b6b..98f241a 100644 --- a/contrib/ruby/jasmine_runner.rb +++ b/contrib/ruby/jasmine_runner.rb @@ -61,25 +61,32 @@ module Jasmine end class RunAdapter - def initialize(spec_files_or_proc, jasmine_files = nil, stylesheets = []) - @spec_files_or_proc = spec_files_or_proc - @jasmine_files = jasmine_files || [ + def initialize(spec_files_or_proc, options = {}) + @spec_files_or_proc = Jasmine.files(spec_files_or_proc) + @jasmine_files = options[:jasmine_files] || [ "/__JASMINE_ROOT__/lib/" + File.basename(Dir.glob("#{Jasmine.root}/lib/jasmine*.js").first), "/__JASMINE_ROOT__/lib/TrivialReporter.js", "/__JASMINE_ROOT__/lib/json2.js" ] - @stylesheets = ["/__JASMINE_ROOT__/lib/jasmine.css"] + stylesheets + @stylesheets = ["/__JASMINE_ROOT__/lib/jasmine.css"] + (Jasmine.files(options[:stylesheets])) + @spec_helpers = Jasmine.files(options[:spec_helpers]) end def call(env) + run + end + + def run + stylesheets = @stylesheets + spec_helpers = @spec_helpers spec_files = @spec_files_or_proc - spec_files = spec_files.call if spec_files.respond_to?(:call) jasmine_files = @jasmine_files jasmine_files = jasmine_files.call if jasmine_files.respond_to?(:call) css_files = @stylesheets + body = ERB.new(File.read(File.join(File.dirname(__FILE__), "run.html"))).result(binding) [ 200, @@ -87,6 +94,8 @@ module Jasmine body ] end + + end class Redirect @@ -113,13 +122,36 @@ module Jasmine end end - class SimpleServer - def self.start(port, spec_files_or_proc, mappings, jasmine_files = nil, stylesheets = []) - require 'thin' + class FocusedSuite + def initialize(spec_files_or_proc, options) + @spec_files_or_proc = Jasmine.files(spec_files_or_proc) + @options = options + end + def call(env) + spec_files = @spec_files_or_proc + matching_specs = spec_files.select {|spec_file| spec_file =~ /#{Regexp.escape(env["PATH_INFO"])}/ }.compact + if !matching_specs.empty? + run_adapter = Jasmine::RunAdapter.new(matching_specs, @options) + run_adapter.run + else + [ + 200, + { 'Content-Type' => 'application/javascript' }, + "document.write('

Couldn\\'t find any specs matching #{env["PATH_INFO"]}!

');" + ] + end + end + + end + + class SimpleServer + def self.start(port, spec_files_or_proc, mappings, options) + require 'thin' config = { + '/suites' => Jasmine::FocusedSuite.new(spec_files_or_proc, options), '/run.html' => Jasmine::Redirect.new('/'), - '/' => Jasmine::RunAdapter.new(spec_files_or_proc, jasmine_files, stylesheets) + '/' => Jasmine::RunAdapter.new(spec_files_or_proc, options) } mappings.each do |from, to| config[from] = Rack::File.new(to) @@ -180,15 +212,13 @@ module Jasmine end class Runner - def initialize(selenium_jar_path, spec_files, dir_mappings, jasmine_files = nil, options={}) + def initialize(selenium_jar_path, spec_files, dir_mappings, options={}) @selenium_jar_path = selenium_jar_path @spec_files = spec_files @dir_mappings = dir_mappings - @jasmine_files = jasmine_files - @browser = options[:browser] || 'firefox' - @stylesheets = options[:stylesheets] || [] - + @options = options + @browser = options[:browser] ? options[:browser].delete(:browser) : 'firefox' @selenium_pid = nil @jasmine_server_pid = nil end @@ -216,7 +246,7 @@ module Jasmine @jasmine_server_pid = fork do Process.setpgrp - Jasmine::SimpleServer.start(@jasmine_server_port, @spec_files, @dir_mappings, @jasmine_files, @stylesheets) + Jasmine::SimpleServer.start(@jasmine_server_port, @spec_files, @dir_mappings, @options) exit! 0 end puts "jasmine server started. pid is #{@jasmine_server_pid}" @@ -246,4 +276,11 @@ module Jasmine @client.eval_js(script) end end + + def self.files(f) + result = f + result = result.call if result.respond_to?(:call) + result || [] + end + end diff --git a/contrib/ruby/run.html b/contrib/ruby/run.html index ec6e89f..4eee83b 100644 --- a/contrib/ruby/run.html +++ b/contrib/ruby/run.html @@ -11,6 +11,10 @@ <% end %> + <% spec_helpers.each do |spec_helper| %> + + <% end %> +