haproxy_parser 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21df2cb022a83a269336d4a89bab93531a252cfd
4
- data.tar.gz: cd278c84cb1fc62634117e65539339f6af63a46c
3
+ metadata.gz: e0a99ce6e3b51ddaee588d2b84b9a6483e80aa05
4
+ data.tar.gz: 91166c126dfde8fe4e7492cb35d260333ab7c26a
5
5
  SHA512:
6
- metadata.gz: bc537129dc7e3c0294a3938838e8c9ebd897be8bc193c5328834d5fbf05b03f2ebf7c140af9b827ce3ef001bb1c6a2ef1b794c6040500e0380d4bdfb9c9e489c
7
- data.tar.gz: 7c13c6a4c64a5b0810d8149abf4985da50e52020c41dcb9c9080208175b0baa4ac2ca515cf2752038fa2f00e698add47fdc696f3ea0e98dbed46c460cbc05d65
6
+ metadata.gz: e967e89b4131bc5ee67452f39920176c9d906b2ad6e0b4ebb35e2dfafdfa4b3056ba26b4520caaecfc1929fef9f1323967f61702186fe81cf0b31188ebb095c3
7
+ data.tar.gz: c80ce16a16da097279eb3fd1a1c64913349ac5eff49959f4b6399f982dcb93ad5b94e2b96573947266baaa09d2b55b6dc0d0284b794545d4b292539241050f69
data/README.md CHANGED
@@ -66,7 +66,7 @@ backend backend_http_80
66
66
 
67
67
  ## Check Format
68
68
  ```
69
- config = HaproxyParser.new(
69
+ config = HaproxyParser::Config.new(
70
70
  haproxy_config_path
71
71
  ).check_format!
72
72
  ```
@@ -74,7 +74,7 @@ config = HaproxyParser.new(
74
74
  ### Execute Parse
75
75
  You can parse by calling method like below.
76
76
  ```
77
- config = HaproxyParser.new(
77
+ config = HaproxyParser::Config.new(
78
78
  haproxy_config_path
79
79
  ).parse
80
80
  ```
@@ -17,12 +17,14 @@ module HaproxyParser
17
17
  if line_servers[0].is_a?(Array)
18
18
  line_servers.each do |line_server|
19
19
  arr << ServerParser.new(
20
- line: line_server
20
+ line: line_server,
21
+ backend_name: name
21
22
  )
22
23
  end
23
24
  else
24
25
  arr << ServerParser.new(
25
- line: line_servers
26
+ line: line_servers,
27
+ backend_name: name
26
28
  )
27
29
  end
28
30
  end
@@ -4,9 +4,10 @@ require "haproxy_parser/line_parser"
4
4
  module HaproxyParser
5
5
  module Builders
6
6
  class ServerParser
7
- attr_reader :line
8
- def initialize(line:)
7
+ attr_reader :line, :backend_name
8
+ def initialize(line:, backend_name:)
9
9
  @line = line
10
+ @backend_name = backend_name
10
11
  end
11
12
 
12
13
  def name
@@ -1,3 +1,3 @@
1
1
  module HaproxyParser
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haproxy_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akito Ueno
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-24 00:00:00.000000000 Z
11
+ date: 2016-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler