lib/slideshow/helpers/syntax/uv_helper.rb in slideshow-1.1.0.beta7 vs lib/slideshow/helpers/syntax/uv_helper.rb in slideshow-1.1.0.beta8

- old
+ new

@@ -22,21 +22,21 @@ # first time? copy all uv built-in themes (css styles) to temporary cache (~/.slideshow/*) uv_first_time = session.fetch( :uv_first_time, true ) if uv_first_time session[ :uv_first_time ] = false - logger.debug "cache_dir=#{cache_dir}" + logger.debug "cache_dir=#{config.cache_dir}" - FileUtils.mkdir(cache_dir) unless File.exists?(cache_dir) if cache_dir - Uv.copy_files "xhtml", cache_dir + FileUtils.mkdir(config.cache_dir) unless File.exists?(config.cache_dir) if config.cache_dir + Uv.copy_files "xhtml", config.cache_dir end # first time this theme gets used add it to content_for hash for templates to include uv_themes = session[ :uv_themes ] ||= {} if uv_themes[ theme ].nil? uv_themes[ theme ] = true - theme_content = File.read( "#{cache_dir}/css/#{theme}.css" ) + theme_content = File.read( "#{config.cache_dir}/css/#{theme}.css" ) theme_out = %{/* styles for ultraviolet code syntax highlighting theme '#{theme}' */\n\n} theme_out << theme_content theme_out << %{\n\n} \ No newline at end of file