Skip to content

Commit f2945e4

Browse files
authored
Merge pull request #366 from fc-arny/master
Change extension for Markdown from .markdown to .md
2 parents ca106a0 + 1951e3e commit f2945e4

File tree

5 files changed

+18
-17
lines changed

5 files changed

+18
-17
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
doc
12
tmp
23
.rvmrc
34
.ruby-version

features/markdown_documentation.feature

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Feature: Generate Markdown documentation from test examples
146146
And the exit status should be 0
147147

148148
Scenario: Index file should look like we expect
149-
Then the file "doc/api/index.markdown" should contain exactly:
149+
Then the file "doc/api/index.md" should contain exactly:
150150
"""
151151
# Example API
152152
Example API Description
@@ -155,19 +155,19 @@ Feature: Generate Markdown documentation from test examples
155155
156156
Getting help
157157
158-
* [Getting welcome message](help/getting_welcome_message.markdown)
158+
* [Getting welcome message](help/getting_welcome_message.md)
159159
160160
## Orders
161161
162-
* [Creating an order](orders/creating_an_order.markdown)
163-
* [Deleting an order](orders/deleting_an_order.markdown)
164-
* [Getting a list of orders](orders/getting_a_list_of_orders.markdown)
165-
* [Getting a specific order](orders/getting_a_specific_order.markdown)
166-
* [Updating an order](orders/updating_an_order.markdown)
162+
* [Creating an order](orders/creating_an_order.md)
163+
* [Deleting an order](orders/deleting_an_order.md)
164+
* [Getting a list of orders](orders/getting_a_list_of_orders.md)
165+
* [Getting a specific order](orders/getting_a_specific_order.md)
166+
* [Updating an order](orders/updating_an_order.md)
167167
"""
168168

169169
Scenario: Example 'Getting a list of orders' file should look like we expect
170-
Then the file "doc/api/orders/getting_a_list_of_orders.markdown" should contain exactly:
170+
Then the file "doc/api/orders/getting_a_list_of_orders.md" should contain exactly:
171171
"""
172172
# Orders API
173173
@@ -222,7 +222,7 @@ Feature: Generate Markdown documentation from test examples
222222
"""
223223

224224
Scenario: Example 'Creating an order' file should look like we expect
225-
Then the file "doc/api/orders/creating_an_order.markdown" should contain exactly:
225+
Then the file "doc/api/orders/creating_an_order.md" should contain exactly:
226226
"""
227227
# Orders API
228228
@@ -266,16 +266,16 @@ Feature: Generate Markdown documentation from test examples
266266
"""
267267

268268
Scenario: Example 'Deleting an order' file should be created
269-
Then a file named "doc/api/orders/deleting_an_order.markdown" should exist
269+
Then a file named "doc/api/orders/deleting_an_order.md" should exist
270270

271271
Scenario: Example 'Getting a list of orders' file should be created
272-
Then a file named "doc/api/orders/getting_a_list_of_orders.markdown" should exist
272+
Then a file named "doc/api/orders/getting_a_list_of_orders.md" should exist
273273

274274
Scenario: Example 'Getting a specific order' file should be created
275-
Then a file named "doc/api/orders/getting_a_specific_order.markdown" should exist
275+
Then a file named "doc/api/orders/getting_a_specific_order.md" should exist
276276

277277
Scenario: Example 'Updating an order' file should be created
278-
Then a file named "doc/api/orders/updating_an_order.markdown" should exist
278+
Then a file named "doc/api/orders/updating_an_order.md" should exist
279279

280280
Scenario: Example 'Getting welcome message' file should be created
281-
Then a file named "doc/api/help/getting_welcome_message.markdown" should exist
281+
Then a file named "doc/api/help/getting_welcome_message.md" should exist

lib/rspec_api_documentation/views/markdown_example.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module RspecApiDocumentation
22
module Views
33
class MarkdownExample < MarkupExample
4-
EXTENSION = 'markdown'
4+
EXTENSION = 'md'
55

66
def initialize(example, configuration)
77
super

lib/rspec_api_documentation/writers/markdown_writer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module RspecApiDocumentation
22
module Writers
33
class MarkdownWriter < GeneralMarkupWriter
4-
EXTENSION = 'markdown'
4+
EXTENSION = 'md'
55

66
def markup_index_class
77
RspecApiDocumentation::Views::MarkdownIndex

spec/writers/markdown_writer_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
FileUtils.mkdir_p(configuration.docs_dir)
2727

2828
writer.write
29-
index_file = File.join(configuration.docs_dir, "index.markdown")
29+
index_file = File.join(configuration.docs_dir, "index.md")
3030
expect(File.exists?(index_file)).to be_truthy
3131
end
3232
end

0 commit comments

Comments
 (0)