Update to Sprockets 0.9.0

This commit is contained in:
Sam Stephenson 2009-02-10 11:18:24 -06:00
parent 938ac16c2d
commit 6d706084ac
2 changed files with 8 additions and 9 deletions

View File

@ -11,7 +11,6 @@ PROTOTYPE_TEST_UNIT_DIR = File.join(PROTOTYPE_TEST_DIR, 'unit')
PROTOTYPE_TMP_DIR = File.join(PROTOTYPE_TEST_UNIT_DIR, 'tmp')
PROTOTYPE_VERSION = YAML.load(IO.read(File.join(PROTOTYPE_SRC_DIR, 'constants.yml')))['PROTOTYPE_VERSION']
$:.unshift File.join(PROTOTYPE_ROOT, 'lib')
$:.unshift File.join(PROTOTYPE_ROOT, 'vendor', 'sprockets', 'lib')
task :default => [:dist, :dist_helper, :package, :clean_package_source]
@ -26,13 +25,13 @@ def sprocketize(path, source, destination = source)
puts "\nand you should be all set.\n\n"
end
environment = Sprockets::Environment.new(File.join(PROTOTYPE_ROOT, path), [File.join(PROTOTYPE_ROOT, "src")])
preprocessor = Sprockets::Preprocessor.new(environment)
preprocessor.require(environment.find(source).source_file)
File.open(File.join(PROTOTYPE_DIST_DIR, destination), 'w+') do |dist|
dist.write(preprocessor.output_file)
end
secretary = Sprockets::Secretary.new(
:root => File.join(PROTOTYPE_ROOT, path),
:load_path => [PROTOTYPE_SRC_DIR],
:source_files => [source]
)
secretary.concatenation.save_to(File.join(PROTOTYPE_DIST_DIR, destination))
end
desc "Builds the distribution."

2
vendor/sprockets vendored

@ -1 +1 @@
Subproject commit 05108e6ca76352b8954b066cf041865415fd6bf9
Subproject commit 225b17f7ee1926d6e9b63a4e2cddbcd2e534ba01