lib/roda/plugins/assets.rb in roda-2.28.0 vs lib/roda/plugins/assets.rb in roda-2.29.0

- old
+ new

@@ -304,12 +304,13 @@ :add_suffix => false, :group_subdirs => true, :compiled_css_dir => nil, :compiled_js_dir => nil, }.freeze - EMPTY_ATTRS = {}.freeze + EMPTY_ATTRS = {}.freeze + RodaPlugins.deprecate_constant(self, :EMPTY_ATTRS) JS_END = "\"></script>".freeze RodaPlugins.deprecate_constant(self, :JS_END) CSS_END = "\" />".freeze RodaPlugins.deprecate_constant(self, :CSS_END) SPACE = ' '.freeze @@ -654,10 +655,10 @@ # the type, such as [:css, :frontend]. # # When the assets are not compiled, this will result in a separate # tag for each asset file. When the assets are compiled, this will # result in a single tag to the compiled asset file. - def assets(type, attrs = EMPTY_ATTRS) + def assets(type, attrs = OPTS) ltype = type.is_a?(Array) ? type[0] : type o = self.class.assets_opts if o[:compiled] && (algo = o[:sri]) && (hash = _compiled_assets_hash(type)) attrs = Hash[attrs]