kputnam / piggly

PL/pgSQL stored procedure code coverage tool
Other
69 stars 14 forks source link

config.dry_run undefined #33

Closed born-in-brooklyn closed 6 years ago

born-in-brooklyn commented 6 years ago

seems like config.dry_run was removed. I commented out lines 27-29 in trace.rb:

        elsif config.dry_run?
          puts procedures.map{|p| p.signature }
          exit 0

and similar code from lines 20-22 in untrace.rb, and lines 29-31 in report.rb. to get around this. without doing this, I get the following error:

$ piggly trace
C:/Ruby22/lib/ruby/gems/2.2.0/gems/piggly-2.2.1/lib/piggly/command/trace.rb:27:in `main': undefined method `dry_run?' for #<Piggly::Config:0x32fac30> (NoMethodError)
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/piggly-2.2.1/lib/piggly/command/base.rb:15:in `main'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/piggly-2.2.1/bin/piggly:8:in `<top (required)>'
        from C:/Ruby22/bin/piggly:23:in `load'
        from C:/Ruby22/bin/piggly:23:in `<main>'
kputnam commented 6 years ago

Thanks, that was a latent bug that seems to have been lurking for a while. Dry run is now working again, at least with trace and untrace. This was included in a new release, version 2.2.2.