From 8ace079731196f66529334a422a3c040b40a13a3 Mon Sep 17 00:00:00 2001 From: Harry Lascelles Date: Sat, 28 Jul 2012 12:39:31 +0100 Subject: [PATCH 1/6] Expanded switch statement --- lib/jasmine/headless/task.rb | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/lib/jasmine/headless/task.rb b/lib/jasmine/headless/task.rb index 058a33c..23b5f4c 100644 --- a/lib/jasmine/headless/task.rb +++ b/lib/jasmine/headless/task.rb @@ -18,15 +18,19 @@ module Jasmine private def run_rake_task - case Jasmine::Headless::Runner.run( - :colors => colors, - :remove_html_file => !@keep_on_error, - :jasmine_config => @jasmine_config - ) - when 1 - raise Jasmine::Headless::TestFailure - when 2 - raise Jasmine::Headless::ConsoleLogUsage + result = Jasmine::Headless::Runner.run( + :colors => colors, + :remove_html_file => !@keep_on_error, + :jasmine_config => @jasmine_config + ) + case result + when 1 + raise Jasmine::Headless::TestFailure + when 2 + raise Jasmine::Headless::ConsoleLogUsage + else + p "Unexpected Jasmine::Headless error code #{result}" + raise Jasmine::Headless::TestFailure end end end -- 2.45.2 From fb7d864cd0ac23137f8accc7d08d082cde20ca65 Mon Sep 17 00:00:00 2001 From: Harry Lascelles Date: Sat, 28 Jul 2012 12:46:22 +0100 Subject: [PATCH 2/6] Added error on console log config --- lib/jasmine/headless/task.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/jasmine/headless/task.rb b/lib/jasmine/headless/task.rb index 23b5f4c..0344d1e 100644 --- a/lib/jasmine/headless/task.rb +++ b/lib/jasmine/headless/task.rb @@ -3,11 +3,12 @@ module Jasmine class Task include Rake::DSL if defined?(Rake::DSL) - attr_accessor :colors, :keep_on_error, :jasmine_config + attr_accessor :colors, :keep_on_error, :jasmine_config, :error_on_console_log def initialize(name = 'jasmine:headless') @colors = false @keep_on_error = false + @error_on_console_log = true @jasmine_config = nil yield self if block_given? @@ -27,9 +28,9 @@ module Jasmine when 1 raise Jasmine::Headless::TestFailure when 2 - raise Jasmine::Headless::ConsoleLogUsage + raise Jasmine::Headless::ConsoleLogUsage if @error_on_console_log else - p "Unexpected Jasmine::Headless error code #{result}" + p "Unexpected Jasmine::Headless error code #{result}. If 127, check native extensions have been compiled." raise Jasmine::Headless::TestFailure end end -- 2.45.2 From dafd1e0e0e6ba1bc5aea381d1dd10289a666d09f Mon Sep 17 00:00:00 2001 From: Harry Lascelles Date: Wed, 9 Oct 2013 19:50:17 +0100 Subject: [PATCH 3/6] Creating own forked gem --- Gemfile | 2 +- README.md | 2 +- ...bkit.gemspec => jasmine-headless-webkit-firstbanco.gemspec | 4 ++-- lib/jasmine/headless/version.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename jasmine-headless-webkit.gemspec => jasmine-headless-webkit-firstbanco.gemspec (82%) diff --git a/Gemfile b/Gemfile index b736b0d..0275c21 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source :rubygems -# Specify your gem's dependencies in jasmine-headless-webkit.gemspec +# Specify your gem's dependencies in jasmine-headless-webkit-firstbanco.gemspec gemspec gem 'rspec' diff --git a/README.md b/README.md index 18a02b2..05ed899 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -_I am looking for a new maintainer for this project. Please contact me via GitHub if you're interested._ +_This is a fork of the original project, from which we have cut our own gem to use with jasmine-coverage_ # Jasmine Headless WebKit runner diff --git a/jasmine-headless-webkit.gemspec b/jasmine-headless-webkit-firstbanco.gemspec similarity index 82% rename from jasmine-headless-webkit.gemspec rename to jasmine-headless-webkit-firstbanco.gemspec index d3bd110..48c55f5 100644 --- a/jasmine-headless-webkit.gemspec +++ b/jasmine-headless-webkit-firstbanco.gemspec @@ -3,14 +3,14 @@ $:.push File.expand_path("../lib", __FILE__) require "jasmine/headless/version" Gem::Specification.new do |s| - s.name = "jasmine-headless-webkit" + s.name = "jasmine-headless-webkit-firstbanco" s.version = Jasmine::Headless::VERSION s.platform = Gem::Platform::RUBY s.authors = ["John Bintz", "Sencha Inc.", "Pivotal Labs"] s.email = ["john@coswellproductions.com"] s.homepage = "" s.summary = %q{Run Jasmine specs headlessly in a WebKit browser} - s.description = %q{Run Jasmine specs headlessly} + s.description = %q{Run Jasmine specs headlessly. This is a fork gem that makes firstbanco deploys easier. We don't normally do this, but the original gem is defunct.} s.rubyforge_project = "jasmine-headless-webkit" diff --git a/lib/jasmine/headless/version.rb b/lib/jasmine/headless/version.rb index 2960da5..ae31fa9 100644 --- a/lib/jasmine/headless/version.rb +++ b/lib/jasmine/headless/version.rb @@ -1,5 +1,5 @@ module Jasmine module Headless - VERSION = "0.9.0.rc.2" + VERSION = "0.9.0.rc.3" end end -- 2.45.2 From eca5e9c75de1b72d41e9d1bfbd53b2369d832365 Mon Sep 17 00:00:00 2001 From: Harry Lascelles Date: Tue, 17 Dec 2013 13:16:06 +0000 Subject: [PATCH 4/6] Locking jasmine-core as it has breaking changes --- jasmine-headless-webkit-firstbanco.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jasmine-headless-webkit-firstbanco.gemspec b/jasmine-headless-webkit-firstbanco.gemspec index 48c55f5..b228b93 100644 --- a/jasmine-headless-webkit-firstbanco.gemspec +++ b/jasmine-headless-webkit-firstbanco.gemspec @@ -4,7 +4,7 @@ require "jasmine/headless/version" Gem::Specification.new do |s| s.name = "jasmine-headless-webkit-firstbanco" - s.version = Jasmine::Headless::VERSION + s.version = '0.9.0.rc.4' s.platform = Gem::Platform::RUBY s.authors = ["John Bintz", "Sencha Inc.", "Pivotal Labs"] s.email = ["john@coswellproductions.com"] @@ -20,7 +20,7 @@ Gem::Specification.new do |s| s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] - s.add_runtime_dependency 'jasmine-core' + s.add_runtime_dependency 'jasmine-core', '1.3.1' # Locking to 1.3.1. 2.0.0 is a breaking change we will have to migrate to. s.add_runtime_dependency 'coffee-script' s.add_runtime_dependency 'rainbow' s.add_runtime_dependency 'multi_json', '>= 1.2.0' -- 2.45.2 From 89ec5217dae195cdc94acf3aef9c8080b1e3fb4e Mon Sep 17 00:00:00 2001 From: Harry Lascelles Date: Sat, 11 Jan 2014 19:16:05 +0000 Subject: [PATCH 5/6] Using new gem that checks the build process --- ext/jasmine-webkit-specrunner/extconf.rb | 3 +++ jasmine-headless-webkit-firstbanco.gemspec | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/jasmine-webkit-specrunner/extconf.rb b/ext/jasmine-webkit-specrunner/extconf.rb index 6980885..79e68d3 100644 --- a/ext/jasmine-webkit-specrunner/extconf.rb +++ b/ext/jasmine-webkit-specrunner/extconf.rb @@ -7,4 +7,7 @@ require 'qt/qmake' system %{make clean} Qt::Qmake.make!('jasmine-headless-webkit', 'specrunner.pro') +# The build above can fail silently. So we check for the existence of the binary. +raise "\n***********************\nGem jasmine-headless-webkit-firstbanco failed to build. Have you got qtmake installed? On linux you need: sudo apt-get install libqtwebkit-dev qt4-dev-tools" unless File.exist?(File.expand_path('../jasmine-webkit-specrunner', __FILE__)) + FileUtils.cp File.expand_path('../Makefile.dummy', __FILE__), File.expand_path('../Makefile', __FILE__) diff --git a/jasmine-headless-webkit-firstbanco.gemspec b/jasmine-headless-webkit-firstbanco.gemspec index b228b93..b284293 100644 --- a/jasmine-headless-webkit-firstbanco.gemspec +++ b/jasmine-headless-webkit-firstbanco.gemspec @@ -4,7 +4,7 @@ require "jasmine/headless/version" Gem::Specification.new do |s| s.name = "jasmine-headless-webkit-firstbanco" - s.version = '0.9.0.rc.4' + s.version = '0.9.0.rc.5' s.platform = Gem::Platform::RUBY s.authors = ["John Bintz", "Sencha Inc.", "Pivotal Labs"] s.email = ["john@coswellproductions.com"] -- 2.45.2 From 341d4f687001753caac2d191757c5d90be1f127c Mon Sep 17 00:00:00 2001 From: Harry Lascelles Date: Sat, 11 Jan 2014 19:17:04 +0000 Subject: [PATCH 6/6] Updating docs --- CHANGELOG.md | 4 ++++ README.md | 45 +-------------------------------------------- 2 files changed, 5 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e39c4cb..52cc203 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.0.rc.5 + +* Adding native extensions build check + ## 0.7.2 * Improved finding of CoffeeScript spec line locations diff --git a/README.md b/README.md index 05ed899..5336576 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,3 @@ _This is a fork of the original project, from which we have cut our own gem to use with jasmine-coverage_ -# Jasmine Headless WebKit runner - -Run your specs at sonic boom speed! No pesky reload button or page rendering slowdowns! - -http://johnbintz.github.com/jasmine-headless-webkit/ has the most up-to-date information on using -this project. You can see the source of that site on the gh-pages branch. - -## For those who want to hack on the project... - -The best way to get everything running that you need for development and testing is -to use Guard: - -``` bash -bundle install -bundle exec guard -... build Qt runner ... -... compile CoffeeScript to JS ... -... run RSpec and JHW ... -``` - -## License - -* Copyright (c) 2011 John Bintz -* Original Qt WebKit runner Copyright (c) 2010 Sencha Inc. -* Jasmine JavaScript library Copyright (c) 2008-2011 Pivotal Labs - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - +Please see https://github.com/johnbintz/jasmine-headless-webkit for the original. -- 2.45.2