From 0ab53a09f99e6d47458d45f9133ba4dcc443a48b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Tue, 4 Sep 2018 12:27:26 -0300 Subject: [PATCH] backward compatibility to use json or JSON in format configuration issue #382 --- lib/rspec_api_documentation.rb | 1 + lib/rspec_api_documentation/writers/json_writer.rb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib/rspec_api_documentation.rb b/lib/rspec_api_documentation.rb index 5114783b..5986aadb 100644 --- a/lib/rspec_api_documentation.rb +++ b/lib/rspec_api_documentation.rb @@ -38,6 +38,7 @@ module Writers autoload :TextileWriter autoload :MarkdownWriter autoload :JSONWriter + autoload :JsonWriter autoload :AppendJsonWriter autoload :JsonIodocsWriter autoload :IndexHelper diff --git a/lib/rspec_api_documentation/writers/json_writer.rb b/lib/rspec_api_documentation/writers/json_writer.rb index c23437bf..c61c3008 100644 --- a/lib/rspec_api_documentation/writers/json_writer.rb +++ b/lib/rspec_api_documentation/writers/json_writer.rb @@ -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 + class JSONIndex def initialize(index, configuration) @index = index