Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix infinite loop and GLI-2 upgrade #200

Merged
merged 2 commits into from

3 participants

@philwebb

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

@ngauthier

Thanks, worked like a charm for me.

@matthewmccullough matthewmccullough merged commit 492ba21 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 23, 2012
  1. @philwebb

    Fix for GLI

    philwebb authored
  2. @philwebb

    Fix infinite loop

    philwebb authored
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 7 deletions.
  1. +2 −2 bin/showoff
  2. +1 −5 lib/showoff.rb
View
4 bin/showoff
@@ -6,7 +6,7 @@ require 'showoff/version'
require 'rubygems'
require 'gli'
-include GLI
+include GLI::App
version SHOWOFF_VERSION
@@ -186,4 +186,4 @@ on_error do |exception|
true
end
-exit GLI.run(ARGV)
+exit run(ARGV)
View
6 lib/showoff.rb
@@ -503,11 +503,7 @@ def pdf(static=true)
def self.do_static(what)
what = "index" if !what
- # Nasty hack to get the actual ShowOff module
- showoff = ShowOff.new
- while !showoff.is_a?(ShowOff)
- showoff = showoff.instance_variable_get(:@app)
- end
+ showoff = ShowOff.new!
name = showoff.instance_variable_get(:@pres_name)
path = showoff.instance_variable_get(:@root_path)
logger = showoff.instance_variable_get(:@logger)
Something went wrong with that request. Please try again.