merge in changes

This commit is contained in:
John Bintz 2011-07-20 09:28:45 -04:00
commit f9e3bdfbce
9 changed files with 43 additions and 21 deletions

View File

@ -2,8 +2,7 @@
* File and line number information for failing specs * File and line number information for failing specs
* Try to build the runner if it's missing * Try to build the runner if it's missing
* Smarter directions on getting the right version of Qt installed * Kill warnings and streamline includes
* Various bugfixes for things
## 0.5.0 ## 0.5.0

View File

@ -38,3 +38,9 @@ end
task :default => [ 'spec:platforms', 'jasmine:headless' ] task :default => [ 'spec:platforms', 'jasmine:headless' ]
desc "Build the runner"
task :build do
Dir.chdir 'ext/jasmine-headless-specrunner' do
system %{ruby extconf.rb}
end
end

5
dev-bin/hooks/pre-commit Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
bundle exec rake
if [ $? -ne 0 ]; then exit 1; fi

6
dev-bin/install-hooks Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
for i in $PWD/dev-bin/hooks/*; do
ln -sf $i .git/hooks/${i##*/}
done

View File

@ -20,7 +20,7 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"] s.require_paths = ["lib"]
s.add_dependency 'jasmine', '~>1.1.beta' s.add_dependency 'jasmine-core', '~>1.1.beta'
s.add_dependency 'coffee-script', '>= 2.2' s.add_dependency 'coffee-script', '>= 2.2'
s.add_dependency 'rainbow' s.add_dependency 'rainbow'
s.add_dependency 'multi_json' s.add_dependency 'multi_json'

View File

@ -1,13 +1,4 @@
begin require 'jasmine-core'
require 'jasmine'
rescue NameError => e
if e.message['ActiveSupport::Concern']
$stderr.puts "[%s] %s (%s)" % [ "jasmine-gem".color(:red), e.message.color(:white), e.class.name.color(:yellow) ]
$stderr.puts "#{'Jasmine'.color(:red)} believes Rails 3 is available. Try using #{'Bundler'.color(:green)} and running via #{'bundle exec'.color(:green)}."
else
raise e
end
end
module Jasmine module Jasmine
class FilesList class FilesList

View File

@ -3,7 +3,6 @@ require 'jasmine/headless/options'
require 'fileutils' require 'fileutils'
require 'jasmine/base'
require 'coffee-script' require 'coffee-script'
require 'rainbow' require 'rainbow'

View File

@ -42,7 +42,7 @@ module Jasmine
private private
def create_rails_compliant_task def create_rails_compliant_task
if Rails.version >= "3.1.0" if Rails.respond_to?(:version) && Rails.version >= "3.1.0"
desc 'Force generate static assets without an MD5 hash, all assets end with -test.<ext>' desc 'Force generate static assets without an MD5 hash, all assets end with -test.<ext>'
task 'assets:precompile:for_testing' => :environment do task 'assets:precompile:for_testing' => :environment do
Rails.application.assets.digest_class = Digest::JasmineTest Rails.application.assets.digest_class = Digest::JasmineTest

View File

@ -21,6 +21,7 @@ describe Jasmine::Headless::Task do
end end
context 'with Rails' do context 'with Rails' do
context 'without version' do
before do before do
module Rails module Rails
def self.version def self.version
@ -33,6 +34,21 @@ describe Jasmine::Headless::Task do
Jasmine::Headless::Task.new('jasmine:headless') Jasmine::Headless::Task.new('jasmine:headless')
end end
end end
context 'with version' do
before do
module Rails
def self.version
return "0"
end
end
end
it 'should be OK if rails is defined' do
Jasmine::Headless::Task.new('jasmine:headless')
end
end
end
end end
describe 'jasmine:headless integration test' do describe 'jasmine:headless integration test' do