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/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..5336576 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,3 @@ -_I am looking for a new maintainer for this project. Please contact me via GitHub if you're interested._ - -# 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. +_This is a fork of the original project, from which we have cut our own gem to use with jasmine-coverage_ +Please see https://github.com/johnbintz/jasmine-headless-webkit for the original. 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.gemspec b/jasmine-headless-webkit-firstbanco.gemspec similarity index 72% rename from jasmine-headless-webkit.gemspec rename to jasmine-headless-webkit-firstbanco.gemspec index d3bd110..b284293 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.version = Jasmine::Headless::VERSION + s.name = "jasmine-headless-webkit-firstbanco" + 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"] 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" @@ -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' diff --git a/lib/jasmine/headless/task.rb b/lib/jasmine/headless/task.rb index 058a33c..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? @@ -18,15 +19,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 if @error_on_console_log + else + p "Unexpected Jasmine::Headless error code #{result}. If 127, check native extensions have been compiled." + raise Jasmine::Headless::TestFailure end end end 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