lib/roda/plugins/assets.rb in roda-1.2.0 vs lib/roda/plugins/assets.rb in roda-1.3.0

- old
+ new

@@ -195,21 +195,21 @@ # :compiled_path:: Path inside public folder in which compiled files are stored (default: :prefix) # :concat_only :: Whether to just concatenate instead of concatentating # and compressing files (default: false) # :css_dir :: Directory name containing your css source, inside :path (default: 'css') # :css_headers :: A hash of additional headers for your rendered css files - # :css_opts :: Template options to pass to the render plugin (via :opts) when rendering css assets + # :css_opts :: Template options to pass to the render plugin (via :template_opts) when rendering css assets # :css_route :: Route under :prefix for css assets (default: :css_dir) # :dependencies :: A hash of dependencies for your asset files. Keys should be paths to asset files, # values should be arrays of paths your asset files depends on. This is used to # detect changes in your asset files. # :group_subdirs :: Whether a hash used in :css and :js options requires the assets for the # related group are contained in a subdirectory with the same name (default: true) # :headers :: A hash of additional headers for both js and css rendered files # :js_dir :: Directory name containing your javascript source, inside :path (default: 'js') # :js_headers :: A hash of additional headers for your rendered javascript files - # :js_opts :: Template options to pass to the render plugin (via :opts) when rendering javascript assets + # :js_opts :: Template options to pass to the render plugin (via :template_opts) when rendering javascript assets # :js_route :: Route under :prefix for javascript assets (default: :js_dir) # :path :: Path to your asset source directory (default: 'assets') # :prefix :: Prefix for assets path in your URL/routes (default: 'assets') # :precompiled :: Path to the compiled asset metadata file. If the file exists, will use compiled # mode using the metadata in the file. If the file does not exist, will use @@ -240,11 +240,11 @@ JS_SUFFIX = '.js'.freeze CSS_SUFFIX = '.css'.freeze # Load the render and caching plugins plugins, since the assets plugin # depends on them. - def self.load_dependencies(app, _opts = {}) + def self.load_dependencies(app, _opts = nil) app.plugin :render app.plugin :caching end # Setup the options for the plugin. See the Assets module RDoc @@ -518,10 +518,10 @@ # the relative path to the file from the current directory. def read_asset_file(file, type) if file.end_with?(".#{type}") ::File.read(file) else - render_asset_file(file, :opts=>self.class.assets_opts[:"#{type}_opts"]) + render_asset_file(file, :template_opts=>self.class.assets_opts[:"#{type}_opts"]) end end private