Module: ServiceMock::CommandLineOptions
- Included in:
- Server
- Defined in:
- lib/service_mock/command_line_options.rb
Constant Summary collapse
- OPTIONS =
- [:port, :https_port, :verbose, :root_dir, :record_mappings, :proxy_all, :match_headers, :proxy_via, :https_keystore, :keystore_password, :enable_browser_proxying, :preserve_host_header, :https_truststore, :truststore_password, :https_require_client_cert, :no_request_journal, :max_request_journal_entries] 
- NOT_IMPLEMENTED =
- [:container_threads, :jetty_acceptor_threads, :jetty_accept_queue_size, :jetty_header_buffer_size, :extensions, :help] 
Instance Method Summary collapse
- #command_line_options ⇒ Object
- #enable_browser_proxying_command ⇒ Object
- #https_keystore_command ⇒ Object
- #https_port_command ⇒ Object
- #https_require_client_cert_command ⇒ Object
- #https_truststore_command ⇒ Object
- #keystore_password_command ⇒ Object
- #match_headers_command ⇒ Object
- #max_request_journal_entries_command ⇒ Object
- #no_request_journal_command ⇒ Object
- #port_command ⇒ Object
- #preserve_host_header_command ⇒ Object
- #proxy_all_command ⇒ Object
- #proxy_via_command ⇒ Object
- #record_mappings_command ⇒ Object
- #root_dir_command ⇒ Object
- #truststore_password_command ⇒ Object
- #verbose_command ⇒ Object
Instance Method Details
#command_line_options ⇒ Object
| 14 15 16 17 18 19 | # File 'lib/service_mock/command_line_options.rb', line 14 def OPTIONS.inject([]) do |value, option| value += self.send("#{option}_command") if self.send(option).to_s.size > 0 value end end | 
#enable_browser_proxying_command ⇒ Object
| 61 62 63 | # File 'lib/service_mock/command_line_options.rb', line 61 def ['--enable-browser-proxying'] end | 
#https_keystore_command ⇒ Object
| 53 54 55 | # File 'lib/service_mock/command_line_options.rb', line 53 def https_keystore_command ["--https-keystore #{https_keystore}"] end | 
#https_port_command ⇒ Object
| 25 26 27 | # File 'lib/service_mock/command_line_options.rb', line 25 def https_port_command ['--https-port', https_port.to_s] end | 
#https_require_client_cert_command ⇒ Object
| 77 78 79 | # File 'lib/service_mock/command_line_options.rb', line 77 def https_require_client_cert_command ['--https-require-client-cert'] end | 
#https_truststore_command ⇒ Object
| 69 70 71 | # File 'lib/service_mock/command_line_options.rb', line 69 def https_truststore_command ["--https-truststore #{https_truststore}"] end | 
#keystore_password_command ⇒ Object
| 57 58 59 | # File 'lib/service_mock/command_line_options.rb', line 57 def keystore_password_command ["--keystore-password #{keystore_password}"] end | 
#match_headers_command ⇒ Object
| 45 46 47 | # File 'lib/service_mock/command_line_options.rb', line 45 def match_headers_command ["--match-headers=\"#{match_headers}\""] end | 
#max_request_journal_entries_command ⇒ Object
| 85 86 87 | # File 'lib/service_mock/command_line_options.rb', line 85 def max_request_journal_entries_command ["--max-request-journal-entries #{max_request_journal_entries}"] end | 
#no_request_journal_command ⇒ Object
| 81 82 83 | # File 'lib/service_mock/command_line_options.rb', line 81 def no_request_journal_command ['--no-request-journal'] end | 
#port_command ⇒ Object
| 21 22 23 | # File 'lib/service_mock/command_line_options.rb', line 21 def port_command ['--port', port.to_s] end | 
#preserve_host_header_command ⇒ Object
| 65 66 67 | # File 'lib/service_mock/command_line_options.rb', line 65 def preserve_host_header_command ['--preserve-host-header'] end | 
#proxy_all_command ⇒ Object
| 41 42 43 | # File 'lib/service_mock/command_line_options.rb', line 41 def proxy_all_command ["--proxy-all=#{proxy_all.to_s}"] end | 
#proxy_via_command ⇒ Object
| 49 50 51 | # File 'lib/service_mock/command_line_options.rb', line 49 def proxy_via_command ["--proxy-via #{proxy_via}"] end | 
#record_mappings_command ⇒ Object
| 37 38 39 | # File 'lib/service_mock/command_line_options.rb', line 37 def record_mappings_command ['--record-mappings'] end | 
#root_dir_command ⇒ Object
| 33 34 35 | # File 'lib/service_mock/command_line_options.rb', line 33 def root_dir_command ['--root-dir', root_dir] end | 
#truststore_password_command ⇒ Object
| 73 74 75 | # File 'lib/service_mock/command_line_options.rb', line 73 def truststore_password_command ["--truststore-password #{truststore_password}"] end | 
#verbose_command ⇒ Object
| 29 30 31 | # File 'lib/service_mock/command_line_options.rb', line 29 def verbose_command ['--verbose'] end |