Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backward compatibility to use json or JSON in format configuration #399

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/rspec_api_documentation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module Writers
autoload :TextileWriter
autoload :MarkdownWriter
autoload :JSONWriter
autoload :JsonWriter
autoload :AppendJsonWriter
autoload :JsonIodocsWriter
autoload :IndexHelper
Expand Down
4 changes: 4 additions & 0 deletions lib/rspec_api_documentation/writers/json_writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ def write_examples
end
end

# https://github.com/zipmark/rspec_api_documentation/issues/382
# backward compatibilty json for configuration of config.format
class JsonWriter < JSONWriter; end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw, you could just

JsonWriter = JSONWriter

next time

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!, thanks your tip!


class JSONIndex
def initialize(index, configuration)
@index = index
Expand Down