Class: Hoverfly
Class Attribute Summary collapse
-
.admin_port ⇒ Object
readonly
Returns the value of attribute admin_port.
-
.proxy_port ⇒ Object
readonly
Returns the value of attribute proxy_port.
Class Method Summary collapse
- .import(file_list, meta = {}) ⇒ Object
- .middleware(middleware_location) ⇒ Object
- .set_ports(admin:, proxy:) ⇒ Object
Methods included from HoverflyAPI
clear_cached_data, get_cached_data, get_config_info, get_current_destination, get_current_middleware, get_current_mode, get_current_simulation_schema, get_current_simulations, get_logs, get_upstream_proxy, get_usage, get_version, update_destination, update_middleware, update_mode, update_simulations
Class Attribute Details
.admin_port ⇒ Object (readonly)
Returns the value of attribute admin_port.
5 6 7 |
# File 'lib/client.rb', line 5 def admin_port @admin_port end |
.proxy_port ⇒ Object (readonly)
Returns the value of attribute proxy_port.
5 6 7 |
# File 'lib/client.rb', line 5 def proxy_port @proxy_port end |
Class Method Details
.import(file_list, meta = {}) ⇒ Object
19 20 21 |
# File 'lib/client.rb', line 19 def import(file_list, = {}) update_simulations(to_simulation(file_list, )) end |
.middleware(middleware_location) ⇒ Object
15 16 17 |
# File 'lib/client.rb', line 15 def middleware(middleware_location) update_middleware({ binary: '', script: '', remote: '' }.merge(middleware_location)) end |
.set_ports(admin:, proxy:) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/client.rb', line 7 def set_ports(admin:, proxy:) @admin_port = admin @proxy_port = proxy HoverflyAPI..update(verify: false) HoverflyAPI.format :json HoverflyAPI.base_uri "http://localhost:#{@admin_port}" end |