Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix example Config.parse references that produce error.

  • Loading branch information...
commit b1e8580452edcc24e551903994c4ab9481c8fb03 1 parent 3af8a9f
Winfield Peterson authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 README.rdoc
View
4 README.rdoc
@@ -14,7 +14,7 @@ Tools for managing HAProxy with Ruby.
require 'haproxy-tools'
- config = HAProxy::Config.parse('spec/fixtures/multi-pool.haproxy.cfg')
+ config = HAProxy::Config.parse_file('spec/fixtures/multi-pool.haproxy.cfg')
config.backend('logs').servers.each do |name, server|
puts "Server: #{server.name} #{server.ip}"
end
@@ -23,7 +23,7 @@ Tools for managing HAProxy with Ruby.
require 'haproxy-tools'
- config = HAProxy::Config.parse('spec/fixtures/multi-pool.haproxy.cfg') # Parse the config file
+ config = HAProxy::Config.parse_file('spec/fixtures/multi-pool.haproxy.cfg') # Parse the config file
logs = config.backend('logs') # Get the backend
logs.servers['logs4'] = HAProxy::Server.new('logs4', '127.0.0.1') # Add a new server
logs.servers.delete_if {|name, server| name == 'logs4'} # Remove a server
Please sign in to comment.
Something went wrong with that request. Please try again.