Skip to content
This repository

Get the logger instance var from showoff instance #144

Merged
merged 1 commit into from over 2 years ago

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 :)

Martin Grund grundprinzip referenced this pull request
Closed

Giant Merge #150

Gonçalo Silva goncalossilva merged commit 3a8b364 into from
Gonçalo Silva goncalossilva closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Oct 22, 2011
Anders Janmyr Get the logger instance var from showoff instance 2eeee31
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  lib/showoff.rb
3  lib/showoff.rb
@@ -406,6 +406,7 @@ def self.do_static(what)
406 406
       end
407 407
       name = showoff.instance_variable_get(:@pres_name)
408 408
       path = showoff.instance_variable_get(:@root_path)
  409
+      logger = showoff.instance_variable_get(:@logger)
409 410
       data = showoff.send(what, true)
410 411
       if data.is_a?(File)
411 412
         FileUtils.cp(data.path, "#{name}.pdf")
@@ -451,7 +452,7 @@ def self.do_static(what)
451 452
           File.open(css_path) do |file|
452 453
             data = file.read
453 454
             data.scan(/url\((.*)\)/).flatten.each do |path|
454  
-              @logger.debug path
  455
+              logger.debug path
455 456
               dir = File.dirname(path)
456 457
               FileUtils.makedirs(File.join(file_dir, dir))
457 458
               FileUtils.copy(File.join(pres_dir, path), File.join(file_dir, path))
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.