From 739f44131fde38facb6d06142cd7d186a63e84cf Mon Sep 17 00:00:00 2001 From: Olivier Bilodeau Date: Wed, 29 Jan 2020 23:58:55 -0500 Subject: [PATCH 1/4] doc: Updated debugging documentation --- HACKING.adoc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/HACKING.adoc b/HACKING.adoc index eda40f44..788e5b48 100644 --- a/HACKING.adoc +++ b/HACKING.adoc @@ -30,9 +30,8 @@ Two complementary approaches can be used to explore the context offered by ascii [NOTE] -- -Starting with v1.1.0 the slim templates are compiled to Ruby in order to -use the same templates from Asciidoctor.js (Javascript / Node.js ecosystem). -Don't forget to recompile the templates if you make changes to them. +Debugging is only supported via the Ruby ecosystem. +You need to recompile the templates when you make changes to them. This can be done by running: bundle exec rake build @@ -80,6 +79,10 @@ In order to be dropped into the debugger at a specific point in a template simpl - binding.pry ---- +Recompile the templates with: + + bundle exec rake build + Then run `asciidoctor-revealjs` from the command-line to generate your document and you'll be dropped in the debugger: ---- @@ -111,13 +114,11 @@ You can also query asciidoctor's documentation: If you install the `pry-byebug` gem you get additional debugging capabilities. See the gem's documentation for details. -Since 1.1.0, templates are compiled. It is easier to inject the debug -triggering statements and use the templates directly instead of debugging -compiled templates. You can call the slim templates directly with: - -// TODO it's still not clear whether `-r slim-htag` is required right now (#153) +Since 1.1.0, templates are compiled. +It is easier to inject the debug triggering statements and use the templates directly instead of debugging compiled templates. +You can call the slim templates directly with: - bundle exec asciidoctor --trace -T templates/ examples/customcss.adoc + bundle exec asciidoctor-revealjs --trace -T templates/ examples/customcss.adoc === References From a6f703e4465c97840f20aded2f9f580005572131 Mon Sep 17 00:00:00 2001 From: Olivier Bilodeau Date: Wed, 29 Jan 2020 23:59:21 -0500 Subject: [PATCH 2/4] Fixed dependencies for interactive debugging --- asciidoctor-revealjs.gemspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/asciidoctor-revealjs.gemspec b/asciidoctor-revealjs.gemspec index 54d3a8be..75554038 100644 --- a/asciidoctor-revealjs.gemspec +++ b/asciidoctor-revealjs.gemspec @@ -37,7 +37,8 @@ Gem::Specification.new do |s| s.add_development_dependency 'rake', '~> 13.0.0' s.add_development_dependency 'asciidoctor-doctest', '= 2.0.0.beta.5' s.add_development_dependency 'minitest', '~> 5.14' - s.add_development_dependency 'pry', '~> 0.10.4' + s.add_development_dependency 'pry', '~> 0.12.0' + s.add_development_dependency 'irb' if RUBY_ENGINE != 'jruby' s.add_development_dependency 'pry-byebug' s.add_development_dependency 'pygments.rb' From 73abd892a95046aa1cf76e70b5b4a4a1abd3cc2e Mon Sep 17 00:00:00 2001 From: Olivier Bilodeau Date: Thu, 30 Jan 2020 00:02:18 -0500 Subject: [PATCH 3/4] Updated CHANGELOG --- CHANGELOG.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 9aa2a249..2c273a27 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -11,10 +11,14 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[ Enhancements:: * Built-in slim templates can now be overridden with `--template-dir` or `-T` ({uri-issue}177[#177], {uri-issue}318[#318]) + * Documentation improvements ({uri-issue}322[#322]) Compliance:: * Added support for the `sectnums` AsciiDoc attribute ({uri-issue}185[#185], {uri-issue}317[#317]) +Bug Fixes:: + * Interactive debugging works again ({uri-issue}322[#322]) + == 3.1.0 (2020-01-18) From 4e5c6d3ea4844bc8b5e09814cb6619662023b7ac Mon Sep 17 00:00:00 2001 From: Olivier Bilodeau Date: Thu, 30 Jan 2020 09:40:14 -0500 Subject: [PATCH 4/4] Fix JRuby build io-console dependency couldn't build on JRuby. It is required by reline which is required by irb which I needed to add because pry-byebug was broken. Debugging on JRuby isn't necessary so made these optional on that environment. --- asciidoctor-revealjs.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asciidoctor-revealjs.gemspec b/asciidoctor-revealjs.gemspec index 75554038..3631ae25 100644 --- a/asciidoctor-revealjs.gemspec +++ b/asciidoctor-revealjs.gemspec @@ -37,9 +37,9 @@ Gem::Specification.new do |s| s.add_development_dependency 'rake', '~> 13.0.0' s.add_development_dependency 'asciidoctor-doctest', '= 2.0.0.beta.5' s.add_development_dependency 'minitest', '~> 5.14' - s.add_development_dependency 'pry', '~> 0.12.0' - s.add_development_dependency 'irb' if RUBY_ENGINE != 'jruby' + s.add_development_dependency 'pry', '~> 0.12.0' + s.add_development_dependency 'irb' s.add_development_dependency 'pry-byebug' s.add_development_dependency 'pygments.rb' end