Sha256: 68feffef772a04db063692884f1aeb825e5857bb138413c3b133de6408ecfffb
Contents?: true
Size: 1.25 KB
Versions: 1
Compression:
Stored size: 1.25 KB
Contents
require 'rubygems' require 'bundler/setup' require 'sprockets' require 'sprockets-sass' require 'sprockets-helpers' require 'compass' require 'test_construct' RSpec.configure do |config| config.include TestConstruct::Helpers end Compass.configuration do |compass| compass.line_comments = false compass.output_style = :nested end # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } def compile_asset_and_return_compilation(env, public_dir, filename ) if Sprockets::Sass::Utils.version_of_sprockets < 3 manifest = Sprockets::Manifest.new(env, public_dir) else manifest = Sprockets::Manifest.new(env, public_dir, File.join(public_dir ,'manifest.json')) end manifest.compile(filename) res = File.read(File.join(public_dir, manifest.files.keys.first)) manifest.clobber res end def write_asset(filename, contents, mtime = nil) mtime ||= [Time.now.to_i, File.stat(filename).mtime.to_i].max + 1 File.open(filename, 'w') do |f| f.write(contents) end if Sprockets::Sass::Utils.version_of_sprockets >= 3 File.utime(mtime, mtime, filename) else mtime = Time.now + 1 filename.utime mtime, mtime end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sprockets-sass-2.0.0.beta1 | spec/spec_helper.rb |