lib/sprockets/nyny/builder.rb in sprockets-nyny-0.0.1 vs lib/sprockets/nyny/builder.rb in sprockets-nyny-0.0.2
- old
+ new
@@ -3,16 +3,14 @@
module Sprockets
module NYNY
class Builder
def self.build_config config
config.assets = ActiveSupport::OrderedOptions.new
- config.assets._blocks = []
config.assets.paths = ['app/assets/javascripts',
'app/assets/stylesheets', 'app/assets/images']
config.assets.prefix = "/assets"
config.assets.precompile = [/(?:\/|\\|\A)application\.(css|js)$/]
- config.assets.version = ""
config.assets.debug = false
config.assets.compile = !::NYNY.env.production?
config.assets.digest = ::NYNY.env.production?
end
@@ -46,10 +44,10 @@
app.scope_class.assets_manifest = Sprockets::Manifest.new(manifest_path)
end
end
def self.add_hooks app
- app.before_run do |app|
+ app.before_initialize do
config = app.config
unless config.assets.version.blank?
app.assets.version += "-#{config.assets.version}"
end
\ No newline at end of file