2011-05-17 14:41:51 +00:00
|
|
|
require 'jasmine/headless/task'
|
|
|
|
|
2011-06-12 14:40:18 +00:00
|
|
|
module Digest
|
|
|
|
class JasmineTest
|
|
|
|
def self.file(file)
|
|
|
|
new
|
|
|
|
end
|
|
|
|
|
|
|
|
def file(file)
|
|
|
|
self
|
|
|
|
end
|
|
|
|
|
|
|
|
def hexdigest
|
|
|
|
'test'
|
|
|
|
end
|
|
|
|
|
|
|
|
def update(prefix)
|
|
|
|
self
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-05-17 14:41:51 +00:00
|
|
|
module Jasmine
|
|
|
|
module Headless
|
|
|
|
class Railtie < Rails::Railtie
|
|
|
|
rake_tasks do
|
|
|
|
Jasmine::Headless::Task.new do |t|
|
|
|
|
t.colors = true
|
|
|
|
end
|
2011-06-12 14:40:18 +00:00
|
|
|
|
|
|
|
if Rails.version >= "3.1.0"
|
|
|
|
desc 'Force generate static assets without an MD5 hash, all assets end with -test.<ext>'
|
|
|
|
task 'assets:precompile:for_testing' => :environment do
|
|
|
|
Rails.application.assets.instance_variable_set(:@digest_class, Digest::JasmineTest)
|
|
|
|
|
|
|
|
Rake::Task['assets:precompile'].invoke
|
|
|
|
end
|
|
|
|
end
|
2011-05-17 14:41:51 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|