Module: Avocado
- Defined in:
- lib/avocado/storage.rb,
lib/avocado-docs.rb,
lib/avocado/engine.rb,
lib/avocado/logger.rb,
lib/avocado/version.rb,
lib/avocado/uploader.rb,
lib/avocado/controller_patch.rb,
lib/avocado/controller_response.rb,
lib/avocado/adapters/base_adapter.rb,
lib/avocado/adapters/rspec_adapter.rb,
lib/avocado/adapters/cucumber_adapter.rb,
lib/avocado/adapters/minitest_adapter.rb,
app/controllers/avocado/specs_controller.rb,
lib/avocado/serializers/request_serializer.rb,
lib/avocado/serializers/resource_serializer.rb,
lib/avocado/serializers/response_serializer.rb
Overview
This concern gets patched into ActionController::Base during testing The after_action will ensure every request gets documented regardless of the type of test (controller, integration, etc)
Defined Under Namespace
Modules: Adapters, ControllerPatch, Logger, Minitest, Serializers Classes: ControllerResponse, Engine, SpecsController, Storage, Uploader
Constant Summary collapse
- VERSION =
'3.1.2'.freeze
Class Attribute Summary collapse
-
.document_if ⇒ Object
Returns the value of attribute document_if.
-
.headers ⇒ Object
Returns the value of attribute headers.
-
.ignored_params ⇒ Object
Returns the value of attribute ignored_params.
-
.json_path ⇒ Object
Returns the value of attribute json_path.
-
.storage ⇒ Object
Returns the value of attribute storage.
-
.upload_id ⇒ Object
Returns the value of attribute upload_id.
-
.uploader ⇒ Object
Returns the value of attribute uploader.
-
.url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Class Attribute Details
.document_if ⇒ Object
Returns the value of attribute document_if.
17 18 19 |
# File 'lib/avocado-docs.rb', line 17 def document_if @document_if end |
.headers ⇒ Object
Returns the value of attribute headers.
17 18 19 |
# File 'lib/avocado-docs.rb', line 17 def headers @headers end |
.ignored_params ⇒ Object
Returns the value of attribute ignored_params.
17 18 19 |
# File 'lib/avocado-docs.rb', line 17 def ignored_params @ignored_params end |
.json_path ⇒ Object
Returns the value of attribute json_path.
17 18 19 |
# File 'lib/avocado-docs.rb', line 17 def json_path @json_path end |
.storage ⇒ Object
Returns the value of attribute storage.
17 18 19 |
# File 'lib/avocado-docs.rb', line 17 def storage @storage end |
.upload_id ⇒ Object
Returns the value of attribute upload_id.
17 18 19 |
# File 'lib/avocado-docs.rb', line 17 def upload_id @upload_id end |
.uploader ⇒ Object
Returns the value of attribute uploader.
17 18 19 |
# File 'lib/avocado-docs.rb', line 17 def uploader @uploader end |
.url ⇒ Object
Returns the value of attribute url.
17 18 19 |
# File 'lib/avocado-docs.rb', line 17 def url @url end |
Class Method Details
.configure {|_self| ... } ⇒ Object
19 20 21 |
# File 'lib/avocado-docs.rb', line 19 def configure yield self end |
.reset! ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/avocado-docs.rb', line 23 def reset! self.url = nil self.headers = [] self.json_path = ::Rails.root self.upload_id = proc { SecureRandom.uuid } self.document_if = proc { true } self.ignored_params = %w(controller action format) self.storage = Avocado::Storage.instance self.uploader = Avocado::Uploader.instance storage.clear uploader.reset end |