Skip to content

Commit 637e143

Browse files
committed
Merge branch 'feature/links_into_textile_index_to_examples' into develop
2 parents 7306126 + c8819f6 commit 637e143

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

features/textile_documentation.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,15 @@ Feature: Generate Textile documentation from test examples
141141
142142
h2. Help
143143
144-
* Getting welcome message
144+
* "Getting welcome message":help/getting_welcome_message.textile
145145
146146
h2. Orders
147147
148-
* Creating an order
149-
* Deleting an order
150-
* Getting a list of orders
151-
* Getting a specific order
152-
* Updating an order
148+
* "Creating an order":orders/creating_an_order.textile
149+
* "Deleting an order":orders/deleting_an_order.textile
150+
* "Getting a list of orders":orders/getting_a_list_of_orders.textile
151+
* "Getting a specific order":orders/getting_a_specific_order.textile
152+
* "Updating an order":orders/updating_an_order.textile
153153
154154
155155
"""

lib/rspec_api_documentation/views/html_index.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ def initialize(index, configuration)
55
super
66
self.template_name = "rspec_api_documentation/html_index"
77
end
8+
9+
def examples
10+
@index.examples.map { |example| HtmlExample.new(example, @configuration) }
11+
end
812
end
913
end
1014
end

lib/rspec_api_documentation/views/markup_index.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ def api_name
1616
def sections
1717
RspecApiDocumentation::Writers::IndexWriter.sections(examples, @configuration)
1818
end
19-
20-
def examples
21-
@index.examples.map { |example| HtmlExample.new(example, @configuration) }
22-
end
2319
end
2420
end
2521
end

lib/rspec_api_documentation/views/textile_index.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ def initialize(index, configuration)
55
super
66
self.template_name = "rspec_api_documentation/textile_index"
77
end
8+
9+
def examples
10+
@index.examples.map { |example| TextileExample.new(example, @configuration) }
11+
end
812
end
913
end
1014
end

templates/rspec_api_documentation/textile_index.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ h1. {{ api_name }}
44
h2. {{ resource_name }}
55

66
{{# examples }}
7-
* {{ description }}
7+
* "{{ description }}":{{ dirname }}/{{ filename }}
88
{{/ examples }}
99

1010
{{/ sections }}

0 commit comments

Comments
 (0)