Skip to content
This repository

Fix infinite loop and GLI-2 upgrade #200

Merged
merged 2 commits into from about 1 year ago

3 participants

Phil Webb Nick Gauthier Matthew McCullough
Phil Webb

Version 0.7.0 no longer works for me on OSX. I have two issues:

1) GLI updates

This seems to have been discussed here.

#198
#193

2) Infinite loop

For me this loop never exists:

https://github.com/schacon/showoff/blob/ae11f6a3c82e96319ed6e37ea9ae092e9d871230/lib/showoff.rb#L509

I am not a ruby developer but this fix appeared to work:

http://stackoverflow.com/questions/12072865/calling-a-sinatra-app-instance-method-from-testcase

Nick Gauthier

Thanks, worked like a charm for me.

Matthew McCullough matthewmccullough merged commit 492ba21 into from January 20, 2013
Matthew McCullough matthewmccullough closed this January 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 2 unique commits by 1 author.

Sep 23, 2012
Phil Webb Fix for GLI 2992876
Phil Webb Fix infinite loop 3a4b6bb
This page is out of date. Refresh to see the latest.
4  bin/showoff
@@ -6,7 +6,7 @@ require 'showoff/version'
6 6
 require 'rubygems'
7 7
 require 'gli'
8 8
 
9  
-include GLI
  9
+include GLI::App
10 10
 
11 11
 version SHOWOFF_VERSION
12 12
 
@@ -186,4 +186,4 @@ on_error do |exception|
186 186
   true
187 187
 end
188 188
 
189  
-exit GLI.run(ARGV)
  189
+exit run(ARGV)
6  lib/showoff.rb
@@ -503,11 +503,7 @@ def pdf(static=true)
503 503
    def self.do_static(what)
504 504
       what = "index" if !what
505 505
 
506  
-      # Nasty hack to get the actual ShowOff module
507  
-      showoff = ShowOff.new
508  
-      while !showoff.is_a?(ShowOff)
509  
-        showoff = showoff.instance_variable_get(:@app)
510  
-      end
  506
+      showoff = ShowOff.new!
511 507
       name = showoff.instance_variable_get(:@pres_name)
512 508
       path = showoff.instance_variable_get(:@root_path)
513 509
       logger = showoff.instance_variable_get(:@logger)
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.