summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2014-02-20 04:29:02 -0700
committerDan Allen <dan.j.allen@gmail.com>2014-02-26 14:04:41 -0700
commitd98c8e9cd5e5793fdab6da7a0a6f37eb8349878b (patch)
tree4a5993b8e23f787017e1abcac51dce3ded60d4d9 /features
parent0c4a21b4ade1df7767986c9bce84a7c3fdbee3c9 (diff)
resolves #778, rewrite converter API; resolves #638, integrate thread_safe gem
- rewrite converter API - separate built-in converters from template converter - rename renderer/render to converter/convert - make converter an extension point (resolves #778) - base built-in converters on the converter API - rename template_name property to node_name on AbstractNode - make block_ prefix on file name of block-level templates optional - use thread_safe gem for template and converter caches (resolves #638) - introduce Stylesheets API to manage stylesheets - move file write logic to Document - delegate file write logic to converter that implements Writer - remove compact logic, deprecate related options - duplicate options and attributes passed to APIs, add tests - assign doctype / backend attributes correctly when document is loaded, add tests - report proper error if nil is passed to load_file and convert_file - use span tag to group kbd combination in html5 backend - setup toc in preamble if toc attribute is preamble - Opal compatibility fixes, use built-in HTML5 converter - make the outline method accessible to all html converters - document the converter APIs along with some minor cleanups in terminology - load stylesheets from data directory - rename ruler block to thematic_break - add inline? and block? query methods to AbstractNode - use Timings class to measure and report timings from processor steps - fix cucumber tests - upgrade tilt dependency to 2.0.0 - minor optimizations
Diffstat (limited to 'features')
-rw-r--r--features/open_block.feature20
-rw-r--r--features/pass_block.feature12
-rw-r--r--features/step_definitions.rb12
-rw-r--r--features/xref.feature4
4 files changed, 24 insertions, 24 deletions
diff --git a/features/open_block.feature b/features/open_block.feature
index 000b29a7..f50070eb 100644
--- a/features/open_block.feature
+++ b/features/open_block.feature
@@ -12,8 +12,8 @@ Feature: Open Blocks
A paragraph in an open block.
--
"""
- When it is rendered using the html backend
- Then the output should match the HTML source
+ When it is converted to html
+ Then the result should match the HTML source
"""
<div class="openblock">
<div class="content">
@@ -32,8 +32,8 @@ Feature: Open Blocks
A paragraph in an open block.
--
"""
- When it is rendered using the docbook backend
- Then the output should match the XML source
+ When it is converted to docbook
+ Then the result should match the XML source
"""
<simpara>A paragraph in an open block.</simpara>
"""
@@ -46,8 +46,8 @@ Feature: Open Blocks
A paragraph in an open block.
--
"""
- When it is rendered using the html backend
- Then the output should match the HTML structure
+ When it is converted to html
+ Then the result should match the HTML structure
"""
.openblock
.content
@@ -63,8 +63,8 @@ Feature: Open Blocks
A paragraph in an open block.
--
"""
- When it is rendered using the docbook backend
- Then the output should match the XML structure
+ When it is converted to docbook
+ Then the result should match the XML structure
"""
simpara A paragraph in an open block.
"""
@@ -79,8 +79,8 @@ Feature: Open Blocks
* three
--
"""
- When it is rendered using the html backend
- Then the output should match the HTML structure
+ When it is converted to html
+ Then the result should match the HTML structure
"""
.openblock
.content
diff --git a/features/pass_block.feature b/features/pass_block.feature
index 24b7212d..77d4f8a8 100644
--- a/features/pass_block.feature
+++ b/features/pass_block.feature
@@ -16,8 +16,8 @@ Feature: Open Blocks
image:tiger.png[]
++++
"""
- When it is rendered using the html backend
- Then the output should match the HTML source
+ When it is converted to html
+ Then the result should match the HTML source
"""
<p>{name}</p>
@@ -36,8 +36,8 @@ Feature: Open Blocks
image:tiger.png[]
++++
"""
- When it is rendered using the docbook backend
- Then the output should match the XML source
+ When it is converted to docbook
+ Then the result should match the XML source
"""
<simpara>{name}</simpara>
@@ -57,8 +57,8 @@ Feature: Open Blocks
image:tiger.png[]
++++
"""
- When it is rendered using the html backend
- Then the output should match the HTML source
+ When it is converted to html
+ Then the result should match the HTML source
"""
<p>value</p>
diff --git a/features/step_definitions.rb b/features/step_definitions.rb
index 382d9923..0f84b42f 100644
--- a/features/step_definitions.rb
+++ b/features/step_definitions.rb
@@ -7,22 +7,22 @@ Given /the AsciiDoc source/ do |source|
@source = source
end
-When /it is rendered using the html backend/ do
- @output = Asciidoctor.render @source
+When /it is converted to html/ do
+ @output = Asciidoctor.convert @source
#File.open('/tmp/test.adoc', 'w') {|f| f.write @source }
#@output = %x{asciidoc -f compat/asciidoc.conf -o - -s /tmp/test.adoc | XMLLINT_INDENT='' xmllint --format - | tail -n +2}.rstrip
##@output = %x{asciidoc -f compat/asciidoc.conf -o - -s /tmp/test.adoc}
end
-When /it is rendered using the docbook backend/ do
- @output = Asciidoctor.render @source, :backend => :docbook
+When /it is converted to docbook/ do
+ @output = Asciidoctor.convert @source, :backend => :docbook
end
-Then /the output should match the (HTML|XML) source/ do |format, expect|
+Then /the result should match the (HTML|XML) source/ do |format, expect|
@output.should == expect
end
-Then /the output should match the (HTML|XML) structure/ do |format, expect|
+Then /the result should match the (HTML|XML) structure/ do |format, expect|
case format
when 'HTML'
options = {:format => :html5}
diff --git a/features/xref.feature b/features/xref.feature
index 720136ed..d9c29025 100644
--- a/features/xref.feature
+++ b/features/xref.feature
@@ -16,8 +16,8 @@ Feature: Cross References
Instructions go here.
"""
- When it is rendered using the html backend
- Then the output should match the HTML structure
+ When it is converted to html
+ Then the result should match the HTML structure
"""
table.tableblock.frame-all.grid-all style='width: 100%;'
colgroup