Skip to content

Commit

Permalink
Merge pull request #144 from andersjanmyr/hack_to_get_static_to_work_…
Browse files Browse the repository at this point in the history
…again

Get the logger instance var from showoff instance
  • Loading branch information
goncalossilva committed Nov 17, 2011
2 parents 3a837e5 + 2eeee31 commit 3a8b364
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/showoff.rb
Expand Up @@ -404,6 +404,7 @@ def self.do_static(what)
end
name = showoff.instance_variable_get(:@pres_name)
path = showoff.instance_variable_get(:@root_path)
logger = showoff.instance_variable_get(:@logger)
data = showoff.send(what, true)
if data.is_a?(File)
FileUtils.cp(data.path, "#{name}.pdf")
Expand Down Expand Up @@ -449,7 +450,7 @@ def self.do_static(what)
File.open(css_path) do |file|
data = file.read
data.scan(/url\((.*)\)/).flatten.each do |path|
@logger.debug path
logger.debug path
dir = File.dirname(path)
FileUtils.makedirs(File.join(file_dir, dir))
FileUtils.copy(File.join(pres_dir, path), File.join(file_dir, path))
Expand Down

0 comments on commit 3a8b364

Please sign in to comment.