-
Notifications
You must be signed in to change notification settings - Fork 102
Fork Merge Work Area
jamesyu: Handle IE’s 31 style tag limit in development mode by using @import
I added some code to handle IE style tag limitations (31 limit)
Not sure if this is something you want asset packager to care about. Certainly, in my project, we have more than 31 stylesheets, and, in development mode (where we don’t merge stylesheets), IE will just silently drop styles. Using @import avoids this.
View repository
(similar to above)
sermo: limitation in IE where it can only include a max of 30 stylesheets
Hi there, I put a fix in asset_packager to address the limitation in IE where it can only include a max of 30 stylesheets. Our ruby projects have many views and are using many css fragments to maintain manageability. In dev mode packaging is turned off to enable speedy development. The work around in IE is to use the @import statement. We feel this fix will be beneficial to others.
View repository
tithonium: Expand stylesheets included via @import when creating merged stylesheets
we ran into a problem wherein we’re packaging a stylesheet that @import’s a bunch of other stylesheets. When we package it, it’s not expanding the imports
I threw together a quick hack to handle this, by reading stylesheets, looking for @import lines, and recursing into them, before passing them back to merged_file.
View repository
rstacruz: spaces in project folder
We were using asset packager for a project we’re working on, and I noticed it threw some shell errors because my project folder had spaces in it. I think this will fix it… I think. ;)
View repository
retr0h: Fixed NoMethodError: undefined method `assert_dom_equal’ in tests.
View repository
cainlevy: test cleanup / ability to run tests without a parent Rails application. passing tests in Rails 2.3.4
View repository
adzap: ability to run tests without a parent rails application
View repository
bschwartz: Ruby 1.9 compatibility fix
View repository
rainux: Fix relative URLs in stylesheets when merging – includes tests
View repository
byped: calculate the path to jsmin.rb relative to the file it gets included from, which allows it to be used independent of where the plugin is located
I made this branch to fix an issue we were running into when using asset packager from within a custom engines-like tool. The actual asset packager install directory wasn’t in the rails tree, so determining the path to jsmin.rb using RAILS_ROOT wasn’t working.
I’ve updated it to calculate the path to jsmin.rb relative to the file it gets included from, which allows it to be used independent of where the plugin is located.
This is probably a minority use case but it might well be useful to someone else using asset packager in a similar way, so let me know if there’s anything I can do to help this get included upstream.
View repository
phallstrom: handle case where an asset contains a period – includes tests
Rails will not append the extension in this case so in development the asset will not be loaded. Production is not affected.
View repository
phallstrom: specify fully qualified paths, disable JS compression
The first lets you specify fully qualified paths (ie. ‘/not-beneath-javascripts/sample’) in the YML file. I did this so that I can drop in some pre-packaged JS/CSS/images and reference them as-is.
The second lets you set ‘Synthesis::AssetPackage.compress_js_file = false’. If it’s false it won’t run the packaged JS through the minimizer. It defaults to true. I did this because the minimized version was throwing an error and the savings weren’t worth the effort of figuring out why.
View repository
dolzenko: Keep asset:packager:build_all task from crashing when RAILS_ROOT path contains spaces
View repository
kennon: Prevent application error when config/asset_packages.yml is missing
View repository
eandrejko: fixed a bug with multiline CSS comments
This bug changed the compressed CSS content if a multiline comment was followed by a single line comment.
View repository
eandrejko: YUI Compressor, and a few other misc items
View repository
brandonaaron: YUI Compressor
View repository
tokumine: Google Closure JS compilation
Just a quick heads up to let you know I added Google Closure JS compilation via the api to asset_packager stable. It falls back to jsmin if the compilation throws any errors, but does increase the amount of time the rake task runs substantially. The JS has to be sent individually to Google then reassembled (api source size < 195KB). Tests pass.
View repository
decodeideas: Version assets on the Amazon CDN
I added some patches to be able to version assets on the Amazon CDN. There are 3 parts to my workflow:
1. shell script (checked in) to generate a timestamp that is saved in a yaml file and used to build subfolders for the packaged files
2. small class (not checked in) that loads the yaml file and passes the version to the *merged classes
3. code changes (checked in) to use the versioned folder when building the URL
View repository
erikstmartin: asset_hosts & cache buster
1) It will determine last modified timestamps for files and append them to image urls in CSS files for cache busting
2) Determine the absolute path of a media file and use that inside the bundled version of the CSS so that relative paths to media (../images) do not break when the bundled file is placed in a parent directory
3) Peeks at the current rails environments config for an asset_host, and uses the same logic as rails to determine the asset host for a particular media file referenced in the CSS file. So CSS files can now benefit from asset_hosts
Blog post
View Repository
willbailey: preprocess asset_packages.yml with ERB
This allows you to define environment conditional packages (e.g. a debugging tool in the dev environment)
View Repository
metavida: ability to include license information in the compressed JavaScript files – includes tests
View repository
retr0h: Fixed NoMethodError: undefined method `assert_dom_equal’ – necessary to get tests running
fnando: Rails 3 Fixes
I removed Rails 3 complaints about RAILS_ROOT environment, moved the tasks directory and returned a safe HTML when available.
View repository
(similar as above)
rlivsey: Rails 3 Fixes
Rails 3 currently works fine as long as using the fork_queue_integration branch, but it outputs a bunch of warnings due to it using RAILS_ROOT and RAILS_ENV instead of Rails.root and Rails.env respectively.
View repository
sinefunc: Rails 3 / Ruby 1.9 compatibility fixes
View repository
sandofsky: This patch seems to solve a bug that prevents Rails from running in threadsafe mode.
View repository