Module: Dredd::Rack::Configuration
- Included in:
- Dredd::Rack
- Defined in:
- lib/dredd/rack/configuration.rb
Overview
Hold the Dredd::Rack global configuration.
Constant Summary collapse
- @@app =
Default configuration
nil
- @@dredd_command =
'dredd'
Instance Method Summary collapse
-
#app ⇒ Object
Return the application to be tested locally.
-
#app=(object) ⇒ Object
Set the application to be tested locally.
-
#configure {|_self| ... } ⇒ Object
Allow the default configuration to be overwritten from initializers.
-
#dredd_command ⇒ Object
Return the command to be runned to invoke Dredd.
-
#dredd_command=(command) ⇒ Object
Set a custom Dredd command.
Instance Method Details
#app ⇒ Object
Return the application to be tested locally
8 9 10 |
# File 'lib/dredd/rack/configuration.rb', line 8 def app @@app end |
#app=(object) ⇒ Object
Set the application to be tested locally
Any Dredd::Rack::Runner configured to run locally will serve this application from a Capybara::Server instance.
object - the application Constant
18 19 20 |
# File 'lib/dredd/rack/configuration.rb', line 18 def app=(object) @@app = object end |
#configure {|_self| ... } ⇒ Object
Allow the default configuration to be overwritten from initializers
39 40 41 |
# File 'lib/dredd/rack/configuration.rb', line 39 def configure yield self if block_given? end |
#dredd_command ⇒ Object
Return the command to be runned to invoke Dredd
23 24 25 |
# File 'lib/dredd/rack/configuration.rb', line 23 def dredd_command @@dredd_command end |
#dredd_command=(command) ⇒ Object
Set a custom Dredd command
command - the command String
30 31 32 |
# File 'lib/dredd/rack/configuration.rb', line 30 def dredd_command=(command) @@dredd_command = command end |