Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Get the logger instance var from showoff instance #144

Merged
merged 1 commit into from

3 participants

Anders Janmyr Ulric Wilfred Gonçalo Silva
Anders Janmyr

Fixes: error: undefined method `debug' for nil:NilClass

Ulric Wilfred

Thank you, your patch helped me! [and I think it is urgent to include it in official showoff version because no statics can be made without it]

Anders Janmyr

No problem, I needed the fix myself :)

Gonçalo Silva goncalossilva merged commit 3a8b364 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 22, 2011
  1. Anders Janmyr
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/showoff.rb
3  lib/showoff.rb
View
@@ -406,6 +406,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")
@@ -451,7 +452,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))
Something went wrong with that request. Please try again.