Compare commits

..

7 Commits

Author SHA1 Message Date
Harry Lascelles
341d4f6870 Updating docs 2014-01-11 19:17:04 +00:00
Harry Lascelles
89ec5217da Using new gem that checks the build process 2014-01-11 19:16:05 +00:00
Harry Lascelles
eca5e9c75d Locking jasmine-core as it has breaking changes 2013-12-17 13:16:06 +00:00
Harry Lascelles
dafd1e0e0e Creating own forked gem 2013-10-09 19:50:17 +01:00
Harry Lascelles
a37dde48e0 Merge remote-tracking branch 'upstream/master' 2013-10-09 19:38:48 +01:00
Harry Lascelles
fb7d864cd0 Added error on console log config 2012-07-28 12:46:22 +01:00
Harry Lascelles
8ace079731 Expanded switch statement 2012-07-28 12:39:31 +01:00
7 changed files with 30 additions and 61 deletions

View File

@ -1,3 +1,7 @@
## 0.9.0.rc.5
* Adding native extensions build check
## 0.7.2
* Improved finding of CoffeeScript spec line locations

View File

@ -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'

View File

@ -1,46 +1,3 @@
_This project is dead. You should use [Karma](http://karma-runner.github.io/) instead. I do._
# 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.

View File

@ -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__)

View File

@ -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'

View File

@ -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(
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
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

View File

@ -1,5 +1,5 @@
module Jasmine
module Headless
VERSION = "0.9.0.rc.2"
VERSION = "0.9.0.rc.3"
end
end